Apple keeps changing how windows are drawn under 10.14 Mojave, even between minor
releases!
This change is required to correctly update a GL window moved from a non-retina to
a retina display under 10.14.2 public beta 3 (glpuzzle shows the problem).
It's unsure if it will still be necessary with 10.14.2, or later versions, but the change
does no harm if it's not necessary.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13125 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
After experimenting with a modified cairo_test program that draws both with
cairo and with regular FLTK drawing functions to the same window, it seems
necessary to control for possible changes to the graphics context made by
cairo in Fl_Window::make_current() rather than in
cairo_create_surface().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13120 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This implementation puts all code related to Cairo support under Mojave in
the Cairo-specific source file cairo/Fl_Cairo.cxx, which is preferable.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13116 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This post http://www.fltk.org/newsgroups.php?s36927+gfltk.general+v36944
reports a full-size Cairo-using FLTK app to be OK under Mojave with the
equivalent of this fix for the 1.4 branch.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13114 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This patch fixes two aspects described in STR #3119:
(a) enables detection and prefers pixel formats with composition
(b) selects no more than 32 bit colors (8 bits per pixel)
(a) was the reason for this STR, (b) was reported repeatedly in
fltk.general (see STR #3119).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13112 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The cairo_test program would redraw the window vertically flipped after the window was
hidden or miniaturized when layer-backed windows were used.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13111 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The problem was visible with test/mandelbrot and with layer-backed views.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13101 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Mojave support requires to draw windows using so-called "layer-backed views".
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13077 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The regression was detected by "FLTK 1.4 on macOS: Trouble compiling my Application with Makefile"
in fltk.general.
The fix is to have unbundled apps initialize under MacOS 10.13 as under earlier OS,
thus the new initialization procedure introduced for 10.13 is for bundled apps only.
Tested OK on 10.13.6 and 10.14 public beta 10.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The new procedure essentially resizes the window, as done on the X11+EWMH and Windows platforms.
This improves in particular the possibility to turn an Fl_Gl_Window fullscreen on and off.
MacOS 10.10+ is required because the procedure isn't stable (random crashes during fast switches) with 10.9.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13051 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The ABI compatibility was checked with the abi-compliance-checker tool.
The same code has already been committed in the 1.4 branch.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13043 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
FLTK now transforms that into \n as is expected under MacOS.
Older MS Office apps used \r as old MacOS software.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13015 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Some border lines were too short or too long, the shading code would draw
too many shaded lines, and the code was hard to understand.
With this commit all background pixels of the box are drawn exactly once.
The border lines are consistent, but some pixels of the border are not
drawn at all so the background shines through. This is intended for
backwards compatibility.
A minor change is that the drawn background does no longer overlap the
border lines. Hence undrawn pixels that previously displayed the colored
box background are now transparent and show the parent widget's color.
This commit adds comments and implementation notes to make the code easier
to understand and better maintainable (hopefully).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12778 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Because opening a file can call the event loop and thus access the list of dropped files,
it's necessary to remove the object from the list before opening the file.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12521 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
With MacOS 10.13 "High Sierra", it was necessary to change what happens at application start time.
The new procedure is:
fl_open_display() calls [NSApp run], and during this call:
the main event loop is started;
the app delegate receives an openFile: message for each file dropped on the app icon. Each
such filename is memorised in an NSMutableArray called dropped_files_list;
the app delegate receives applicationDidFinishLaunching and stops the main event loop
(this seems to occur unpredictably after the first openFile: message or after all of them).
When the FLTK event loop begins, it checks whether dropped_files_list is empty. If it is not,
the first element of this list is a filename which is opened and is removed from dropped_files_list.
This new setup allows to turn resizable windows fullscreen and back as expected under MacOS,
and to support launching apps while dropping file(s) on its icon.
For now, the new setup is used only when MacOS 10.13 is running.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12509 ea41ed52-d2ee-0310-a9c1-e6b18d33e121