diff options
author | Povilas Kanapickas <povilas@radix.lt> | 2021-05-30 13:26:39 +0300 |
---|---|---|
committer | Povilas Kanapickas <povilas@radix.lt> | 2021-05-30 13:26:39 +0300 |
commit | 7656a9c8dddbc57adfd4fd05f8e26b1845ac8738 (patch) | |
tree | 830397f7586ff0f2a15c79fd7cbe158d5fca95ff /Xi | |
parent | 0bf4123fd3bc945d150884e6ea38bd2b81c0994b (diff) |
dix: Implement internal gesture state handling
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/exevents.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 83ea387ab..16acd5814 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -691,6 +691,25 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) /* Don't remove touch class if from->touch is non-existent. The to device * may have an active touch grab, so we need to keep the touch class record * around. */ + + if (from->gesture) { + if (!to->gesture) { + classes = to->unused_classes; + to->gesture = classes->gesture; + if (!to->gesture) { + if (!InitGestureClassDeviceStruct(to, from->gesture->max_touches)) + FatalError("[Xi] no memory for class shift.\n"); + } + else + classes->gesture = NULL; + } + + to->gesture->sourceid = from->gesture->sourceid; + /* to->gesture->gesture is separate on the master, don't copy */ + } + /* Don't remove gesture class if from->gesture is non-existent. The to device + * may have an active gesture grab, so we need to keep the gesture class record + * around. */ } /** |