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
This commit is contained in:
parent
b3b81c8c20
commit
1fd5dec11b
|
@ -1874,7 +1874,7 @@ int
|
||||||
GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
|
GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
|
||||||
uint16_t type, uint32_t flags, const ValuatorMask *mask_in)
|
uint16_t type, uint32_t flags, const ValuatorMask *mask_in)
|
||||||
{
|
{
|
||||||
ScreenPtr scr = dev->spriteInfo->sprite->hotPhys.pScreen;
|
ScreenPtr scr;
|
||||||
TouchClassPtr t = dev->touch;
|
TouchClassPtr t = dev->touch;
|
||||||
ValuatorClassPtr v = dev->valuator;
|
ValuatorClassPtr v = dev->valuator;
|
||||||
DeviceEvent *event;
|
DeviceEvent *event;
|
||||||
|
@ -1989,6 +1989,8 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid,
|
||||||
if (need_rawevent)
|
if (need_rawevent)
|
||||||
set_raw_valuators(raw, &mask, FALSE, raw->valuators.data);
|
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.
|
/* Indirect device touch coordinates are not used for cursor positioning.
|
||||||
* They are merely informational, and are provided in device coordinates.
|
* They are merely informational, and are provided in device coordinates.
|
||||||
* The device sprite is used for positioning instead, and it is already
|
* The device sprite is used for positioning instead, and it is already
|
||||||
|
|
Loading…
Reference in New Issue