Pass mouse buttons to core correctly.

svn path=/trunk/netsurf/; revision=10192
This commit is contained in:
Michael Drake 2010-03-28 19:21:47 +00:00
parent 974f42f8cf
commit dd2b9e4b19

View File

@ -459,14 +459,23 @@ gboolean nsgtk_window_button_press_event(GtkWidget *widget,
switch (event->button) {
case 1:
/* Left button, usually.
* Pass to core as BUTTON 1. */
g->mouse->state = BROWSER_MOUSE_PRESS_1;
break;
case 2:
/* Middle button, usually.
* Pass to core as BUTTON 2 */
g->mouse->state = BROWSER_MOUSE_PRESS_2;
break;
case 3:
/* Right button, usually.
* Front end action button -- context menu. */
browser_window_remove_caret(g->bw);
nsgtk_scaffolding_popup_menu(g->scaffold, g->mouse->pressed_x,
g->mouse->pressed_y);
g->mouse->state = BROWSER_MOUSE_PRESS_2;
break;
return TRUE;
default:
return FALSE;
}