After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754837 - Window can't be dragged after clicking on the game view
Window can't be dragged after clicking on the game view
Status: RESOLVED FIXED
Product: gnome-mahjongg
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-mahjongg-maint
gnome-mahjongg-maint
Depends on:
Blocks:
 
 
Reported: 2015-09-10 14:05 UTC by Carlos Garnacho
Modified: 2015-09-11 17:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set button release event mask on GameView (1.02 KB, patch)
2015-09-10 14:05 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2015-09-10 14:05:04 UTC
Alas, GTK+ still uses the target widget/window event masks to determine whether sending the event across the hierarchy at all, despite the events being possibly interesting to other widgets in the hierarchy that might be paralelly handling the events.

This is visible on GameView and its parent GtkWindow: GameView sets the button press mask on its window, but not the button release one. This makes the GtkWindow dragging gesture stuck as there's no matching release, so at the next time(s) the gesture will already be busy, preventing window dragging from happening.

Adding the button release mask to the GameView widget fixes this, even if the widget itself is not interested in handling it, this will make it educated wrt other widgets that might want those events paired.
Comment 1 Carlos Garnacho 2015-09-10 14:05:26 UTC
Created attachment 311083 [details] [review]
Set button release event mask on GameView

This is needed to ensure a meaningful event propagation across
the parents of GameView. Otherwise the window dragging gesture
will be left in an inconsistent state, and stuck for the next
time as the button release event won't be received.
Comment 2 Michael Catanzaro 2015-09-10 15:23:05 UTC
Review of attachment 311083 [details] [review]:

This is broken in almost every game I tested, so please don't close this bug, but leave it open so that I can piggyback fixes for the other games here, instead of opening a dozen separate bugs.

Thanks a bunch; we would never have figured this out. I hadn't even noticed the problem yet, but I guess I haven't played many games since the gestures work landed.
Comment 3 Carlos Garnacho 2015-09-10 15:34:51 UTC
Comment on attachment 311083 [details] [review]
Set button release event mask on GameView

Sure :).

Attachment 311083 [details] pushed as 375d980 - Set button release event mask on GameView
Comment 4 Michael Catanzaro 2015-09-11 17:39:30 UTC
I fixed:

Chess
Five or More
Four-in-a-row
Iagno
Lights Off
Mahjongg
Robots
Sudoku
Taquin

Other games were unaffected.
Comment 5 Michael Catanzaro 2015-09-11 17:39:42 UTC
Well, you fixed Mahjongg ;)