summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorSean Fox <dyntryx@gmail.com>2009-01-30 22:38:39 +0000
committerSean Fox <dyntryx@gmail.com>2009-01-30 22:38:39 +0000
commitb132fba3994d5d2d51aa7f2a5c90c11a06a142f2 (patch)
tree70cf8660c5b90a81a9a7d1d65b1e2c9d76ccb2c3 /gtk
parent851111e929a74a3708bdab479e03527efc821869 (diff)
downloadnetsurf-b132fba3994d5d2d51aa7f2a5c90c11a06a142f2.tar.gz
netsurf-b132fba3994d5d2d51aa7f2a5c90c11a06a142f2.tar.bz2
Right-clicking a page now removes the browser caret as well, but isn't properly implemented; see todo.
svn path=/trunk/netsurf/; revision=6308
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtk_window.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/gtk/gtk_window.c b/gtk/gtk_window.c
index c9a926fe5..851f0ded9 100644
--- a/gtk/gtk_window.c
+++ b/gtk/gtk_window.c
@@ -372,8 +372,19 @@ gboolean nsgtk_window_button_press_event(GtkWidget *widget,
g->mouse->pressed_x = event->x / g->bw->scale;
g->mouse->pressed_y = event->y / g->bw->scale;
- if (event->button == 3){
- nsgtk_scaffolding_popup_menu(g->scaffold, g->mouse->pressed_x, g->mouse->pressed_y);
+ if (event->button == 3) {
+ /** \todo
+ * Firstly, MOUSE_PRESS_2 on GTK is a middle click, which doesn't
+ * appear correct to me. Secondly, right-clicks are not passed to
+ * browser_window_mouse_click() at all, which also seems incorrect
+ * since they should result in browser_window_remove_caret().
+ *
+ * I would surmise we need a MOUSE_PRESS_3, unless right-clicking is
+ * supposed to be mapped to MOUSE_PRESS_2, but that doesn't appear
+ * correct either.
+ */
+ browser_window_remove_caret(g->bw);
+ nsgtk_scaffolding_popup_menu(g->scaffold, g->mouse->pressed_x, g->mouse->pressed_y);
return TRUE;
}
@@ -389,7 +400,7 @@ gboolean nsgtk_window_button_press_event(GtkWidget *widget,
browser_window_mouse_click(g->bw, g->mouse->state, g->mouse->pressed_x,
g->mouse->pressed_y);
-
+
return TRUE;
}