Age | Commit message (Collapse) | Author | Files | Lines |
|
In particular, make sure pExaScr->src/maskPix are cleared when the
corresponding pictures aren't associated with drawables, i.e. solid or gradient
pictures. Without this, we would in some cases associate the source/mask region
with unrelated pixmaps from previous Composite fallbacks, resulting in random
corruption.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47266
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 1ca096d5e07221025c4c4110528772b7d94f15ee)
|
|
git://people.freedesktop.org/~whot/xserver into server-1.13-branch
|
|
Button mask should be out-of-band with the emulated
pointer events as touch devices don't truly have
"buttons". Even though, it's handy to have the modifier
mask from the paired keyboard on touch events.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit b4e44b285ed0eee1d06514215a4b01d54f40094b)
|
|
Ensure emulated pointer events contain the state that applies before the
event was processed, so the device state must be updated after delivering
such emulated events.
Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 863f32c930d71073ee5f78452b78bd459d024867)
|
|
The allocated TouchListener array may fall short by 1 if hitting the worst case
situation where there's an active grab, passive grabs on each window in the
sprite trace and event selection for touch in one of the windows. This may lead
to memory corruptions as the array is overflown.
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit ced56f322ead10d1bc93fcd1f8e0ec3ae51292a3)
|
|
POINTER_SCREEN coordinates are screen-relative. For a Zaphod setup, the
coordinates after a screen crossing are already relative to the new screen's
origin. Add that offset to the coordinates before re-setting.
regression introduced by
commit bafbd99080be49a17be97d2cc758fbe623369945
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date: Wed Aug 8 11:34:32 2012 +1000
dix: work around scaling issues during WarpPointer (#53037)
X.Org Bug 54654 <http://bugs.freedesktop.org/show_bug.cgi?id=54654>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit e7cd5cce740e653000fb1192b600268dcf77dde2)
|
|
If a client is still waiting for the TouchBegin, don't deliver a TouchEnd
event.
X.Org Bug 55738 <http://bugs.freedesktop.org/show_bug.cgi?id=55738>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Tested-by: Thomas Jaeger <thjaeger@gmail.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 676447190190d8546165e21be242cf16dd69f5ae)
|
|
For button release events, the current code picks the VCK. Because that has
a XKB struct, it thinks this is a PointerKeys event and proceeds to send the
release event through the XTest pointer. That has no effect in normal
operation as the button is never down and an attempt is silently discarded
(normal event processing continues with the VCP).
On server shutdown, the XTest device is already removed, leading to a
null-pointer derefernce when the device is checked for whether buttons are
down (XkbFakeDeviceButton → button_is_down(xtest pointer)).
The current state has only worked by accident, the right approach here is to
handle the VCP's event as such and not switch to the keyboard.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 2decff6393a44b56d80d53570718f95354fde454)
|
|
Otherwise:
* We can't end the touches while device is disabled
* New touches after enabling the device may erroneously be mapped to old
logical touches
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 3b67cd26149eb991b5f015061a818af65369e668)
|
|
A disabled device doesn't have a sprite (less so a sprite->win) and triggers
a NULL-pointer dereference on shutdown when all active grabs are released as
part of the cleanup.
Fix this by checking for sprite being non-null and setting the focus window
to the NullWindow if it is. The rest of the patch just attempts to make
things more readable.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 4b7f00346daed20c96f3e8ea13ae411858a5424b)
|
|
git://people.freedesktop.org/~airlied/xserver into server-1.13-branch
|
|
If we are not seat 0 the following apply:
don't probe any bus other than platform
don't probe any drivers other than platform
assume the first platform device we match on the bus is the primary GPU.
This just adds checks in the correct places to ensure this, and
with this X can now start on a secondary seat for an output device.
v2: fix Seat0 macros
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 70e5766874a919039678bb2ed75f2ccea0cb4345)
|
|
for input devices we handle change like remove/add, but for
drm devices we get change events when we hotplug outputs,
so lets just ignore change at this level, and let the drivers
handle it. We may in the future want to route driver udev
from here instead.
Reported-by: Timo Aaltonen <timo.aaltonen@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit e0b92f5f86f8ce71ab4c80e9902e51e2525f9705)
|
|
This solves a race if we are trying to dynamically power off
secondary GPUs. Its not the greatest fix ever but it probably
as good as we can do for now.
The GPU probing causes the devices to be powered up, then when
we scan the PCI bus we get the correct information from the kernel,
rather than a bunch of 0xff due to the device being powered off.
drop gratuitous '&'.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 10672a5abe7d4e924844d7e41c86c24d6367a52b)
|
|
After we share the pixmap, the backing storage may have changed,
and we need to invalidate and buffers pointing at it.
This fixes GL compositors and prime windows lacking contents initially.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 22746df15b5f75dc85f5cf5b73932eb8a44cb89b)
|
|
git://people.freedesktop.org/~jturney/xserver into server-1.13-branch
|
|
Add some missing header files to _SOURCES so they get distributed properly
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
(cherry picked from commit a69429a17bf4630f6e26f61630a1c2b287202627)
|
|
Fix compilation of Xorg DDX without XF86VIDMODE since 6e74fdda, by putting
xf86vmode.c back under the XF86VIDMODE automake conditional it was accidentally
taken out of.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Tested-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
(cherry picked from commit 1d9fd7ffb03ff6e44f3a8736a94e4558203ce607)
|
|
Using of LoadExtension() to add GLX onto to the end of the list of extensions on
every server regeneration leads to hilarious consequences (i.e. crashing) after
the first regeneration :-)
Possibly xf86ExtensionInit() and QuartzExtensionInit() need a similar fix.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
Tested-by: Colin Harrison <colin.harrison@virgin.net>
(cherry picked from commit 25741b1aa3a0fb39cb842a43ab52935673cfdefa)
|
|
A display number, not a port number, is written to the specified fd.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 7ceb85481280fecbf033f147f0f7834cad3890c6)
|
|
This call is required for external drivers (specifically NVIDIA) that do
not share the xfree86 infrastructure to update the desktop dimensions.
Without it, the driver would update the ScreenRecs but not update the total
dimensions the input code relies on for transformation.
This call is a thin wrapper around the already-existing internal call and
should be backported to all stable series servers, with the minor ABI bump.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
CC: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
(cherry picked from commit 0a75bd640b3dc26b89d9e342999a7f4b7e98edbf)
Conflicts:
hw/xfree86/common/xf86Module.h
|
|
Scale_to_desktop() converts ABS events from device coordinates
to screen coordinates:
[dev_X_min, dev_X_max] -> [screen_X_min, screen_X_max]
[dev_Y_min, dev_Y_max] -> [screen_Y_min, screen_Y_max]
An edge ABS event with X = dev_X_max (e.g., generated from the
edge of a touchscreen) will be converted to have screen X value
= screen_X_max, which, however, will be filterd out when xserver
tries to find proper Window to receive the event, because the
range check for a Window to receive events is
window_X_min <= event_screen_X < window_X_max
Events with event_screen_X = screen_X_max will fail the test get
and rejected by the Window.
To fix this, we change the device to screen coordinates mapping to
[dev_X_min, dev_X_max] -> [screen_X_min, screen_X_max-1]
[dev_Y_min, dev_Y_max] -> [screen_Y_min, screen_Y_max-1]
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Signed-off-by: Yufeng Shen <miletus@chromium.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 0b02150c27e98f996e10d7489f9f67a30e4e3497)
|
|
This flag is never set, so checking for it here means that we'll
never release the simulated mouse button press after the user touches
(and releases) the touchscreen for the first time.
Fixes a problem where the XO laptop touchpad became totally
unusable after touching the screen for the first time (since X then
behaved as if the mouse button was held down all the time).
Signed-off-by: Daniel Drake <dsd@laptop.org>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 3e6358ee6c33979329b78fe2097a1fdf76fb69cd)
|
|
If the device is disabled, the sprite window is NULL and dereferencing
crashes the server.
This is only triggered for XI 1.x grabs (ProcXGrabDevice) as XI2 grabs would
trigger another code path, creating a sprite for the disabled device as if
detaching it (which is wrong and fixed with this patch too).
Grabbing a disabled device doesn't make sense as it won't send events
anyway. However, the protocol specs do not prohibit it, so we need to keep
it working.
Luckily, oldWin is only used for focus out events, which aren't necessary
given that the device is disabled.
X.Org Bug 54934 <http://bugs.freedesktop.org/show_bug.cgi?id=54934>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
(cherry picked from commit 9d6b8365702e4648e793fea21ad22f7174558680)
|
|
Given the following scenario:
1) client A selects for TouchBegin on window W for device D
2) client B selects for TouchBegin on window W for XIAllDevices
3) client C selects for TouchBegin on window W with device E
Step 3 will fail with BadImplementation, because attempting to look up
XIAllDevices or XIAllMasterDevices with dixLookupDevices doesn't work.
This should succeed (or, if it was selecting for device D, fail with
BadAccess as it would be a duplicate selection).
Fix this by performing the appropriate lookup for virtual devices.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
(cherry picked from commit 3d2b768efae9936c6929c2bc13c7a1acc074ecd3)
|
|
The property handler is registered after setting the property, so
dev->transform remains as all-zeros. That causes pixman_f_transform_invert()
to fail (in transformAbsolute()) and invert remains as garbage. This
may then cause a cursor jump to 0,0.
Since the axes are not yet initialized here and we need to allow for drivers
changing the matrix, we cannot use the property handler for matrix
initialization, essentially duplicating the code.
Triggered by the fix to (#49347) in 749a593e49adccdf1225be28a521412ec85333f4
https://bugzilla.redhat.com/show_bug.cgi?id=852841
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 3d1051aecbb1955084804133cacd12c7f696833a)
|
|
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
|
|
Otherwise we can't do fast user switch properly for multiple GPUs.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This respects the seat tag for hotplugged video devices at X start.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
this is a simple clean-up that is useful to stop further propogation
of this construct.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
If we don't free this here, it gets freed later in the resource
cleanups, however it then looks up up pmap->pScreen, which we
freed already in this function. So free the default colormap
when we should.
This fixes a bug after a couple of hotplug cycles when you try
to exit the X server and it crashes.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
This is set by pre_init not screen init, so if we free it here
and then recycle the server, we lose all the providers.
I think we need to wrap FreeScreen here to do this properly,
will investigate for 1.14 most likely, safer to just leak this
on server exit for now.
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Some compilers have difficulty with the previous implementation which
relies on undefined behavior according to the C standard. Using
offsetof() from <stddef.h> (which most likely just uses
__builtin_offsetof on modern compilers) allows us to accomplish this
without ambiguity.
This fix also requires support for typeof(). If your compiler does not
support typeof(), then the old implementation will be used. If you see
failures in test/list, please try a more modern compiler.
v2: Added fallback if typeof() is not present.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
This is a a gcc 4.6+ feature.
signal-logging.c:210: error: #pragma GCC diagnostic not allowed inside
functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
We never use child[2], so it's state is undefined.
This issue seems to have existed since the test was first
written: 92788e677be79bd04e5ef140f4ced50ad8b1bf8e
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|
|
sighandler_t is not UNIX.
Regression from: 7f09126e068015db54c56bb982b8f91065375700
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
|
|
|
|
Introduced in 164b38c72fe9c69d13ea4f9c46d4ccc46566d826
Reported-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
As of 81cfe44b1ed0de84ad1941fe2ca74bebef3fc58d, miPointerSetPosition now
returns the screen pointer of the device. This broke floating slave devices,
as soon as a motion event was submitted, miPointerSetPosition returned NULL,
crashing the server.
dev->coreEvents is only false if the device is a floating slave, in which
case it has a sprite.
X.Org Bug 53568 <http://bugs.freedesktop.org/show_bug.cgi?id=53568>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
RC with updated ABI version numbers.
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
In WarpPointer calls, we get input in screen coordinates. They must be
scaled to device coordinates, and then back to screen coordinates for screen
crossing and root coordinates in events.
The rounding errors introduced (and clipping in core/XI 1.x events) can lead
to the actual position being different to the requested input coordinates.
e.g. 200 scales to 199.9999, truncated to 199 in the event.
Avoid this by simply overwriting the scaled screen coordinates with the
input coordinates for the POINTER_SCREEN case.
X.Org Bug 53037 <http://bugs.freedesktop.org/show_bug.cgi?id=53037>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
|
|
Throw an error into the log file, but continue anyway. And after three
warnings, stop complaining. Not all input drivers will be fixed in time (or
ever) and our printf implementation is vastly inferior, so there is still a
use-case for non-sigsafe logging.
This also adds more linebreaks to the message.
CC: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
The mouse driver uses %i in some debug messages
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Throw an assert when the conversion fails instead of just returning. Asserts
are more informative.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
|
|
Commit 9d457f9c55f12106ba44c1c9db59d14f978f0ae8 added an array of
DevPrivateSetRec structures in the middle of the ScreenRec, which throws off
extension modules trying to call things like pScreen->DestroyPixmap.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
This change is #if'd out due to a bug in asl_log_descriptor, but
it is left here as reference to be enabled in the future.
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
|