sparrow
sparrow copied to clipboard
Pull-down menus dont work when running in Debian 10 vm within Qubes
I am currently running v1.4.3 but this issue predates this latest release.
When I launch Sparrow in a Debian 10 vm running in Qubes OS, the pull-down menus do not stay open. I can click on a menu header and see the pull-down list of options for that header, but if I attempt to click on an option within any menu, the pull-down menu closes. I have tried clicking on a menu header and, keeping my finger on the mouse, moving the cursor down to the option I want, but that doesnt work either. The menu closes with no action. As a result, the only functions I can run are the few that have key-combination activators, e.g. Ctrl-O to open a wallet.
Could be related to https://bugs.openjdk.java.net/browse/JDK-8251240
There are two potential workarounds mentioned in that bug report - setting an environment variable first with export GDK_DISPLAY=1 or a Java system property -Djdk.gtk.version=2 at runtime. The latter can be done by editing the /sparrow shell script when running from source e.g. ./gradlew run -Djdk.gtk.version=2.
OK, thanks. I added the environment variable to my .bashrc and reloaded.
While the pull-down menus still do not stay open with a single click on a menu header, I now find that if I press and hold down the mouse button (either left or right button) on one of the menu headers, and then while continuing to hold the mouse button down, move the pointer down to the area between the menu bar and the top of the opened pull-down window, the window stays open when I release the mouse button and functions within that menu can be chosen, or I can then move the pointer over to one of the other menu headers and that header's window opens and stays open. I hope I'm expressing this in a way that makes sense. I can provide screenshots if necessary.
Thanks for the feedback. Unfortunately, ultimately this bug will need to be fixed in the upstream JavaFX libraries.
Can I ask what window manager is being used on the Debian VM?
Thanks for the feedback. Unfortunately, ultimately this bug will need to be fixed in the upstream JavaFX libraries.
Can I ask what window manager is being used on the Debian VM?
Sure....using XFCE, which is the default in Qubes
I have the same problem. I use the bspwm windows manager. Single click seems to cause the menu to open and close quickly. When I click and hold I get this:

I can keep the menu open by moving the mouse cursor into the gap between the menu bar and the menu, before releasing the mouse button. So I guess that's a workaround. The workarounds suggested in the JDK thread didn't work for me.
Looks like an upstream fix is required. In the meantime users can run export GDK_DISPLAY=1. Not sure any changes are required in Sparrow?
Neither of these worked for me as per @davterra experience. Both adding the environment variable or adding the Java system property -Djdk.gtk.version=2 in the sparrow shell script doesn't change the behavior in XFCE on Debian. The only thing of note with the latter (reverting to GTK 2) is the GTK error in the terminal is resolved when accessing the menu.
Can confirm that @emmanuelrosa fix does work for now though.
I guess we'll need to wait for the upstream fix at some point.
-- bvs
I've posted a message to the upstream project: https://mail.openjdk.java.net/pipermail/openjfx-dev/2021-November/032762.html
No responses to date though.
Thanks for the update. I did look to do that myself but seemed quite a pain to be able to get an account to post.
-- bvs
Just pinging to revive this, even though it still is a problem upstream, just would like to show interest. Emmanuel's tips are the most reliable so far, but it still breaks the flow of having that unique movement only for Sparrow.
System: Qubes R4.1, XFCE4.
It appears an upstream fix is being actively worked on: https://github.com/openjdk/jfx/pull/915
I have the same problem. I use the bspwm windows manager. Single click seems to cause the menu to open and close quickly. When I click and hold I get this:
I can keep the menu open by moving the mouse cursor into the gap between the menu bar and the menu, before releasing the mouse button. So I guess that's a workaround. The workarounds suggested in the JDK thread didn't work for me.
Thanks, that worked!
Just to confirm I have the same problem on xmonad:
$ xmonad --version && X -version && ./result/bin/sparrow --version
xmonad 0.17.2
X.Org X Server 1.21.1.8
X Protocol Version 11, Revision 0
Current Operating System: Linux framie 6.3.3-JohnOS #1-NixOS SMP PREEMPT_DYNAMIC Wed May 17 12:02:08 UTC 2023 x86_64
Kernel command line: initrd=\efi\nixos\fic4dqnia1621za7cljmx8w9n2742vqq-initrd-linux-6.3.3-initrd.efi init=/nix/store/62amnwq7n2axsqa44b4r6b6y2q7wxpgc-nixos-system-framie-23.05.20230518.48a0fb7/init mem_sleep_default=deep nvme.noacpi=1 loglevel=4
Current version of pixman: 0.42.2
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Sparrow Wallet 1.7.6
I'm having the exact same experience as https://github.com/sparrowwallet/sparrow/issues/170#issuecomment-915911301 and https://github.com/sparrowwallet/sparrow/issues/170#issuecomment-1474866983 .
Noting that the fix mentioned previously has now been merged, and should be available in JavaFX 21 planned for a September release.
Haha, okay. So, in ~4-5 months we'll probably see this fixed, I guess. Does that sound about right?
Thanks for following up @craigraw .
I have this problem and also the small font problem
I realized that fixing the font problem with _JAVA_OPTIONS=-Dglass.gtk.uiScale=150% also simplified the workaround because now instead of dragging the mouse into the "gap between the menu bar and the menu" it is sufficient to just click into the lower part of the menu item, for example below the text "File".
An update on this - JavaFX 21 has been released, which may fix this issue. However, this version requires macOS 11 or GTK 3.8 or later, which means in particular discontinuing support for older 10.13 macs that cannot be upgraded beyond that version. From past issues I know there are still surprisingly quite a few users using these old machines.
That said, this upgrade will happen, and those users can continue to use older versions of Sparrow.
I have tried to run Sparrow with OpenJDK 21 inside a Fedora VM, and found out that the issue is still present, and then thought that using JDK 21 may not necessarily imply that I was using JavaFX 21. How do ensure/verify that JavaFX 21 is in use when running Sparrow? Also, I realized that according to this it may work with JDK 18.
Answering my own question because I overlooked that JavaFX is a dependency and the version can be changed to 21 in the corresponding place.
After doing that the issue is gone, and the gaps are gone too, so it looks and feels great, this is a screenshot of Sparrow running on JDK 21 + JavaFX 21.
@vlad-timofeev thank you, this is good feedback!
Planning this upgrade for next year.
For anyone interested in a workaround until the problem is fixed: Pressing the Alt Key and then the arrow keys makes the menus usabale with the keyboard.
I can also confirm that simply bumping JavaFX version to 21 like @vlad-timofeev did fixes the problem. Also, don't assign negative coordinates to monitors in Wayland like I did. It messes up the programs running in xwayland (like Sparrow) thanks to this bug: https://github.com/swaywm/sway/wiki#mouse-events-clicking-scrolling-arent-working-on-some-of-my-workspaces https://gitlab.freedesktop.org/xorg/xserver/-/issues/899