mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 18:09:10 +00:00
Allow the compositor to see ButtonPress events for buttons 4 or 5
This commit is contained in:
parent
2a8c160569
commit
90c35f8181
@ -1475,14 +1475,7 @@ event_callback (XEvent *event,
|
|||||||
|
|
||||||
modified = event_get_modified_window (display, event);
|
modified = event_get_modified_window (display, event);
|
||||||
|
|
||||||
if (event->type == ButtonPress)
|
if (event->type == UnmapNotify)
|
||||||
{
|
|
||||||
/* filter out scrollwheel */
|
|
||||||
if (event->xbutton.button == 4 ||
|
|
||||||
event->xbutton.button == 5)
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
else if (event->type == UnmapNotify)
|
|
||||||
{
|
{
|
||||||
if (meta_ui_window_should_not_cause_focus (display->xdisplay,
|
if (meta_ui_window_should_not_cause_focus (display->xdisplay,
|
||||||
modified))
|
modified))
|
||||||
@ -1625,7 +1618,18 @@ event_callback (XEvent *event,
|
|||||||
meta_display_process_key_event (display, window, event);
|
meta_display_process_key_event (display, window, event);
|
||||||
break;
|
break;
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
if ((window &&
|
if (event->xbutton.button == 4 || event->xbutton.button == 5)
|
||||||
|
{
|
||||||
|
if (display->compositor && window)
|
||||||
|
{
|
||||||
|
return meta_compositor_process_event (display->compositor,
|
||||||
|
event,
|
||||||
|
window);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
else if ((window &&
|
||||||
grab_op_is_mouse (display->grab_op) &&
|
grab_op_is_mouse (display->grab_op) &&
|
||||||
display->grab_button != (int) event->xbutton.button &&
|
display->grab_button != (int) event->xbutton.button &&
|
||||||
display->grab_window == window) ||
|
display->grab_window == window) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user