spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.31k stars 3.05k forks source link

Context menu not showing up #8572

Open oijqwojviqwqp opened 1 year ago

oijqwojviqwqp commented 1 year ago

Right-click context menu does not open for me. Tried in 4.3.1 and 4.4.5 AppImage. More specifically:

I can double-click all the items and the detailed window shows correctly.

Since it worked before for me in 4.3.1 I assume it is related to some Ubuntu update. I am running Ubuntu 23.04, updated.

$XDG_SESSION_TYPE - wayland $XDG_CURRENT_DESKTOP - GNOME

Gnome version 44.3 Kernel Version: Linux 6.2.0-27-generic

Starting app from terminal gives warning: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

sha-265 commented 11 months ago

Confirmed. When using XDG_SESSION_TYPE=wayland there is no issue, but the window theme is wrong.

mariaa144 commented 11 months ago

XDG_SESSION_TYPE=wayland doesn't help me on NixOS. Is there are workaround if I need the context menu?

SomberNight commented 11 months ago

Right-click context menu does not open for me I assume it is related to some Ubuntu update. I am running Ubuntu 23.04, updated. $XDG_SESSION_TYPE - wayland $XDG_CURRENT_DESKTOP - GNOME

Confirmed. When using XDG_SESSION_TYPE=wayland there is no issue

These statements conflict. @oijqwojviqwqp said they are seeing the issue with XDG_SESSION_TYPE=wayland. @sha-265 is saying setting that fixes it. What exactly is "confirmed"?


XDG_SESSION_TYPE=wayland doesn't help me on NixOS. Is there are workaround if I need the context menu?

What about XDG_SESSION_TYPE=x11?

SomberNight commented 11 months ago

When using XDG_SESSION_TYPE=wayland [...] the window theme is wrong.

Yes, indeed, there are some issues with the theme. (testing on ubuntu 23.04)

Most notably, the titlebar of QMessageBox is missing, and so our popups cannot be moved. Also they are positioned unintuitively. Note: these windows being WindowModal seems to be causing this: https://github.com/spesmilo/electrum/blob/4978d4095673c22030fda6f7f134a0704de42604/electrum/gui/qt/util.py#L297

see picture ![pic2](https://github.com/spesmilo/electrum/assets/29142493/4c76ba36-74ab-413f-b28c-a2cfce22265b)

This happens with both the 4.4.6 appimage, and when running from source (both when installing pyqt5 from pip or from apt).


Note: same theme weirdness and WindowModal issues on ubuntu 22.04 -- but there the apt-provided python3-pyqt5 is missing the wayland plugin, so to even test one would want to install pyqt5 from pip. (pyqt5==5.15.9)


To clarify/reiterate, I could not reproduce the original issue of "context menu not showing up"; and everything seems to be working for me with XDG_SESSION_TYPE=x11 QT_QPA_PLATFORM=xcb, which is essentially the behaviour by default.

(by default I am seeing XDG_SESSION_TYPE=wayland QT_QPA_PLATFORM="" but that gets converted to XDG_SESSION_TYPE=x11 QT_QPA_PLATFORM=xcb by Qt, when the following line is logged: Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. )

sha-265 commented 11 months ago

@sha-265 is saying setting that fixes it. What exactly is "confirmed"?

I confirmed that the context menu is not showing up, when not using XDG_SESSION_TYPE=wayland

mariaa144 commented 11 months ago

For me the menus show up inconsistently. About 10% of the time when I right click the menu WILL show up. The rest of the time nothing happens and I sit there wondering if I'm crazy.

SomberNight commented 11 months ago

Ok, so sounds like the context menu missing issue is specific to x11. Any clues how to reproduce? Like I said, works for me on ubuntu (-- it works on an ubuntu 23.04 live cd, so as vanilla as it gets). @sha-265 what distro are you using?

sha-265 commented 11 months ago

I'm using Ubuntu 23.04. It's happening both running from source, and installed with pip.

oijqwojviqwqp commented 10 months ago

Out of pure desperation, I did clean re-install of Ubuntu 23.04. By clean I mean disk format and install from USB.

It worked (!) until yesterday and today it is not working again. There is not anything new I would install except of the Ubuntu update packages.

Are there any additional logs / debugging info I can provide? This drives me crazy.

Update: