fvwmorg/fvwm3

FLTK applications misbehave - menus and dropdown windows unclickable

Closed this issue · 31 comments

In FLTK applications Menus and Dropdown windows do 'not always' work ( they seem to be badly positioned, or off screen )
Applications that I have experienced the problem with are

Upfront Information

  • Fvwm3 version (run: fvwm3 --version)

  • fvwm3 1.0.6 (1.0.5-52-gad8e4a0d)

  • Linux distribution or BSD name/version

  • Gentoo Linux

  • Platform (run: uname -sp)

  • Linux Intel(R) Core(TM) m3-8100Y CPU @ 1.10GHz

Expected Behaviour

Menus and dropdown windows should appear and be clickable

Actual Behaviour

Menus do not appear, but have visibly been activated as movement and selection using cursur keys from the keyboard and hitting enter is possible ( though without seeing the menu )

About 1 in 2 times it seems to work as expected.

The bug also seems to have been discussed on to FLTK mailing list c.f. https://www.fltk.org/newsgroups.php?s2134+gfltk.issues+v2135

What should have happened, but didn't?

Menus should appear and be clickable

Steps to Reproduce

Launch an fltk app twice or three times and see the bug appearing as you might be unable to click drop down menus

  • Does the problem also happen with Fvwm2?

I have not noticed it.

Does Fvwm3 crash?

No

Hi @haschka,

Can you suggest an application I can test with?

You can try seaview (http://pbil.univ-lyon1.fr/software/seaview3.html), if the bug appears 1 in 3 times, the all menus of the app do not appear when clicking them. I guess it is in most repositories. Besides seaview is pretty small. Otherwise i guess Dillo ( the webbrowser ) uses the FLTK but I have not tested it. Though I have not tested. I see the bug happening in seaview and vmd.

I can't reproduce this. Can you try with fvwm3 -f /dev/null to see if you still see the issue?

Hello,

Just tried that, to run it without a config file. But it did not help, I was immediately unable to use VMD.

It does not always happen. I do not have an exact idea of what triggers it. Sometimes opening an other fltk window fixes for a short time. Sometimes the menus are drawn far away from were they should be, and than they are not drawn at all...

I most frequent see this happening in VMD (1 out of 2 times), but it also happens in seaview.

Thanks for looking into it. Tell me if there is something i can do.

If you look at the screenshot that was attached to the bug report over at FLTK, this is also the same thing that I observe that the menu is upwards of where it should be. ( the help menu in the screenshot ) and it does not unroll.

c.f. : https://www.fltk.org/newsgroups.php?s2134+gfltk.issues+v2135

and https://user-images.githubusercontent.com/2400933/118856659-b84cac00-b8c6-11eb-9e0a-b6cc3e6cf461.png

Maybe nestopia is an application you can try.

@haschka

Can you attach your fvwm config, please?

fvwm.tar.gz

Here's my config, but
fvwm3 -f /dev/null
did not have any effect. It did not go away.

Thanks,

Concerning FVWM2 it works flawless at least till version 2.6.8, that have installed on one of my machines.

I am not sure if this is related but in my window selector fltk applications or here vmd in this case has window dimensions 0x0. I guess this might be why they draw menus in wrong places ?

screenshot

cheers,

  • Thomas

Hmm -- that geometry seems wrong -- the window size is not at 0x0 at all.

That aside, I still cannot reproduce your problem, which is very frustrating.

Does this happen with the default config? fvwm3 -f /path/to/default/config?

Hello,

Yes ! It defiantly also happens with the default config.

It does not happen all of the time but I would say at least 1 in 3 times running an application using FLTK.

As said I experience it in VMD and in Seaview.
https://www.ks.uiuc.edu/Research/vmd/
http://pbil.univ-lyon1.fr/software/seaview3.html

Both applications using the FLTK toolkit.

Can you share the output of xrandr -q, or describe your monitor setup.

sure:

haschka@smr ~ $ xrandr -q 
Screen 0: minimum 8 x 8, current 1920 x 1280, maximum 32767 x 32767
eDP1 connected primary 1920x1280+0+0 (normal left inverted right x axis y axis) 220mm x 150mm
   1920x1280     60.00*+
DP1 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
HDMI1 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

Nothing special here, just the single screen on my Microsoft Surface GO 2

I have an issue with gtk3 menu positions, but it is due to a second monitor that is quite a different size than my primary one, just seeing if this might be related. It could still be, just not obvious compared to your setup.

Here it seems to be window related.
It is like you open an FLTK application and it works, you open an other window and its menus stop functioning. You open two further windows and they rework, until you open an other window and the menus stop to work again.

From my side only FLTK applications are affected.
This guy here seems to have exactly the same problem:
https://www.fltk.org/newsgroups.php?s0+gfltk.issues+v2135+T0

I also have the same artefacts as he pointed out. Clicking as here in the screenshot on the molecule window creates an artefact above the, and the menu stays completely invisible.
shot

jnse commented

Happens to me mostly with qt menus, but sometimes gtk as well- recorded a video demonstrating the problem;

https://linkerror.com/stuff/2023-01-30%2012-09-53.mp4

(note that the recording did get messed up when i changed the resolution - but anyway, you get the idea, hopefully ;) )

