mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
x11/cm: Stop using intermediate bypass_clutter variable
There is no need to use the 'bypass-*' method of event processing in the changed function since in all cases the 'bypass-*' variable was set, any following event processing functions would ignore the event anyway. Simplify things a bit by just returning TRUE if the event is consumed. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2714>
This commit is contained in:
parent
1816f21e21
commit
28cbc213d0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user