From 0c0e988ea5e1109066c5d65dfb10dff0faa8a70c Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 12 Feb 2013 13:20:36 +0000 Subject: [PATCH] Pass double and triple clicks to the browser window. --- gtk/window.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/window.c b/gtk/window.c index 8a3a085f3..d8a9dd43d 100644 --- a/gtk/window.c +++ b/gtk/window.c @@ -321,6 +321,12 @@ static gboolean nsgtk_window_button_press_event(GtkWidget *widget, return FALSE; } + /* Modify for double & triple clicks */ + if (event->type == GDK_3BUTTON_PRESS) + g->mouse.state |= BROWSER_MOUSE_TRIPLE_CLICK; + else if (event->type == GDK_2BUTTON_PRESS) + g->mouse.state |= BROWSER_MOUSE_DOUBLE_CLICK; + /* Handle the modifiers too */ if (event->state & GDK_SHIFT_MASK) g->mouse.state |= BROWSER_MOUSE_MOD_1; @@ -358,7 +364,7 @@ static gboolean nsgtk_window_button_release_event(GtkWidget *widget, if (g->mouse.state & BROWSER_MOUSE_MOD_2 && !ctrl) g->mouse.state ^= BROWSER_MOUSE_MOD_2; - if (g->mouse.state & (BROWSER_MOUSE_CLICK_1|BROWSER_MOUSE_CLICK_2)) { + if (g->mouse.state & (BROWSER_MOUSE_CLICK_1 | BROWSER_MOUSE_CLICK_2)) { browser_window_mouse_click(g->bw, g->mouse.state, event->x / g->bw->scale, event->y / g->bw->scale);