x11: Dynamically update the scale factor

If the text-scaling-factor setting is available via D-Bus, add a listener and update the content scale values for the displays if the value is changed during runtime.

Factors out the D-Bus message pump from the system theme detection code to the general D-Bus code, as it's now used for more purposes than just the system theme.
This commit is contained in:
Frank Praznik
2023-05-18 17:42:08 -04:00
committed by Sam Lantinga
parent 068d3da366
commit d5f07730be
7 changed files with 105 additions and 28 deletions

View File

@@ -94,6 +94,8 @@ extern SDL_bool SDL_DBus_QueryPropertyOnConnection(DBusConnection *conn, const c
extern void SDL_DBus_ScreensaverTickle(void);
extern SDL_bool SDL_DBus_ScreensaverInhibit(SDL_bool inhibit);
extern void SDL_DBus_PumpEvents(void);
#endif /* HAVE_DBUS_DBUS_H */
#endif /* SDL_dbus_h_ */