Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

white title bar in KeePassXC on Arch #28

Open
k1gen opened this issue Oct 3, 2023 · 17 comments
Open

white title bar in KeePassXC on Arch #28

k1gen opened this issue Oct 3, 2023 · 17 comments

Comments

@k1gen
Copy link

k1gen commented Oct 3, 2023

with firejail:
image

without firejail:
image

@grulja
Copy link
Contributor

grulja commented Oct 4, 2023

It probably limits some DBus access, which we rely on for the xdg-desktop-portal. I don't think there is nothing I can do about that in QAdwaitaDecorations.

@grulja grulja closed this as completed Oct 4, 2023
@k1gen
Copy link
Author

k1gen commented Oct 11, 2023

keepassxc also has a white bar with dark theme, even without firejail. should I open a new issue?

@grulja
Copy link
Contributor

grulja commented Oct 12, 2023

You can reopen this one and change the title. What distribution do you use?

@grulja grulja reopened this Oct 12, 2023
@k1gen k1gen changed the title white title bar with firejail white title bar in KeePassXC on Arch Oct 12, 2023
@k1gen
Copy link
Author

k1gen commented Oct 12, 2023

I'm using Arch, installed qadwaitadecorations-qt5, qadwaitadecorations-qt6 and qt5-wayland-decorations. here's how the window looks:
Screenshot from 2023-10-12 08-50-59

@grulja
Copy link
Contributor

grulja commented Oct 12, 2023

What is your version of gnome-session and xdg-desktop-portal?

@k1gen
Copy link
Author

k1gen commented Oct 12, 2023

@grulja

$ pacman -Q | rg 'gnome-session|xdg-desktop-portal'
gnome-session 45.0-1
xdg-desktop-portal 1.18.0-2
xdg-desktop-portal-gnome 45.0-1
xdg-desktop-portal-gtk 1.14.1-3

@grulja
Copy link
Contributor

grulja commented Oct 13, 2023

Can you build QAdwaitaDecorations from git and run your app with QT_LOGGING_RULES='*.qadwaitadecorations=true'? This will report what color scheme it found. Is your GNOME session using dark or light theme?

@k1gen
Copy link
Author

k1gen commented Oct 16, 2023

this actually only happens if the application was autostarted and put in tray, not if I close the autostarted one and launch it myself

grulja added a commit that referenced this issue Oct 18, 2023
Do not attempt to query settings when xdg-desktop-portal is not running
yet, instead watch for its DBus service to appear and query the settings
afterwards so in case an app is started before xdg-desktop-portal, it
can still apply correct style.

Fixes #28
@grulja
Copy link
Contributor

grulja commented Oct 18, 2023

Can you try with #38?

@k1gen
Copy link
Author

k1gen commented Oct 18, 2023

how can I try it if you didn't make a release with it?

@grulja
Copy link
Contributor

grulja commented Oct 19, 2023

how can I try it if you didn't make a release with it?

I was hoping you can build it from the sources as I don't want to make a release of something that is untested.

You just need to clone this repo, checkout to dbus-watcher branch and follow the instructions mentioned in the README.

@k1gen
Copy link
Author

k1gen commented Oct 19, 2023

@grulja I compiled the dbus-watcher branch and installed it, nothing changed. here's what I did:

git clone [email protected]:FedoraQt/QAdwaitaDecorations.git && cd ...
git checkout dbus-watcher
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DHAS_QT6_SUPPORT=true -DUSE_QT6=false ..
make && sudo make install

I have also exported QT_LOGGING_RULES=*.qadwaitadecorations=true in ~/.config/environment.d/envvars.conf, here are all the logs:

Oct 19 14:38:59 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Using Qt5 version with Qt6 backports
Oct 19 14:38:59 think keepassxc[2084]: qt.qpa.qadwaitadecorations: XDP DBus service is running, querying settings
Oct 19 14:38:59 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Changing color scheme to  light
Oct 19 14:39:00 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Using  "window-close-symbolic.svg"  from  ""  theme
Oct 19 14:39:00 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Using  "window-minimize-symbolic.svg"  from  ""  theme
Oct 19 14:39:00 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Using  "window-maximize-symbolic.svg"  from  ""  theme
Oct 19 14:39:00 think keepassxc[2084]: qt.qpa.qadwaitadecorations: Using  "window-restore-symbolic.svg"  from  ""  theme

@grulja
Copy link
Contributor

grulja commented Oct 19, 2023

I'm surprised you were able to build it with -DHAS_QT6_SUPPORT=true. Does Arch have same backports we have in Fedora to qtwayland? Anyway, there seem to be something wrong with your xdg-desktop-portal instance as in your case you don't seem to be able to read the settings. Maybe some of the portal implementation is getting delayed or something? But the issue doesn't seem to be in QAdwaitaDecorations.

@k1gen
Copy link
Author

k1gen commented Oct 19, 2023

I built it because I have decorations backport: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=qt5-wayland-decorations
the portal wasn't altered in any way, and services start without delays, so I have no clue what to do now: systemctl --user status --no-pager xdg-desktop-portal xdg-desktop-portal-gtk xdg-desktop-portal-gnome | curl -F'file=@-' https://0x0.st: https://0x0.st/HJQQ.txt

@k1gen
Copy link
Author

k1gen commented Oct 20, 2023

another app in autostart (JamesDSP) uses dark header bar, but keepassxc doesn't. what could be the culprit?

@k1gen
Copy link
Author

k1gen commented Oct 22, 2023

it seems to be random: https://0x0.st/HJ3A.txt

@ArtyIF
Copy link

ArtyIF commented Oct 28, 2023

For me, it consistently triggers on KeePassXC's autostart. When launching it manually, it's always dark. The autostart also always ignores the minimize/maximize preferences in GNOME Tweaks, while the manually launched program doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants