summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorFelix Riemann <friemann@gnome.org>2012-04-06 17:49:43 +0200
committerFelix Riemann <friemann@gnome.org>2012-04-06 18:02:45 +0200
commit0815e9eb2232fc8734622d2254d64774aadecd62 (patch)
tree253da62227a454a5b80539bd064250eef39cd2dc /plugins
parent5fcbe0c8d1048c233de70b75724a6eb427c2d55c (diff)
downloadeog-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.c8
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)