diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c index f2a637822..ccf6d9253 100644 --- a/src/backends/x11/meta-backend-x11.c +++ b/src/backends/x11/meta-backend-x11.c @@ -63,6 +63,7 @@ struct _MetaBackendX11Private Display *xdisplay; xcb_connection_t *xcb; GSource *source; + Window root_window; int xsync_event_base; int xsync_error_base; @@ -868,6 +869,7 @@ meta_backend_x11_initable_init (GInitable *initable, priv->xdisplay = xdisplay; priv->xcb = XGetXCBConnection (priv->xdisplay); + priv->root_window = DefaultRootWindow (xdisplay); init_xkb_state (x11); @@ -953,6 +955,15 @@ meta_backend_x11_get_xdisplay (MetaBackendX11 *x11) return priv->xdisplay; } +Window +meta_backend_x11_get_root_xwindow (MetaBackendX11 *backend_x11) +{ + MetaBackendX11Private *priv = + meta_backend_x11_get_instance_private (backend_x11); + + return priv->root_window; +} + Window meta_backend_x11_get_xwindow (MetaBackendX11 *x11) { diff --git a/src/backends/x11/meta-backend-x11.h b/src/backends/x11/meta-backend-x11.h index 2815015d1..eb15ba01c 100644 --- a/src/backends/x11/meta-backend-x11.h +++ b/src/backends/x11/meta-backend-x11.h @@ -49,6 +49,8 @@ struct _MetaBackendX11Class Display * meta_backend_x11_get_xdisplay (MetaBackendX11 *backend); +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,