GNOME Bugzilla – Bug 674673
preview action is on mouse down instead of mouse up
Last modified: 2016-03-31 13:54:44 UTC
In the Boxes overview we start animating into the box on mouse down instead of mouse up. That is pretty unusual and unfriendly because it doesn't allow the user to change their mind or do drag and drop or any other gesture.
Created attachment 216098 [details] [review] preview action is on mouse down instead of mouse up Activate item on button release event, instead of press event. We may want to check if the release event is on the same item as the press event, to confirm action.
Review of attachment 216098 [details] [review]: ACK otherwise ::: src/util.vala @@ -148,3 +148,3 @@ Gtk.TreePath? path; - if (event.button == 1 && event.type == Gdk.EventType.BUTTON_PRESS) { + if (event.button == 1 && event.type == Gdk.EventType.BUTTON_RELEASE) { Why do we check for the event type if this is handler for only this type of event?
Review of attachment 216098 [details] [review]: ::: src/util.vala @@ -148,3 +148,3 @@ Gtk.TreePath? path; - if (event.button == 1 && event.type == Gdk.EventType.BUTTON_PRESS) { + if (event.button == 1 && event.type == Gdk.EventType.BUTTON_RELEASE) { there is various BUTTONn_PRESS, but there is a single BUTTON_RELEASE, so we can drop that redundant check.
(In reply to comment #3) > Review of attachment 216098 [details] [review]: > > ::: src/util.vala > @@ -148,3 +148,3 @@ > Gtk.TreePath? path; > > - if (event.button == 1 && event.type == > Gdk.EventType.BUTTON_PRESS) { > + if (event.button == 1 && event.type == > Gdk.EventType.BUTTON_RELEASE) { > > there is various BUTTONn_PRESS, but there is a single BUTTON_RELEASE, so we can > drop that redundant check. ACK with that redundant check removed then.