-
Notifications
You must be signed in to change notification settings - Fork 257
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
macOS regression with glwindow, glsubwindow and tile. #968
Comments
I was afraid that there is a use case where my easy fix would not work. It seems to obvious. Do you think you can generate a small program that shows the behavior? That would be very helpful. |
Steps to reproduce. I thought it was @ManoloFLTK (sorry @MatthiasWM) It is long, but trust me, it is easy:
#set(FLTK_GIT_REPOSITORY "https://github.com/fltk/fltk.git")
This places the program and libs inside:
|
I think the issue happens when the window is refit to cover the whole screen work area (so you might need to use a 4K movie for testing). |
@ggarra13 The procedure you propose is far too complex. Sorry. The issue you mention apparently occurs without any GL scene running. I would expect a simple program with a couple of subwindows and Fl_Tile objects mimicking your app's main window to be enough to trigger the bug and help FLTK developers correct it. |
Ok. I was able to simplify it and reproduce in a simple example. Just call: runme.sh |
@ggarra13 OK. I've downloaded macos_bug.zip and see I can build and run the small program inside on macOS. What is the bug therein? |
@ggarra13 The problem is in your calculations to position and size your toplevel window in the screen that are plain wrong. Use this modified code for your function cb_Resize() and you'll see that the bug disappears. You'll see also that the window is correctly positioned both when the dock is at bottom or at left (or right) of the display. Your errors are mainly to forget that
|
@ManoloFLTK Yes, I see the issue fixed now. Clossing the issue. |
@ggarra13 It occurs now to me that the new in 1.4 member function Fl_Window::maximize() is perfect for you. It can resize your window so it covers all the display without requiring any coordinate and size computation. |
@ManoloFLTK Thanks, Manolo. But in my real application, I have to do more than that. I allow position and sizing the window to any values (so the viewer sticks in one position or to a certain size in the Desktop). That's why I keep posX and posY and have to do all sort of sanity checks at the end. |
I found out the issue it is still not fixed correctly on macOS. I am attaching a file with your original fix (which I think was wrong). And with my actual code that still shows the issue. See the comments in the code. I am using latest FLTK master. To compile use fltk-config --compile main.cpp --use-gl |
Never mind. It was a simple math issue. Fixed. |
Describe the bug
There's been a regression on macOS with OpenGL windows and Tile, where the tile is not respected.
To Reproduce
N/A yet.
I did not do a full bisect yet, but:
7ec6f96 # okay
eeed395 # broken
Expected behavior
The behavior should be consistant between both tags (it should be like in okay).
Screenshots
Notice the topbar with "Color", exposure, etc. Also note the separator (dragger) between the timeline and the view window.
See how in this version the main viewport window is bigger. It partially overlaps the top bar and the separator betweeen the timeline and view window is gone. Also, the dragger would show inside the timeline (it would change the icon only there) and crashes happen when showing thumbnail previews parented to the timeline.
FLTK Version
Please complete the following information and delete non-applicable lines:
FLTK Configure / Build Options
N/A. Same with both.
Operating System / Platform:
Please be as precise as possible, e.g. "Linux: Ubuntu 20.04"
The text was updated successfully, but these errors were encountered: