xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Sep 9 09:45:24 UTC 2021
dix/getevents.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 1fd5dec11bbb85e87f70a39f1c1b59af95a7feaf
Author: Ignacio Casal Quinteiro <qignacio at amazon.com>
Date: Tue Sep 7 16:58:10 2021 +0200
touchevents: set the screen pointer after checking the device is enabled
If the device is disabled the sprite is NULL so we get a seg fault
diff --git a/dix/getevents.c b/dix/getevents.c
index 368e0fb2a..32bafe285 100644
--- a/dix/getevents.c
+++ b/dix/getevents.c
@@ -1874,7 +1874,7 @@ int
GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
uint16_t type, uint32_t flags, const ValuatorMask *mask_in)
{
- ScreenPtr scr = dev->spriteInfo->sprite->hotPhys.pScreen;
+ ScreenPtr scr;
TouchClassPtr t = dev->touch;
ValuatorClassPtr v = dev->valuator;
DeviceEvent *event;
@@ -1989,6 +1989,8 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
if (need_rawevent)
set_raw_valuators(raw, &mask, FALSE, raw->valuators.data);
+ scr = dev->spriteInfo->sprite->hotPhys.pScreen;
+
/* Indirect device touch coordinates are not used for cursor positioning.
* They are merely informational, and are provided in device coordinates.
* The device sprite is used for positioning instead, and it is already
More information about the xorg-commit
mailing list