Different window decorations between wayland and xorg

Hi community,

I recently switched from xorg to wayland (finally!). But some applications behave differently. For example “KeypassXC” installed from Flathub or “Fedora Registry” - it doesn’t matter.

Gnome xorg:

Gnome Wayland:

As you can see, they have different colored title bars. But not only that, they also behave differently. I have configured a middle click on the title bar to minimize the window. This doesn’t work in Wayland.

i think this has something to do with the KDE Runtime used by KeepassXC.

Is there any way to fix this?

Cheers

2 Likes

Try with gnome-tweaks to set in the Appearance option “Legacy Applications” to the same value as the Icons and cursor to have an unified theming, also for KDE apps.

1 Like

This may be due to some portals working better om Wayland than on XOrg.

The below are breeze decorations

Was curious how my Icon stuff was set and installed gnome-tweaks; it shows my mouse acceleration enabled when it’s off in real GNOME settings and gsettings :stuck_out_tongue:


Might be F41 with the red vs black X difference, but here’s mine:

I’m also seeing the minimize behavior after doing:

gsettings set org.gnome.desktop.wm.preferences action-middle-click-titlebar 'minimize'

Seemingly works with GNOME apps, but not with KeePassXC

This seems to work:

QT_QPA_PLATFORM=xcb keepassxc
2 Likes

thank you guys

based on @Espionage724 answear, the solution is to set an override for the flatpak package with

sudo flatpak override --env=QT_QPA_PLATFORM=xcb org.keepassxc.KeePassXC

cheers

1 Like

This is happening because Gnome does not support something called “server side decorations” under Wayland; with SSD, the compositor draws the decorations around windows.

So when you open KeePassXC under Wayland, it is instead using Client Side Decoration; with CSD, the app itself is drawing the decorations around the window.

Unfortunately, Qt’s CSD implementation doesn’t look great on Gnome, which is a shame given its prevalence. In my experience, smaller and younger toolkits like Flutter look better.

By setting QT_QPA_PLATFORM=xcb, you are telling Qt to use X11. So the app instead launches through Xwayland, which Gnome does support SSD for.

3 Likes

Thank you for the explanation. This also brings back the Autotype Feature, too.