[mutter] x11: Make sure to handle RANDR events from the right connection
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] x11: Make sure to handle RANDR events from the right connection
- Date: Wed, 23 Apr 2014 16:16:15 +0000 (UTC)
commit 861cfc23df179f580f663cb4372535039f8af9d9
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Apr 23 12:05:14 2014 -0400
x11: Make sure to handle RANDR events from the right connection
src/backends/x11/meta-backend-x11.c | 14 +++++++++++++-
src/core/events.c | 12 ------------
2 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c
index 3839c29..458c9bc 100644
--- a/src/backends/x11/meta-backend-x11.c
+++ b/src/backends/x11/meta-backend-x11.c
@@ -68,11 +68,23 @@ handle_host_xevent (MetaBackend *backend,
{
MetaBackendX11 *x11 = META_BACKEND_X11 (backend);
MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11);
+ gboolean bypass_clutter = FALSE;
if (xevent->type == (priv->xsync_event_base + XSyncAlarmNotify))
handle_alarm_notify (backend, xevent);
- clutter_x11_handle_event (xevent);
+ {
+ MetaMonitorManager *manager = meta_backend_get_monitor_manager (backend);
+ if (meta_monitor_manager_handle_xevent (manager, xevent))
+ {
+ bypass_clutter = TRUE;
+ goto out;
+ }
+ }
+
+ out:
+ if (!bypass_clutter)
+ clutter_x11_handle_event (xevent);
}
typedef struct {
diff --git a/src/core/events.c b/src/core/events.c
index 34bf651..04b9946 100644
--- a/src/core/events.c
+++ b/src/core/events.c
@@ -1729,7 +1729,6 @@ meta_display_handle_xevent (MetaDisplay *display,
Window modified;
gboolean bypass_compositor = FALSE, bypass_gtk = FALSE;
XIEvent *input_event;
- MetaMonitorManager *monitor;
#if 0
meta_spew_event (display, event);
@@ -1743,17 +1742,6 @@ meta_display_handle_xevent (MetaDisplay *display,
}
#endif
- /* Intercept XRandR events early and don't attempt any
- processing for them. We still let them through to Gdk though,
- so it can update its own internal state.
- */
- monitor = meta_monitor_manager_get ();
- if (meta_monitor_manager_handle_xevent (monitor, event))
- {
- bypass_compositor = TRUE;
- goto out;
- }
-
display->monitor_cache_invalidated = TRUE;
if (display->focused_by_us &&
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]