Thanks for the video, it sums it up perfectly. For me it also happens with only one single screen. It sometimes "heals" itself just by opening or closing other windows on the screen. So far I have only observed it in FLTK applications, but what you show in your video is exactly the behavior that I get, and it seems that most of the time the menus are rendered off screen and hence are not even visible, select-able. I went on to run "vmd" and "seaview" in Xephyr with twm for the moment... ...

@haschka -- try the gh-779 branch -- this is complete guess work as I'm not able to reproduce this. In speaking with somiaj and jns on IRC, they'll also be trying this.

Just checked out the gh-779 branch. At first I thought it worked, maybe it is less frequent now. Actually I guess it is hard to reproduce, because it seems to be related with window opening, closing. It happens frequent for me as vmd opens dialogs and closes them all the time in FLTK.

Here an other screenshot with seaview where this happens. See how the artefact of the menu is above the menu. ( The actual menu does not unroll, or just as in the other video sometimes it unrolls at an off position ).

If there is a chance that I can log you the window, menu creation, let me know.

Thanks,
Thomas

seaview

As strange as it sounds but here it seems defiantly to have something to do with the windows opened. So it appears if you open new windows, and may disappear if you open new windows. This windows are not forcibly related to the application. Just opening an xterm can trigger that the FLTK application does not work as expected. It the same manner opening a xterm window can heal the behavior of FLTK applications... I hope this helps..

Hi all,

Please try ta/gh-779.

jnse commented

Hi all,

Please try ta/gh-779.

That branch seems to have fixed it for me 👍

Hi can not tell you how happy I am about that. Seems to work for me too ! Bravo !

False alert, after trying and trying I thought this went away, but then I opened vmd and it was back. I have the feeling that it still appears but that it is more rarely happening right now....

Will keep you updated on my observations on my machine.

Well... I've another idea which I've just forced-pushed to the same branch, so please try again when you've time, please.

jnse commented

fwiw for me the bug is still gone (although I'm using qt apps, not tk apps) - I wonder if tk apps care more about the offset whereas qt apps only care about the width/height? In any event, I'll try the latest update as well and report if anything's broken.

jnse commented

This latest force-push breaks everything again for me, @ThomasAdam - and indeed, if we look at the workarea updates with xprop, it's behaving exactly as before now - It's back to using monitor size instead of total xscreen size.

_NET_WORKAREA(CARDINAL) = 0, 0, 1920, 1080, 0, 0, 1920, 1080, 0, 0, 1920, 1080, 0, 0, 1920, 1080 `

jnse commented

Latest update fixed it, and looking good again for me now.

Just compiled commit f28943a seems to work great so far. I will test it during the weekend, as yesterday I thought it worked and than after two hours suddenly it did not.

Thanks for all this, really happy if VMD works normal again

cheers,

Sadly just saw that the bug still persist.
I do not know if it helps, but opening an other xterm window makes it go away in most cases until it all of a suddenly comes up again. Also if the bug happens, new windows are positioned on different locations on the screen.

I hope this helps. Thanks so much !

jnse commented

It's completely fixed for qt apps for me at least... I haven't tested tk yet