[nautilus/wip/antoniof/experimental-gtk4-build: 12/52] gdk_event_get_state -> gdk_event_get_modifier_state




commit 06c5bff6dee5919b53069511dc4ab96b6063fb15
Author: António Fernandes <antoniof gnome org>
Date:   Sun Dec 19 18:46:20 2021 +0000

    gdk_event_get_state -> gdk_event_get_modifier_state

 src/nautilus-list-view.c | 6 +++---
 src/nautilus-pathbar.c   | 2 +-
 src/nautilus-window.c    | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 1186c3f91..d410efbc0 100644
--- a/src/nautilus-list-view.c
+++ b/src/nautilus-list-view.c
@@ -233,7 +233,7 @@ button_event_modifies_selection (const GdkEvent *event)
 {
     GdkModifierType state;
 
-    gdk_event_get_state (event, &state);
+    state = gdk_event_get_modifier_state (event);
 
     return (state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) != 0;
 }
@@ -619,7 +619,7 @@ on_tree_view_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
         g_autoptr (GtkTreePath) cursor = NULL;
         GList *selected_rows = NULL;
 
-        gdk_event_get_state (event, &state);
+        state = gdk_event_get_modifier_state (event);
 
         /* We cannot easily match the expected behavior of Shift+click, so we
          * must fall back to GtkTreeView's default event handling.
@@ -770,7 +770,7 @@ on_tree_view_multi_press_gesture_released (GtkGestureMultiPress *gesture,
         return;
     }
 
-    gdk_event_get_state (event, &state);
+    state = gdk_event_get_modifier_state (event);
 
     if ((button == GDK_BUTTON_PRIMARY || button == GDK_BUTTON_MIDDLE)
         && ((state & GDK_CONTROL_MASK) != 0 ||
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 3be79bab3..e12b5ce5d 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -578,7 +578,7 @@ on_multi_press_gesture_pressed (GtkGestureMultiPress *gesture,
     button_data = BUTTON_DATA (user_data);
     self = button_data->path_bar;
     current_button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
-    gtk_get_current_event_state (&state);
+    state = gtk_event_controller_get_current_event_state (GTK_EVENT_CONTROLLER (gesture));
 
     switch (current_button)
     {
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index 1e1d6c70d..d8b487f5d 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -1809,7 +1809,7 @@ notebook_button_press_cb (GtkGestureMultiPress *gesture,
     button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
     sequence = gtk_gesture_single_get_current_sequence (GTK_GESTURE_SINGLE (gesture));
     event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
-    gdk_event_get_state (event, &state);
+    state = gdk_event_get_modifier_state (event);
 
     if (button == GDK_BUTTON_SECONDARY &&
         (state & gtk_accelerator_get_default_mod_mask ()) == 0)


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