You are not logged in.

#1 2024-05-22 17:23:34

jeudi
Member
From: At the bar
Registered: 2024-05-22
Posts: 7

[Solved] Context menu in web browser doesn't work on TWM

Hi,

I'm using TWM as WM.

On Firefox (on Chromium too) the context menu doesn't work correctly. Both with right-click or left-click.
The menu shows up but when I move my mouse cursor on it, it disappears.
I have to hold the mouse button to be able to select an option in the menu.

I tried to resolve the problem with my friend DuckDuckGo but we didn't find any solution.
Any clue ? Do I need to share some informations about my setup ?

Thanks. : *

Last edited by jeudi (2024-05-22 22:40:43)


w00t w00t

Offline

#2 2024-05-22 21:35:23

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: [Solved] Context menu in web browser doesn't work on TWM

That's gonna be down to the focus-follows-mouse behavior and

when I move my mouse cursor on it

apparently the menu not showing up *under* the pointer (this is under the clients control) but the client is also supposed to grab the pointer.
At least for FF does doesn't seem to be the case, but can be enforced?
https://bugzilla.mozilla.org/show_bug.c … 820542#c52

Offline

#3 2024-05-22 21:43:35

jeudi
Member
From: At the bar
Registered: 2024-05-22
Posts: 7

Re: [Solved] Context menu in web browser doesn't work on TWM

seth wrote:

That's gonna be down to the focus-follows-mouse behavior and

when I move my mouse cursor on it

apparently the menu not showing up *under* the pointer (this is under the clients control) but the client is also supposed to grab the pointer.
At least for FF does doesn't seem to be the case, but can be enforced?
https://bugzilla.mozilla.org/show_bug.c … 820542#c52

I thought about focus-follows-mouse, but if I remember right, I had the same issue with Openbox.
Maybe I miss a lib or something like that which is optional.


w00t w00t

Offline

#4 2024-05-22 22:13:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [Solved] Context menu in web browser doesn't work on TWM

This is a GTK issue (GTK3 and I'd assume GTK4).  These toolkits rely on non-standard behavior from window managers in order to function properly.  Twm definitely wouldn't be expected to handle this - I'd figure openbox should (seth's cue here) though I'd not entirely surprised it also hasn't kept up with GTKs most recent shenanigans.

My diagnosis could be tested by confirming other simple WMs like TinyWM also show the same issue and that Gnome doesn't.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2024-05-22 22:14:09

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: [Solved] Context menu in web browser doesn't work on TWM

openbox supports FFM and CTF and since the issue exists w/ different clients and there's a mozilla bug about this I doubt that there's some magical *optional* lib that somehow fixes your problems and is just somehow hidden for the lulz.

Have you tried to force the mouse grabbing behavior w/ firefox?

Edit: just tested and gtk3-demo popups grab the pointer, on a NETWM compliant WM.
You could test this by running "sleep 5; xprop" and spawn a popup within the next 5 seconds.
xprop should then fail because it cannot grab the pointer.
If it doesn't, the popup doesn't grab the pointer for reasons™

Edit #2: gtk3-demo popups under TWM (but in xephyr) grabs the pointer for me.

Last edited by seth (2024-05-22 22:25:26)

Offline

#6 2024-05-22 22:26:53

jeudi
Member
From: At the bar
Registered: 2024-05-22
Posts: 7

Re: [Solved] Context menu in web browser doesn't work on TWM

Trilby wrote:

This is a GTK issue (GTK3 and I'd assume GTK4).  These toolkits rely on non-standard behavior from window managers in order to function properly.  Twm definitely wouldn't be expected to handle this - I'd figure openbox should (seth's cue here) though I'd not entirely surprised it also hasn't kept up with GTKs most recent shenanigans.

My diagnosis could be tested by confirming other simple WMs like TinyWM also show the same issue and that Gnome doesn't.

So, it means TWM is too old ?


w00t w00t

Offline

#7 2024-05-22 22:29:26

jeudi
Member
From: At the bar
Registered: 2024-05-22
Posts: 7

Re: [Solved] Context menu in web browser doesn't work on TWM

seth wrote:

openbox supports FFM and CTF and since the issue exists w/ different clients and there's a mozilla bug about this I doubt that there's some magical *optional* lib that somehow fixes your problems and is just somehow hidden for the lulz.

Have you tried to force the mouse grabbing behavior w/ firefox?

Edit: just tested and gtk3-demo popups grab the pointer, on a NETWM compliant WM.
You could test this by running "sleep 5; xprop" and spawn a popup within the next 5 seconds.
xprop should then fail because it cannot grab the pointer.
If it doesn't, the popup doesn't grab the pointer for reasons™

Edit #2: gtk3-demo popups under TWM (but in xephyr) grabs the pointer for me.

How do I force mouse grabbing w/ firefox ? Sorry but I'm tired, I spent hours searching a solution. Tomorrow I'll try to understand what you mean.


w00t w00t

Offline

#8 2024-05-22 22:32:27

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: [Solved] Context menu in web browser doesn't work on TWM

Then tomorrow, click the link I posted in #2

Last edited by seth (2024-05-22 22:32:37)

Offline

#9 2024-05-22 22:36:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [Solved] Context menu in web browser doesn't work on TWM

jeudi wrote:

So, it means TWM is too old ?

Not really - age doesn't have much to do with it.  Gnome / GTK have been gradually diverging from the rest of the *nix ecosystem for some time.  They tend to do things their own ways that are often at odds with common standards.  Most DEs and big WMs take specific steps to comply with (or pander to) GTKs quirks but some smaller projects do not.

Certainly older projects like TWM will not have even had the chance to decide whether or not to comply with these quirks, so one could argue age is relevant, but if TWM code were actively maintained, I'm pretty sure they'd still not add all the code needed to keep GTK functioning at 100%.

Caveat: my hypothesis / diagnosis here could be wrong. I have definitely seen behavior that sounds identical to what you are describing purely due to WMs not pandering to GTKs whims - but there could very well be more than one way to arrive at the same symptoms.

Last edited by Trilby (2024-05-22 22:36:59)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2024-05-22 22:39:45

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: [Solved] Context menu in web browser doesn't work on TWM

Caveat, too: I've "GDK_CORE_DEVICE_EVENTS=1" exported (because gtk's defaut wheel handling is dumb) which might have influenced the  behavior under TWM

Edit: no, doesn't

Last edited by seth (2024-05-22 22:46:51)

Offline

#11 2024-05-22 22:40:23

jeudi
Member
From: At the bar
Registered: 2024-05-22
Posts: 7

Re: [Solved] Context menu in web browser doesn't work on TWM

seth wrote:

Then tomorrow, click the link I posted in #2

I read again your link and I finally found a fix.

I had to set the value of :

widget.gtk.grab-pointer

in Firefox to 1 instead of 2.

I did it on Firefox and it's working on Chromium too. Don't know why Oo
[edit] It worked on Chromium too when I launched it but now it's not working anymore. But I know where to search smile

Thank you so much !

Last edited by jeudi (2024-05-22 22:45:59)


w00t w00t

Offline

Board footer

Powered by FluxBB