[eog] fullscreen: Check if clicks originated from over the image



commit 0815e9eb2232fc8734622d2254d64774aadecd62
Author: Felix Riemann <friemann gnome org>
Date:   Fri Apr 6 17:49:43 2012 +0200

    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

 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 e801f88..fad2677 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)



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