mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-25 05:27:00 +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) {
|
switch (event->button) {
|
||||||
case 1:
|
case 1:
|
||||||
|
/* Left button, usually.
|
||||||
|
* Pass to core as BUTTON 1. */
|
||||||
g->mouse->state = BROWSER_MOUSE_PRESS_1;
|
g->mouse->state = BROWSER_MOUSE_PRESS_1;
|
||||||
break;
|
break;
|
||||||
|
case 2:
|
||||||
|
/* Middle button, usually.
|
||||||
|
* Pass to core as BUTTON 2 */
|
||||||
|
g->mouse->state = BROWSER_MOUSE_PRESS_2;
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
/* Right button, usually.
|
||||||
|
* Front end action button -- context menu. */
|
||||||
browser_window_remove_caret(g->bw);
|
browser_window_remove_caret(g->bw);
|
||||||
nsgtk_scaffolding_popup_menu(g->scaffold, g->mouse->pressed_x,
|
nsgtk_scaffolding_popup_menu(g->scaffold, g->mouse->pressed_x,
|
||||||
g->mouse->pressed_y);
|
g->mouse->pressed_y);
|
||||||
g->mouse->state = BROWSER_MOUSE_PRESS_2;
|
g->mouse->state = BROWSER_MOUSE_PRESS_2;
|
||||||
break;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user