GNOME Bugzilla – Bug 732143
ClutterDropAction "drop" signal not emitted
Last modified: 2014-06-26 00:34:00 UTC
Hello, I'm Arch Linux user using Clutter 1.18.2 version. examples/drop-action.c in Clutter source tree doesn't work properly, because "drop" signal is not emitted from ClutterDropAction. it works properly in Clutter 1.16 version, so I checked clutter-drop-action.c and have found that CLUTTER_BUTTON1_MASK is not set for CLUTTER_BUTTON_RELEASE event. In my case, reverting the following commit is the solution. commit c2b0b9aace969ecb19e703c8d53d157eb1072559 Author: Jasper St. Pierre <jstpierre@mecheye.net> Date: Tue Nov 12 15:10:22 2013 -0500 input-device-xi2: Calculate the correct state for button events The state that the X server sends for button events, by specification, contains the button state before the event. We need to synthesize in the result of the event in order to determine what the current button state is. https://bugzilla.gnome.org/show_bug.cgi?id=712322 But, I don't know what is the exact solution for this problem.
Created attachment 279224 [details] [review] drop-action: Use the right state for events The 'state' field should be used for pointer events without button information. Pointer events that have button information should use the 'button' field.
thanks for the bug report. the bug is actually in the DropAction: it's using the event state to check if the pointer event has a button mask set, but in reality what we get from the windowing system is the old state, but Clutter provides the new one. bug 712322 addressed this inconsistency in Clutter's implementation. to be fair, the whole issue is pretty fuzzy, especially given the impedance mismatch between supported windowing systems. in any case, while checking the event state is needed for the MOTION event, the BUTTON_RELEASE event has the button information directly in the structure. we should use the right field for each pointer event. while we figure out what can we do to avoid breakage at the event handling level, let me address the DropAction regression.
Thanks for your work. Have you any plan to apply this patch in next stable 1.18.x release?
yes; I kept the bug open for that while I was spinning the 1.19.4 snapshot. after talking to Jasper, we came to the conclusion that the previous behaviour was buggy: the commit you linked brings the XInput2 backend on par with what the core Xlib code does.
Attachment 279224 [details] pushed as 6eafd62 - drop-action: Use the right state for events