diff options
author | Felix Riemann <friemann@gnome.org> | 2012-04-06 17:49:43 +0200 |
---|---|---|
committer | Felix Riemann <friemann@gnome.org> | 2012-04-06 18:02:45 +0200 |
commit | 0815e9eb2232fc8734622d2254d64774aadecd62 (patch) | |
tree | 253da62227a454a5b80539bd064250eef39cd2dc /plugins | |
parent | 5fcbe0c8d1048c233de70b75724a6eb427c2d55c (diff) | |
download | eog-0815e9eb2232fc8734622d2254d64774aadecd62.tar.gz |
fullscreen: Check if clicks originated from over the image
This avoids going fullscreen by clicking the scrollbars.
https://bugzilla.gnome.org/show_bug.cgi?id=579595
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/fullscreen/eog-fullscreen-plugin.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/fullscreen/eog-fullscreen-plugin.c b/plugins/fullscreen/eog-fullscreen-plugin.c index e801f889..fad26773 100644 --- a/plugins/fullscreen/eog-fullscreen-plugin.c +++ b/plugins/fullscreen/eog-fullscreen-plugin.c @@ -27,10 +27,16 @@ enum { }; static gboolean -on_button_press (GtkWidget *button, GdkEventButton *event, EogWindow *window) +on_button_press (GtkWidget *widget, GdkEventButton *event, EogWindow *window) { + EogScrollView *view = EOG_SCROLL_VIEW (widget); + if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) { EogWindowMode mode = eog_window_get_mode (window); + GdkEvent *ev = (GdkEvent*) event; + + if(!eog_scroll_view_event_is_over_image (view, ev)) + return FALSE; if (mode == EOG_WINDOW_MODE_SLIDESHOW || mode == EOG_WINDOW_MODE_FULLSCREEN) |