Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buggy behaviour of dropdown menus on secondary monitor under Wayland #724

Closed
polter-rnd opened this issue Apr 28, 2023 · 5 comments
Closed
Assignees
Labels
fixed The issue or PR was fixed. Platform: Wayland platform specific (Unix/Wayland)

Comments

@polter-rnd
Copy link
Contributor

polter-rnd commented Apr 28, 2023

Describe the bug

When running test/forms example under Wayland on secondary monitor, when the drop down does not fit the available space above, it is not drawn until the window is dragged below.

Important: it only reproduces on secondary monitor.

To Reproduce
Steps to reproduce the behavior:

  1. Run bin/test/forms example under Wayland (GNOME)
  2. Move the window on secondary monitor
  3. Position it on top of the screen
  4. Open "Boxtype" menu and select the last entry
  5. Try to open menu again

Expected behavior
It should open as usual, but in fact it does not. When I drag the window down, it eventually is drawn.
Sometimes it segfaults when moving mouse around the area where menu should be drawn.

Video

Kooha-2023-04-28-15-41-27.mp4

FLTK Version

  • Version: 1.4.0
  • Downloaded and self-built from: Git
  • If from Git, branch: master
  • If from Git, commit: 52a1563

FLTK Configure / Build Options

  • cmake -DCMAKE_BUILD_TYPE=Debug -DOPTION_WAYLAND_ONLY=ON ..

Operating System / Platform:

  • OS: Linux
  • OS Version: Fedora 37

Linux/Unix Runtime, if applicable:

  • Wayland / GNOME 43

Additional context

Segfault call stack is the same as in issue #723

I'm attaching another core dump here as well, just in case:

forms3-debug.zip

@ManoloFLTK
Copy link
Contributor

@polter-rnd The crash you report is hopefuly fixed with the commit mentionned above. Please, report here if you confirm that.

I can reproduce the problem described here. What I see is : when a popup menu window is expected to appear and the current window is on a secondary display and the normal position of the popup would make it hit the top of the display, the expected popup does not appear.
What should happen is that Wayland's constraint mechanism should position the popup somewhat lower than asked so the popup is fully on the display.
No problem if the popup's normal position would make it hit the display bottom: the constraint mechanism does position the popup higher.
No problem if the current window is on the main display: the constraint mechanism behaves correctly to avoid having the top or the bottom parts of the popup window invisible.

For me, that's a bug of the Wayland compositor. I'm not sure if something can be done within the FLTK library to avoid it.

@ManoloFLTK
Copy link
Contributor

@polter-rnd I believe the commit mentionned above should fix the behaviour of dropdown menus on a secondary display. Please, report here what you see.

@ManoloFLTK ManoloFLTK self-assigned this May 2, 2023
@ManoloFLTK ManoloFLTK added the Platform: Wayland platform specific (Unix/Wayland) label May 2, 2023
@polter-rnd
Copy link
Contributor Author

polter-rnd commented May 2, 2023

Hi, thank you, combo box behavior in bin/test/forms is now perfect!

However looks like the fix introduced strange side effects on window menus (does not depend on primary/secondary monitor), please watch till the end:

Kooha-2023-05-02-16-44-38.mp4

@ManoloFLTK
Copy link
Contributor

The last commit hopefully takes care of the last problem mentionned here.

@polter-rnd
Copy link
Contributor Author

Thanks, confirming it is fixed now

@ManoloFLTK ManoloFLTK added the fixed The issue or PR was fixed. label Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed The issue or PR was fixed. Platform: Wayland platform specific (Unix/Wayland)
Projects
None yet
Development

No branches or pull requests

2 participants