x11: Make sure to handle RANDR events from the right connection

This commit is contained in:
Jasper St. Pierre 2014-04-23 12:05:14 -04:00
parent 86368e7e07
commit 861cfc23df
2 changed files with 13 additions and 13 deletions

View File

@ -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 {

View File

@ -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 &&