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 674673 - preview action is on mouse down instead of mouse up
preview action is on mouse down instead of mouse up
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-04-23 23:47 UTC by William Jon McCann
Modified: 2016-03-31 13:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
preview action is on mouse down instead of mouse up (1.38 KB, patch)
2012-06-11 10:36 UTC, Marc-Andre Lureau
reviewed Details | Review

Description William Jon McCann 2012-04-23 23:47:53 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.
Comment 1 Marc-Andre Lureau 2012-06-11 10:36:57 UTC
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.
Comment 2 Zeeshan Ali 2012-06-11 15:39:48 UTC
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?
Comment 3 Marc-Andre Lureau 2012-06-11 15:45:12 UTC
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.
Comment 4 Zeeshan Ali 2012-06-11 16:53:34 UTC
(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.