clutter/backend/x11: Don't keep track of a Screen pointer

It was used during init, and nowhere else.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2002>
This commit is contained in:
Jonas Ådahl 2021-09-15 12:13:26 +02:00 committed by Marge Bot
parent 08c34c887f
commit c6530551de
2 changed files with 5 additions and 5 deletions

View File

@ -114,6 +114,7 @@ meta_clutter_backend_x11_finish_init (ClutterBackend *clutter_backend,
MetaClutterBackendX11 *clutter_backend_x11 =
META_CLUTTER_BACKEND_X11 (clutter_backend);
Atom atoms[N_ATOM_NAMES];
Screen *xscreen;
if (_foreign_dpy)
backend_x11->xdisplay = _foreign_dpy;
@ -157,10 +158,10 @@ meta_clutter_backend_x11_finish_init (ClutterBackend *clutter_backend,
/* add event filter for Cogl events */
meta_clutter_x11_add_filter (cogl_xlib_filter, clutter_backend);
clutter_backend_x11->xscreen = DefaultScreenOfDisplay (clutter_backend_x11->xdisplay);
clutter_backend_x11->xscreen_num = XScreenNumberOfScreen (clutter_backend_x11->xscreen);
clutter_backend_x11->xscreen_width = WidthOfScreen (clutter_backend_x11->xscreen);
clutter_backend_x11->xscreen_height = HeightOfScreen (clutter_backend_x11->xscreen);
xscreen = DefaultScreenOfDisplay (clutter_backend_x11->xdisplay);
clutter_backend_x11->xscreen_num = XScreenNumberOfScreen (xscreen);
clutter_backend_x11->xscreen_width = WidthOfScreen (xscreen);
clutter_backend_x11->xscreen_height = HeightOfScreen (xscreen);
clutter_backend_x11->xwin_root = RootWindow (clutter_backend_x11->xdisplay,
clutter_backend_x11->xscreen_num);

View File

@ -35,7 +35,6 @@ struct _MetaClutterBackendX11
Display *xdisplay;
Screen *xscreen;
int xscreen_num;
int xscreen_width;
int xscreen_height;