[gnome-shell/wip/wayland-2: 1/2] Don't ignore crossing event
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/wayland-2: 1/2] Don't ignore crossing event
- Date: Mon, 15 Jul 2013 20:09:18 +0000 (UTC)
commit 2754a5e3a15fa863a8d6c8a25ca3b0441efaa5aa
Author: Giovanni Campagna <gcampagn redhat com>
Date: Mon Jul 15 12:51:30 2013 +0200
Don't ignore crossing event
We were sometimes ignoring crossing events to avoid unfocusing
the tray after the user interacted with a legacy icon.
This can't happen any more, as the tray is modal and all events
are synthetized, so remove this code, which crashes the shell
under wayland.
src/gnome-shell-plugin.c | 44 --------------------------------------------
1 files changed, 0 insertions(+), 44 deletions(-)
---
diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c
index 7826672..fff181b 100644
--- a/src/gnome-shell-plugin.c
+++ b/src/gnome-shell-plugin.c
@@ -315,38 +315,6 @@ gnome_shell_plugin_kill_switch_workspace (MetaPlugin *plugin)
}
static gboolean
-ignore_crossing_event (MetaPlugin *plugin,
- XIEnterEvent *enter_event)
-{
- MetaScreen *screen = meta_plugin_get_screen (plugin);
- ClutterStage *stage = CLUTTER_STAGE (meta_get_stage_for_screen (screen));
-
- if (enter_event->event == clutter_x11_get_stage_window (stage))
- {
- /* If the pointer enters a child of the stage window (eg, a
- * trayicon), we want to consider it to still be in the stage,
- * so don't let Clutter see the event.
- */
- if (enter_event->detail == XINotifyInferior)
- return TRUE;
-
- /* If the pointer is grabbed by a window it is not currently in,
- * filter that out as well. In particular, if a trayicon grabs
- * the pointer after a click on its label, we don't want to hide
- * the message tray. Filtering out this event will leave Clutter
- * out of sync, but that happens fairly often with grabs, and we
- * can work around it. (Eg, shell_global_sync_pointer().)
- */
- if (enter_event->mode == XINotifyGrab &&
- (enter_event->detail == XINotifyNonlinear ||
- enter_event->detail == XINotifyNonlinearVirtual))
- return TRUE;
- }
-
- return FALSE;
-}
-
-static gboolean
gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
XEvent *xev)
{
@@ -371,18 +339,6 @@ gnome_shell_plugin_xevent_filter (MetaPlugin *plugin,
}
#endif
- /* Make sure that Clutter doesn't see certain focus change events,
- * so that when we're moving into something like a tray icon, we
- * don't unfocus the container. */
- if (xev->type == GenericEvent &&
- xev->xcookie.extension == meta_display_get_xinput_opcode (display))
- {
- XIEvent *input_event = (XIEvent *) xev->xcookie.data;
- if ((input_event->evtype == XI_Enter || input_event->evtype == XI_Leave) &&
- ignore_crossing_event (plugin, (XIEnterEvent *) input_event))
- return TRUE;
- }
-
/*
* Pass the event to shell-global
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]