diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c index ccf6d9253..d2bbab45e 100644 --- a/src/backends/x11/meta-backend-x11.c +++ b/src/backends/x11/meta-backend-x11.c @@ -61,6 +61,7 @@ struct _MetaBackendX11Private { /* The host X11 display */ Display *xdisplay; + Screen *xscreen; xcb_connection_t *xcb; GSource *source; Window root_window; @@ -868,6 +869,7 @@ meta_backend_x11_initable_init (GInitable *initable, } priv->xdisplay = xdisplay; + priv->xscreen = DefaultScreenOfDisplay (xdisplay); priv->xcb = XGetXCBConnection (priv->xdisplay); priv->root_window = DefaultRootWindow (xdisplay); @@ -955,6 +957,14 @@ meta_backend_x11_get_xdisplay (MetaBackendX11 *x11) return priv->xdisplay; } +Screen * +meta_backend_x11_get_xscreen (MetaBackendX11 *x11) +{ + MetaBackendX11Private *priv = meta_backend_x11_get_instance_private (x11); + + return priv->xscreen; +} + Window meta_backend_x11_get_root_xwindow (MetaBackendX11 *backend_x11) { diff --git a/src/backends/x11/meta-backend-x11.h b/src/backends/x11/meta-backend-x11.h index eb15ba01c..515cde91b 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); +Screen * meta_backend_x11_get_xscreen (MetaBackendX11 *backend); + Window meta_backend_x11_get_root_xwindow (MetaBackendX11 *backend_x11); Window meta_backend_x11_get_xwindow (MetaBackendX11 *backend);