[mutter/wip/focus: 2/5] display: Return TRUE when we've handled an X event appropriately
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/focus: 2/5] display: Return TRUE when we've handled an X event appropriately
- Date: Wed, 26 Feb 2014 00:52:32 +0000 (UTC)
commit abb9b4249a8add3cb8d46a6eaa2f0290b153fca7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Feb 25 19:41:18 2014 -0500
display: Return TRUE when we've handled an X event appropriately
We need to do this to make sure events aren't improperly sent
to Clutter in the next commit.
src/core/display.c | 41 +++++++++++++++++++++++++++--------------
1 files changed, 27 insertions(+), 14 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index 98717d1..869577b 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -2483,17 +2483,20 @@ handle_input_xevent (MetaDisplay *display,
op = META_GRAB_OP_NONE;
if (op != META_GRAB_OP_NONE)
- meta_display_begin_grab_op (display,
- window->screen,
- window,
- op,
- TRUE,
- FALSE,
- device_event->detail,
- 0,
- device_event->time,
- device_event->root_x,
- device_event->root_y);
+ {
+ meta_display_begin_grab_op (display,
+ window->screen,
+ window,
+ op,
+ TRUE,
+ FALSE,
+ device_event->detail,
+ 0,
+ device_event->time,
+ device_event->root_x,
+ device_event->root_y);
+ return TRUE;
+ }
}
}
else if (device_event->detail == meta_prefs_get_mouse_button_menu())
@@ -2505,6 +2508,7 @@ handle_input_xevent (MetaDisplay *display,
device_event->root_y,
device_event->detail,
device_event->time);
+ return TRUE;
}
if (!frame_was_receiver && unmodified)
@@ -2533,6 +2537,7 @@ handle_input_xevent (MetaDisplay *display,
device_event->time,
device_event->root_x,
device_event->root_y);
+ return TRUE;
}
}
break;
@@ -2544,7 +2549,10 @@ handle_input_xevent (MetaDisplay *display,
if (display->grab_window == window &&
meta_grab_op_is_mouse (display->grab_op))
- meta_window_handle_mouse_grab_op_xevent (window, device_event);
+ {
+ meta_window_handle_mouse_grab_op_xevent (window, device_event);
+ return TRUE;
+ }
break;
case XI_Motion:
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
@@ -2552,7 +2560,10 @@ handle_input_xevent (MetaDisplay *display,
if (display->grab_window == window &&
meta_grab_op_is_mouse (display->grab_op))
- meta_window_handle_mouse_grab_op_xevent (window, device_event);
+ {
+ meta_window_handle_mouse_grab_op_xevent (window, device_event);
+ return TRUE;
+ }
break;
case XI_Enter:
if (display->grab_op == META_GRAB_OP_COMPOSITOR)
@@ -2637,7 +2648,9 @@ handle_input_xevent (MetaDisplay *display,
}
}
- break;
+
+ /* Don't send FocusIn / FocusOut to Clutter */
+ return TRUE;
}
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]