diff --git a/src/backends/x11/cm/meta-backend-x11-cm.c b/src/backends/x11/cm/meta-backend-x11-cm.c index c6a8d6c0e..d5c49a712 100644 --- a/src/backends/x11/cm/meta-backend-x11-cm.c +++ b/src/backends/x11/cm/meta-backend-x11-cm.c @@ -379,21 +379,20 @@ meta_backend_x11_cm_lock_layout_group (MetaBackend *backend, } static gboolean -meta_backend_x11_cm_handle_host_xevent (MetaBackendX11 *backend_x11, +meta_backend_x11_cm_handle_host_xevent (MetaBackendX11 *x11, XEvent *event) { - MetaBackend *backend = META_BACKEND (backend_x11); - MetaBackendX11 *x11 = META_BACKEND_X11 (backend); + MetaBackend *backend = META_BACKEND (x11); + MetaContext *context = meta_backend_get_context (backend); MetaBackendX11Cm *x11_cm = META_BACKEND_X11_CM (x11); MetaMonitorManager *monitor_manager = meta_backend_get_monitor_manager (backend); MetaMonitorManagerXrandr *monitor_manager_xrandr = META_MONITOR_MANAGER_XRANDR (monitor_manager); Display *xdisplay = meta_backend_x11_get_xdisplay (x11); - gboolean bypass_clutter = FALSE; MetaDisplay *display; - display = meta_get_display (); + display = meta_context_get_display (context); if (display) { MetaCompositor *compositor = display->compositor; @@ -402,7 +401,7 @@ meta_backend_x11_cm_handle_host_xevent (MetaBackendX11 *backend_x11, if (meta_dnd_handle_xdnd_event (backend, compositor_x11, xdisplay, event)) - bypass_clutter = TRUE; + return TRUE; } if (event->type == meta_backend_x11_get_xkb_event_base (x11)) @@ -427,10 +426,10 @@ meta_backend_x11_cm_handle_host_xevent (MetaBackendX11 *backend_x11, } } - bypass_clutter |= - meta_monitor_manager_xrandr_handle_xevent (monitor_manager_xrandr, event); + if (meta_monitor_manager_xrandr_handle_xevent (monitor_manager_xrandr, event)) + return TRUE; - return bypass_clutter; + return FALSE; } static void