[mutter] Allow the compositor to see ButtonPress events for buttons 4 or 5
- From: Tomas Frydrych <tomasf src gnome org>
- To: svn-commits-list gnome org
- Subject: [mutter] Allow the compositor to see ButtonPress events for buttons 4 or 5
- Date: Tue, 5 May 2009 04:51:35 -0400 (EDT)
commit 90c35f8181e5fdc10e70fe7aa17d055ce3aada48
Author: Tomas Frydrych <tf linux intel com>
Date: Tue May 5 09:46:36 2009 +0100
Allow the compositor to see ButtonPress events for buttons 4 or 5
---
src/core/display.c | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/src/core/display.c b/src/core/display.c
index 919bd28..5920047 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1475,14 +1475,7 @@ event_callback (XEvent *event,
modified = event_get_modified_window (display, event);
- if (event->type == ButtonPress)
- {
- /* filter out scrollwheel */
- if (event->xbutton.button == 4 ||
- event->xbutton.button == 5)
- return FALSE;
- }
- else if (event->type == UnmapNotify)
+ if (event->type == UnmapNotify)
{
if (meta_ui_window_should_not_cause_focus (display->xdisplay,
modified))
@@ -1625,7 +1618,18 @@ event_callback (XEvent *event,
meta_display_process_key_event (display, window, event);
break;
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) &&
display->grab_button != (int) event->xbutton.button &&
display->grab_window == window) ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]