hiro: Force Gtk3 to use X11 backend

This commit is contained in:
Rasim Labibov 2023-06-09 08:52:37 +03:00 committed by Screwtapello
parent dab534b658
commit 3f93cd4393
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,8 @@ auto pApplication::state() -> State& {
auto pApplication::initialize() -> void {
#if defined(DISPLAY_XORG)
// If running on Wayland, force usage of XWayland
setenv("GDK_BACKEND", "x11", 1);
state().display = XOpenDisplay(nullptr);
state().screenSaverXDG = (bool)execute("xdg-screensaver", "--version").output.find("xdg-screensaver");