[gnome-boxes] Display action is on mouse down instead of mouse up



commit e05b7b301974bb771bc2bd6985c6b3ad9abc970d
Author: Marc-Andrà Lureau <marcandre lureau gmail com>
Date:   Mon Jun 11 12:35:34 2012 +0200

    Display 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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=674673

 src/util.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/util.vala b/src/util.vala
index 1c49873..2060905 100644
--- a/src/util.vala
+++ b/src/util.vala
@@ -144,10 +144,10 @@ namespace Boxes {
             icon_view.disconnect (id);
             icon_view.set_data<ulong> ("boxes-icon-view-activate", 0);
         } else if (id == 0 && should_activate) {
-            id = icon_view.button_press_event.connect ((w, event) => {
+            id = icon_view.button_release_event.connect ((w, event) => {
                 Gtk.TreePath? path;
 
-                if (event.button == 1 && event.type == Gdk.EventType.BUTTON_PRESS) {
+                if (event.button == 1) {
                     path = icon_view.get_path_at_pos ((int) event.x, (int) event.y);
                     if (path != null)
                         icon_view.item_activated (path);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]