mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-09-10 12:03:18 +02:00
misc: fix GTK theme application on Wayland by prioritizing XCB
This commit addresses an issue where the GTK theme was not being correctly applied when running our application on Wayland with the Wayland platform plugin. Although the root cause is not entirely clear, it seems related to a known Qt bug (QTBUG-99684). As a workaround, we're setting the `QT_QPA_PLATFORM` environment variable to use XCB with Wayland as a fallback. This ensures that the GTK theme is applied correctly when X11 is available, while still allowing a fallback to Wayland in its absence. Possibly related issue: https://bugreports.qt.io/browse/QTBUG-99684 Gitlab: #1156 Change-Id: I71ef4e39f916d9871134fb0caded8b30bff578fb
This commit is contained in:
parent
03c20a4205
commit
87aed4c039
1 changed files with 8 additions and 0 deletions
|
@ -54,6 +54,14 @@ main(int argc, char* argv[])
|
|||
}
|
||||
setenv("QML_DISABLE_DISK_CACHE", "1", true);
|
||||
|
||||
/*
|
||||
* Not quite sure why the GTK theme is not applied on Wayland when
|
||||
* using the wayland platform plugin, but we can force XCB to make
|
||||
* sure it works when X11 is available, otherwise fallback to Wayland.
|
||||
* Could be related to: https://bugreports.qt.io/browse/QTBUG-99684.
|
||||
*/
|
||||
setenv("QT_QPA_PLATFORM", "xcb:wayland", true);
|
||||
|
||||
/*
|
||||
* Some GNU/Linux distros, like Zorin OS, set QT_STYLE_OVERRIDE
|
||||
* to force a particular Qt style. This has been fine with Qt5
|
||||
|
|
Loading…
Add table
Reference in a new issue