mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 21:16:50 +03:00
Pass mouse buttons to core correctly.
svn path=/trunk/netsurf/; revision=10192
This commit is contained in:
parent
974f42f8cf
commit
dd2b9e4b19
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user