mirror of
https://github.com/brl/mutter.git
synced 2025-01-23 18:09:10 +00:00
backend/x11: Add API to get the X11 screen
Will be used to replace a similar ClutterX11 API. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2014>
This commit is contained in:
parent
440359e85f
commit
b1fb8cbf57
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user