Currently, Flutter defaults to always using GTK window decorations regardless of
the window manager, when running Wayland. This makes the app look out of place
on KDE Plasma and other Qt-based desktop environments.
This change checks the XDG_CURRENT_DESKTOP environment variable to determine the
running desktop environment, and if it is GNOME continues to use the GTK header,
otherwise it uses the Qt header.
Before
After
Now in the after screenshot, the window has native decorations on KDE with user-customized controls for things like pin to all workspaces.
Currently, Flutter defaults to always using GTK window decorations regardless of the window manager, when running Wayland. This makes the app look out of place on KDE Plasma and other Qt-based desktop environments.
This change checks the XDG_CURRENT_DESKTOP environment variable to determine the running desktop environment, and if it is GNOME continues to use the GTK header, otherwise it uses the Qt header.
Now in the
after
screenshot, the window has native decorations on KDE with user-customized controls for things likepin to all workspaces
.