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

The logo icon doesn't show properly under Wayland #781

Open
1 task done
sinetek opened this issue Dec 10, 2023 · 2 comments
Open
1 task done

The logo icon doesn't show properly under Wayland #781

sinetek opened this issue Dec 10, 2023 · 2 comments

Comments

@sinetek
Copy link
Contributor

sinetek commented Dec 10, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

There should be a bitcoin logo icon when running the application under a wayland session.
Right now it looks like this on my machine.
This should be fixed, because it looks like it's running W-coin or some altcoin and that could be confusing, and/or misleading.

image

Expected behaviour

It should look like this (run on the same machine, same everything, but with platform xcb):

image

Steps to reproduce

Compile and run normally.

Relevant log output

No response

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

master

Operating system and version

Debian 12 (bookworm) with KDE Plasma (Wayland)

Machine specifications

image

@willcl-ark
Copy link
Member

I think Wayland is much stricter about loading the icon from the .desktop file (which must have an exactly matching name). I didn't test this any further, but running Wayland on my system with an appropriate .desktop file installed I do get the correct icon:

Screenshot from 2023-12-10 20-36-06

That said, I added my .desktop file manually a while ago, and I notice now that on my machine the code which appears to write the .desktop file is not being included in the compilation, after being exluded by the C preprocessor. Specifically Q_OS_LINUX does not appear to have been set by ./configure, so the code following this is skipped:

https://github.com/bitcoin/bitcoin/blob/36fabb01b16c70902c085187b0a6978c70c691c0/src/qt/guiutil.cpp#L574
This seems problematic to me, oir at least, I don't understand why on Linux this code is being excluded by the CPP.

Did you try installing with sudo make install, or are you just running the binary as built by make? If you didn't install, you could try running sudo make install; bitcoin-qt and see if the installed version references the correct icon? (Note this will overwrite any previously-installed version).

I've not worked on the GUI or QT much, so will defer to others here. For reference, my .desktop file in /usr/local/share/applications is in the form:

will@ubuntu /u/s/applications $ cat Bitcoin-qt.desktop
[Desktop Entry]
Name=Bitcoin-Qt
Exec=/usr/local/bin/bitcoin-qt
Icon=/home/will/src/bitcoin/share/pixmaps/bitcoin64.png
Type=Application
Categories=Utility;

@sinetek
Copy link
Contributor Author

sinetek commented Dec 11, 2023

...

it sohuld be simpler than that, something like QWindow::setIcon() ought to be enough ?

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

No branches or pull requests

2 participants