Skip to content

[glass] Mechanism2d and Field2d windows can get stuck above the main window #7869

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

Open
rmheuer opened this issue Mar 19, 2025 · 0 comments
Open
Labels
type: bug Something isn't working.

Comments

@rmheuer
Copy link
Contributor

rmheuer commented Mar 19, 2025

Describe the bug
It is possible to drag a Mechanism2d or Field2d window above the top of the main Glass window, making it impossible to drag it back because the title bar is fully off-screen. Other windows do not have this issue because they can be dragged using the body of the window.

To Reproduce
Steps to reproduce the behavior:

  1. Connect Glass to a robot program that publishes a Field2d or Mechanism2d to NetworkTables
  2. Open the Field2d/Mechanism2d window using the NetworkTables menu bar item
  3. Drag the window by the title bar and bring the mouse above the top of the main Glass window, so the title bar gets dragged off screen.
  4. It is now impossible to drag the window back down.

Expected behavior
I would expect the window position to be constrained so that the window stays within the main window bounds. This already works for the other three sides of the main window because a little bit stays visible, but does not work for the top because only the bottom portion stays visible, which is not draggable.

Screenshots
Field2d with title bar above main window title bar:
Image

Desktop (please complete the following information):

  • OS: Linux Mint 22 Cinnamon
  • Project Information: no project, just Glass

Additional context
It is possible to bring the window back down by docking another window that does have a draggable body such as the Timing window into the Field2d/Mechanism2d window, then dragging the combined window downwards using the draggable window. This is however not an ideal solution.

@rmheuer rmheuer added the type: bug Something isn't working. label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working.
Projects
None yet
Development

No branches or pull requests

1 participant