diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c index 6fe6a7ee6..3ed2830a3 100644 --- a/src/backends/x11/meta-backend-x11.c +++ b/src/backends/x11/meta-backend-x11.c @@ -523,9 +523,8 @@ on_monitors_changed (MetaMonitorManager *manager, MetaBackend *backend) { MetaBackendX11 *x11 = META_BACKEND_X11 (backend); - MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11); - priv->cached_current_logical_monitor = NULL; + meta_backend_x11_reset_cached_logical_monitor (x11); } static void @@ -801,10 +800,10 @@ meta_backend_x11_get_keymap_layout_group (MetaBackend *backend) } void -meta_backend_x11_handle_event (MetaBackendX11 *x11, - XEvent *xevent) +meta_backend_x11_reset_cached_logical_monitor (MetaBackendX11 *backend_x11) { - MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11); + MetaBackendX11Private *priv = + meta_backend_x11_get_instance_private (backend_x11); priv->cached_current_logical_monitor = NULL; } diff --git a/src/backends/x11/meta-backend-x11.h b/src/backends/x11/meta-backend-x11.h index a4480777d..698f828fb 100644 --- a/src/backends/x11/meta-backend-x11.h +++ b/src/backends/x11/meta-backend-x11.h @@ -55,9 +55,6 @@ Window meta_backend_x11_get_root_xwindow (MetaBackendX11 *backend_x11); Window meta_backend_x11_get_xwindow (MetaBackendX11 *backend); -void meta_backend_x11_handle_event (MetaBackendX11 *x11, - XEvent *xevent); - uint8_t meta_backend_x11_get_xkb_event_base (MetaBackendX11 *x11); void meta_backend_x11_reload_cursor (MetaBackendX11 *x11); @@ -65,3 +62,5 @@ void meta_backend_x11_reload_cursor (MetaBackendX11 *x11); void meta_backend_x11_sync_pointer (MetaBackendX11 *backend_x11); MetaX11Barriers * meta_backend_x11_get_barriers (MetaBackendX11 *backend_x11); + +void meta_backend_x11_reset_cached_logical_monitor (MetaBackendX11 *backend_x11); diff --git a/src/x11/events.c b/src/x11/events.c index d432b270f..d65ea08a6 100644 --- a/src/x11/events.c +++ b/src/x11/events.c @@ -1922,7 +1922,7 @@ meta_x11_display_handle_xevent (MetaX11Display *x11_display, display->current_time = event_get_time (x11_display, event); if (META_IS_BACKEND_X11 (backend)) - meta_backend_x11_handle_event (META_BACKEND_X11 (backend), event); + meta_backend_x11_reset_cached_logical_monitor (META_BACKEND_X11 (backend)); if (x11_display->focused_by_us && event->xany.serial > x11_display->focus_serial &&