sparrow icon indicating copy to clipboard operation
sparrow copied to clipboard

Pull-down menus dont work when running in Debian 10 vm within Qubes

Open davterra opened this issue 4 years ago • 22 comments

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.

davterra avatar Aug 11 '21 13:08 davterra

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.

craigraw avatar Aug 11 '21 14:08 craigraw

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.

davterra avatar Aug 11 '21 23:08 davterra

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?

craigraw avatar Aug 13 '21 07:08 craigraw

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

davterra avatar Aug 13 '21 15:08 davterra

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:

jfx-menu

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.

emmanuelrosa avatar Sep 09 '21 09:09 emmanuelrosa

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?

6102bitcoin avatar Oct 04 '21 17:10 6102bitcoin

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

bettyvschmartz avatar Nov 24 '21 22:11 bettyvschmartz

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.

craigraw avatar Dec 02 '21 13:12 craigraw

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

bettyvschmartz avatar Dec 03 '21 10:12 bettyvschmartz

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.

nyxnor avatar Oct 10 '22 23:10 nyxnor

It appears an upstream fix is being actively worked on: https://github.com/openjdk/jfx/pull/915

craigraw avatar Jan 23 '23 06:01 craigraw

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:

jfx-menu

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!

ekzyis avatar Mar 18 '23 14:03 ekzyis

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 .

johnrichardrinehart avatar May 19 '23 16:05 johnrichardrinehart

Noting that the fix mentioned previously has now been merged, and should be available in JavaFX 21 planned for a September release.

craigraw avatar May 26 '23 09:05 craigraw

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 .

johnrichardrinehart avatar May 27 '23 00:05 johnrichardrinehart

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".

vlad-tim avatar Dec 07 '23 22:12 vlad-tim

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.

craigraw avatar Dec 08 '23 06:12 craigraw

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.

vlad-tim avatar Dec 08 '23 16:12 vlad-tim

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.

image

vlad-tim avatar Dec 08 '23 17:12 vlad-tim

@vlad-timofeev thank you, this is good feedback!

Planning this upgrade for next year.

craigraw avatar Dec 11 '23 08:12 craigraw

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.

dchrist22 avatar Jan 06 '24 21:01 dchrist22

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

suurt8ll avatar May 10 '24 13:05 suurt8ll