fvwmorg/fvwm3

Unclickable popup windows in all Chromium applications

hakonrk opened this issue · 4 comments

There is a well-known problem with all applications based on Chromium that affect a large number of niche WMs. The usual symptom is a popup window that disappears when you try to click it, but it can also manifest itself in other ways. This problem has been going on for years (see for example https://bugs.chromium.org/p/chromium/issues/detail?id=713746, which was filed in April 2017).

For most Chromium applications, you can work around the problem by starting the application with --disable-features=SendMouseLeaveEvents, and that was good enough for me until recently. Unfortunately, this workaround longer works with VSCode, which breaks a lot of its functionality.

I tried the latest revision of Fvwm 3 (master branch), and the problem still persists there. Since this problem affects a lot of WMs, not just Fvwm, I googled a bit to see if anyone had figured out how to solve it on the WM side, and I found this fix from StumpWM:

stumpwm/stumpwm@90cbcbd

Apparently the problem is that the click event for the popup window is received in the parent window, but the event's X/Y coordinates are relative to the popup window. Therefore, attempting to click something in the popup window results in a click event outside the popup, which effectively closes the popup window immediately.

StumpWM fixed the problem by translating the X/Y coordinates so that they are relative to the parent window, where the event was received.

Has anyone tried to apply a similar fix in Fvwm?

raid1 commented

Thanks for your research. I was just going to write a similar issue, based on this:
https://forum.vivaldi.net/topic/77139/clicking-on-links-in-popups-closes-them

But now I tried running vivaldi (or chromium) with this parameter and it actually works!
However, MouseLeave events might be necessary on some pages.

I have been struggling with this for half a year. And even switched to fvwm3 now (which was a good side effect )
but the problem is still there.

@devs: you can easily test this by e.g. going to www.winsim-dot-de
Try selecting any entry in the popup menus

Thank you for taking a look at that!

Tricky one this, as this isn't something fvwm can really help with. There used to be this --disable-features=SendMouseLeaveEvents -- but that's down to Chromium to fix somehow.

raid1 commented

I see that it's not really fvwm's fault. But then why does it not happen with other WMs?
Wouldn't it be an option to try what StumpWM has implemented?

Thanks,
Andy

mjk-gh commented

@ThomasAdam wrote:

Tricky one this, as this isn't something fvwm can really help with.

Why wouldn't the StumpWM solution work for fvwm? And why is an innocent little mouse binding (see below), that does not even match the simple mouse-1-left-click that's used to trigger the bug, enough to trigger the bug?

There used to be this --disable-features=SendMouseLeaveEvents -- but that's down to Chromium to fix somehow.

I just installed the messenger "dino" (package dino-im in Devuan/Debian), which uses GTK4, and encountered the unclickable popup problem (each message generates a mini-popup with 2 icons, as long as you hover with the mouse over the message).

And just as with #777, this bug gets triggered by the line

#     Button  Context  Modifiers  Function
Mouse 1       WTSFI    4          Move

The context can be as small as W, and the modifier can be S or M as well. Finally, the Function Move can be replaced by Iconify or whatever, and the bug still gets triggered.

Tried fvwm 1.0.8, still happening.