clutter-backend-x11: Don't set the font-dpi computed on X11 parameters

We already correctly set the font-dpi based on user settings in
MetaSettings at each user change and as part of backend initialization,
so there's no point to set it also during x11 backend post-parsing and
using X11 values, as this may happen at later point and lead to a wrong
clutter font DPI value.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1444
This commit is contained in:
Marco Trevisan (Treviño) 2020-09-16 12:49:39 +02:00
parent 48243bfcbc
commit aa56595b31

View File

@ -254,9 +254,7 @@ clutter_backend_x11_post_parse (ClutterBackend *backend,
GError **error) GError **error)
{ {
ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend); ClutterBackendX11 *backend_x11 = CLUTTER_BACKEND_X11 (backend);
ClutterSettings *settings;
Atom atoms[N_ATOM_NAMES]; Atom atoms[N_ATOM_NAMES];
double dpi;
if (_foreign_dpy) if (_foreign_dpy)
backend_x11->xdpy = _foreign_dpy; backend_x11->xdpy = _foreign_dpy;
@ -296,8 +294,6 @@ clutter_backend_x11_post_parse (ClutterBackend *backend,
CLUTTER_NOTE (BACKEND, "Getting the X screen"); CLUTTER_NOTE (BACKEND, "Getting the X screen");
settings = clutter_settings_get_default ();
/* add event filter for Cogl events */ /* add event filter for Cogl events */
clutter_x11_add_filter (cogl_xlib_filter, backend); clutter_x11_add_filter (cogl_xlib_filter, backend);
@ -316,11 +312,6 @@ clutter_backend_x11_post_parse (ClutterBackend *backend,
backend_x11->display_name = g_strdup (clutter_display_name); backend_x11->display_name = g_strdup (clutter_display_name);
dpi = (((double) DisplayHeight (backend_x11->xdpy, backend_x11->xscreen_num) * 25.4)
/ (double) DisplayHeightMM (backend_x11->xdpy, backend_x11->xscreen_num));
g_object_set (settings, "font-dpi", (int) dpi * 1024, NULL);
/* create XSETTINGS client */ /* create XSETTINGS client */
backend_x11->xsettings = backend_x11->xsettings =
_clutter_xsettings_client_new (backend_x11->xdpy, _clutter_xsettings_client_new (backend_x11->xdpy,