Describe the bug
Apologies if this ends up being a bit all over the place.
Note: Putting the videos in fullscreen mode makes the issues much clearer.
In my application, I changed my Fl_Double_Window to a Fl_Overlay_Window so that I could implement a draw_overlay() in order to draw a fl_overlay_rect() .
But there was an unbearable flicker:
https://github.com/fltk/fltk/assets/5231310/ef1e465e-46c1-4ccd-a660-8cc8251d4dc1
I was able to avoid the flicker by abandoning Fl_Overlay_Window and sticking with a Fl_Double_Window and simply putting fl_overlay_rect() in draw() instead of in draw_overlay() (although I may be assuming incorrectly that fl_overlay_rect() may be called in any general purpose draw() ).
This now works fine on Windows and is much more responsive than draw_overlay() :
https://github.com/fltk/fltk/assets/5231310/e00ec42f-2887-4b94-a938-3df9ee67dc0f
However on Linux, the dotted line for the overlay rectangle is often corrupt and uneven, especially on the top border, although all 4 borders may be affected:
https://github.com/fltk/fltk/assets/5231310/5516dbbf-814a-4622-bd2e-0baa47d78e7b
And on Mac, it crashes if I drag the rectangle a little too far outside the window:
https://github.com/fltk/fltk/assets/5231310/4c34e6cf-c60c-4595-b357-0a0a12149d80
To Reproduce
I may try to find time to create a minified repro program that demonstrates the issue.
If you're really interested, the repo where this issue exists is here: https://github.com/dannye/crystal-tracker
Although I don't really expect you to go so far out of your way to build the thing.
Expected behavior
I would expect Fl_Overlay_Window /draw_overlay() /fl_overlay_rect() to not have terrible flicker/lag (at least on Windows). (Full disclosure, I didn't even test Fl_Overlay_Window and draw_overlay() on Linux or Mac.)
On Linux, I would expect fl_overlay_rect() to not have a corrupt, uneven dotted line.
On Mac, I would expect fl_overlay_rect() to not crash if used to draw a rect that extends beyond the client rect.
Screenshots
See video clips above.
FLTK Version
- Version: 1.3.8 (I apologize if some or all of these issues are moot in the upcoming 1.4.0)
- Downloaded and self-built from: Git
- If from Git, tag: release-1.3.8
FLTK Configure / Build Options
Windows:
git clone -b release-1.3.8 https://github.com/fltk/fltk.git lib/fltk
Added #define FL_ABI_VERSION 10308 in abi-version.ide.
Opened ide\VisualC2010\fltk.sln.
Built the following .lib files: fltk, fltkimages, fltkjpeg, fltkpng, and fltkzlib
Linux and Mac:
git clone -b release-1.3.8 https://github.com/fltk/fltk.git lib/fltk
pushd lib/fltk
./autogen.sh --prefix="$(realpath "$PWD/../..")" --with-abiversion=10308
make
make install
popd
Operating System / Platform:
- OS: Linux, macOS, Windows
- OS Version: Peppermint OS 10, macOS 11.4, Windows 11
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/issues/735@github.com>
[ Direct Link to Message ] |