Bug 252873 - x11-wm/twm menubar/menus fail to open
Summary: x11-wm/twm menubar/menus fail to open
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-desktop (Team)
Depends on:
Reported: 2021-01-21 02:56 UTC by anthony.elizondo+freebsd
Modified: 2021-02-08 18:59 UTC (History)
1 user (show)

See Also:
tcberner: maintainer-feedback+

pkg info (20.72 KB, text/plain)
2021-01-21 02:56 UTC, anthony.elizondo+freebsd
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description anthony.elizondo+freebsd 2021-01-21 02:56:31 UTC
Created attachment 221776 [details]
pkg info

On some GUI applications menus will fail to open. On first attempt they may open, but after some number of successful attempts, eventually it will fail. This happens for on both www/chromium and editors/vscode. It happens both if the applications have been installed from ports, or via pkg. It happens on bare metal hardware and in a VMware Fusion VM.

Steps to reproduce:
1. Start from a stock 12.2-RELEASE installation.
2. Install chromium from ports or via pkg
3. Click on kebab ("more options") icon. 

Here is a video recording of the bug in action. On the first open of chromium the menu does not open at all. On a subsequent attempt it opens the first time, but then later does not open.


This bug also occurs with Visual Studio Code, clicking on the menubar ("File, Edit, etc.") Hence, my filing this bug under a common library, x11-toolkits/gtk30. If the bug does not lie in x11-toolkits/gtk30 feel free to rename/reassign. 

uname -a:
FreeBSD pepper 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC  amd64
Comment 1 anthony.elizondo+freebsd 2021-01-21 15:12:12 UTC
Tested other GUI applications, and the bug does not occur with Audacity or Firefox.

It has been suggested that twm may be the source of the bug, and maybe related to focus follow? https://old.reddit.com/r/freebsd/comments/l1pm1g/bug_where_menus_will_not_open_chromium_vs_code/gk0xyx1/

I also found https://community.oracle.com/tech/developers/discussion/3547864/rhel-6-4-using-twm-and-vnc-issue-with-mouse-clicks-in-java-fx-2-2-app which describes similar behavior.

I tried out ctwm and I cannot get the bug to occur. All menus open fine.
Comment 2 Tobias C. Berner freebsd_committer 2021-01-21 20:50:23 UTC
(In reply to anthony.elizondo+freebsd from comment #1)
Moin moin 

I would recommend, that you test whether it works with a different window manager for you. If so, then it is a twm issue, if not, we can investigate further.

mfg Tobias
Comment 3 anthony.elizondo+freebsd 2021-01-21 21:48:26 UTC
> I tried out ctwm and I cannot get the bug to occur. All menus open fine.
Comment 4 Tobias C. Berner freebsd_committer 2021-01-21 22:05:04 UTC
(In reply to anthony.elizondo+freebsd from comment #3)

You might be able to set an environment variable suggesting that you are running a desktop like gnome or kde, and see if it works then in twm, for example XDG_CURRENT_DESKTOP 

mfg Tobias
Comment 5 anthony.elizondo+freebsd 2021-01-22 00:16:08 UTC
In twm I tried setting XDG_CURRENT_DESKTOP to "kde" first, then tried "GNOME". Neither had any effect on either VSCode or Chromium.
Comment 6 anthony.elizondo+freebsd 2021-02-01 19:38:56 UTC
Title updated.

I posted to https://old.reddit.com/r/freebsd/comments/l1pm1g/bug_where_menus_will_not_open_chromium_vs_code/ and confirmed others can reproduce.
Comment 7 Tobias C. Berner freebsd_committer 2021-02-08 18:59:06 UTC
(In reply to anthony.elizondo+freebsd from comment #6)
Moin moin 

Have you tried the patch attached in redit?

mfg Tobias