diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-02-17 22:11:56 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-02-21 00:51:03 -0500 |
commit | b1eaa502dfda1dd727e938ce710c3861f1cad8fe (patch) | |
tree | 3cb71e60ccf5c6fdae527c9c4ef2e9bee8f0cd15 /gtk/gtkiconview.c | |
parent | f1cf0eb3fc95c94d5594aa700cbcb12bc32ebc43 (diff) | |
download | gtk+-b1eaa502dfda1dd727e938ce710c3861f1cad8fe.tar.gz |
events: reorganize getters
Restructure the getters for event fields to
be more targeted at particular event types.
Update all callers, and replace all direct
event struct access with getters.
As a side-effect, this drops some unused getters.
Diffstat (limited to 'gtk/gtkiconview.c')
-rw-r--r-- | gtk/gtkiconview.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 1773e0fa73..0efac0bac5 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -2133,12 +2133,12 @@ gtk_icon_view_button_press (GtkGestureClick *gesture, if (!gtk_widget_has_focus (widget)) gtk_widget_grab_focus (widget); - if (button == GDK_BUTTON_PRIMARY && - gdk_event_get_state ((GdkEvent *) event, &state)) + if (button == GDK_BUTTON_PRIMARY) { GdkModifierType extend_mod_mask; GdkModifierType modify_mod_mask; + state = gdk_event_get_modifier_state ((GdkEvent *)event); extend_mod_mask = gtk_widget_get_modifier_mask (widget, GDK_MODIFIER_INTENT_EXTEND_SELECTION); @@ -2279,7 +2279,7 @@ button_event_modifies_selection (GdkEventButton *event) { guint state; - gdk_event_get_state ((GdkEvent *) event, &state); + state = gdk_event_get_modifier_state ((GdkEvent *) event); return (state & (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) != 0; } |