GNOME Bugzilla – Bug 754837
Window can't be dragged after clicking on the game view
Last modified: 2015-09-11 17:39:42 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.
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.
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 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
I fixed: Chess Five or More Four-in-a-row Iagno Lights Off Mahjongg Robots Sudoku Taquin Other games were unaffected.
Well, you fixed Mahjongg ;)