mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
x11: Make sure to handle RANDR events from the right connection
This commit is contained in:
parent
86368e7e07
commit
861cfc23df
@ -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 {
|
||||
|
@ -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 &&
|
||||
|
Loading…
Reference in New Issue
Block a user