Commit Graph

6756 Commits

Author SHA1 Message Date
Albrecht Schlosser
3bd78bb022 Fix CMake build (fluid) on case sensitive macOS file systems.
Note: Xcode projects NOT modified. These project files appear to refer
to 'fluid/Fluid.app' (with uppercase 'F') as well.
2018-12-04 15:00:49 +01:00
Albrecht Schlosser
9cd69dbad1 Fix line endings of Visual Studio IDE files.
This is only a technical (git) change.
File endings have been set to cr/lf in ide/.gitattributes.
2018-12-04 14:46:24 +01:00
Manolo Gouy
a0b4e146e8 MacOS: further support of scenarios mixing miniaturize/deminiaturize/change screen configurations.
Test scenario:
 - use 2-screen configuration, one retina, one non-retina as main screen
 - put subwindow-containing window on retina
 - miniaturize window
 - close retina screen
 - de-miniaturize window
 The subwindow was wrong without this change.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13132 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-23 09:52:26 +00:00
Manolo Gouy
433b77e5d9 MacOS: introduce classes FLViewLayer and FLGLViewLayer to support layer-based windows under Mojave.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13130 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-22 14:28:57 +00:00
Manolo Gouy
47127be7dd MacOS: fix necessary for 10.14.2 public beta 3
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
2018-11-17 16:05:11 +00:00
Manolo Gouy
93f4f91429 MacOS: simpler implementation of extra code necessary at first display of layer-backed GL windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13122 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-16 08:56:48 +00:00
Manolo Gouy
9dfa8a92a9 Fix macOS 10.14 Mojave support of the FLTK-cairo interface.
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
2018-11-09 14:46:49 +00:00
Manolo Gouy
50b8ba6a53 Remove compilation warning with -Wexpansion-to-defined
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13118 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-09 13:34:02 +00:00
Manolo Gouy
2eea5d5856 Support of macOS 10.14 Mojave: better implementation of the Cairo-FLTK interface.
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
2018-11-08 17:23:27 +00:00
Manolo Gouy
63626c8f26 Cairo support under macOS 10.14 Mojave: slightly simpler implementation
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
2018-11-08 13:14:37 +00:00
Albrecht Schlosser
8fb3709ff0 Windows/OpenGL: fix pixel format detection (STR #3119).
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
2018-11-05 18:56:24 +00:00
Manolo Gouy
6467a4ada0 MacOS: fix support of Cairo under macOS 10.14 Mojave.
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
2018-11-05 09:04:38 +00:00
Manolo Gouy
7e04fe0acf Further fix to support gl_start() under MacOS platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13110 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-02 12:25:43 +00:00
Manolo Gouy
04e782d946 MacOS Mojave: restore support of gl_start()/gl_finish().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13107 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-01 21:01:41 +00:00
Manolo Gouy
fa89042fac Avoid dependence of Fl_cocoa.mm from libfltk_gl
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13102 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-30 15:45:31 +00:00
Manolo Gouy
5be486de5f Fix issue when moving window between retina/non-retina screens while window is under progressive redraw.
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
2018-10-30 08:22:26 +00:00
Manolo Gouy
3409bcbb5e Fix moving GL subwindow between retina and non-retina screens.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13095 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 17:17:43 +00:00
Manolo Gouy
3dcee16c5e Fix handling of layer-backed GL window moved between retina and non-retina screens.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13092 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 15:52:51 +00:00
Manolo Gouy
4424fa9d35 Fix first drawing of layer-backed OpenGL window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13088 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-28 16:53:40 +00:00
Manolo Gouy
e89bdd8c82 Implement method drawRect:(NSRect) for class FLViewGL
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13083 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-26 07:44:29 +00:00
Manolo Gouy
8ceabc92ef Slight simplification by removal of response to viewFrameDidChangeNotification
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13082 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-25 08:55:35 +00:00
Manolo Gouy
d2730d3e2c Mention new support for MacOS 10.14
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13079 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-21 07:06:51 +00:00
Manolo Gouy
4c8b7c99ea Add support of MacOS 10.14 Mojave when app is linked with SDK 10.14
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
2018-10-20 21:58:04 +00:00
Albrecht Schlosser
a2ff8ee535 Document that Fl_Widget::GROUP_RELATIVE bit is not used.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13074 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-19 16:51:57 +00:00
Manolo Gouy
2b7abcf6b4 Prepare for support of MacOS 10.14 Mojave.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13068 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-16 09:30:46 +00:00
Manolo Gouy
b868e87c04 MacOS: fix is_bundled() function for case when [NSBundle mainBundle] is nil.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13056 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-22 07:26:37 +00:00
Manolo Gouy
23e36efa83 Mention the last 2 committed changes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13053 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-17 09:05:38 +00:00
Manolo Gouy
38cd22d609 MacOS: fix regression in OS 10.13 where an unbundled app had its system menu bar unresponsive.
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
2018-09-17 08:54:41 +00:00
Manolo Gouy
39bb0bf488 MacOS 10.10+: Fl_Window::fullscreen() and fullscreen_off() no longer call Fl_Window::hide() + Fl_Window::show()
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
2018-09-17 08:08:39 +00:00
Manolo Gouy
226b64e9bd X11 + OpenGL: new procedure to create OpenGL3+ contexts giving access to the highest OpenGL version supported by GLX.
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
2018-09-06 16:51:31 +00:00
Manolo Gouy
121abf4ca9 Mention MacOS change to support pasting from recent MS Office apps
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13016 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-10 15:56:50 +00:00
Manolo Gouy
7bd8638805 Support recent MS Office apps that use \r\n as end of line in pasteboard.
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
2018-08-10 15:51:26 +00:00
Albrecht Schlosser
89b83593c5 Fix line endings (svn property) of fltk-config.in.
Set line ending to LF.
Set git attribute 'eol=lf'.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13002 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-08-03 09:23:32 +00:00
Albrecht Schlosser
1f9c31579e Add .gitattributes - prepare for migration to git.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12997 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-07-31 08:08:07 +00:00
Albrecht Schlosser
d9bdb21a59 Update .gitignore: prepare for migration to git.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12996 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-07-31 07:42:23 +00:00
Manolo Gouy
e60e4750f8 Fix Fl::paste() in Fl_win32.cxx to paste GIF images.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12879 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-29 16:09:15 +00:00
Albrecht Schlosser
b26d944e58 Document the transition from FL/x.H to FL/platform.H.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12864 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-20 09:21:31 +00:00
Albrecht Schlosser
9bc2c7ba52 Add FL/platform.H for compatibility with FLTK 1.4.0 and higher.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12861 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-19 16:58:22 +00:00
Albrecht Schlosser
b88929f98c Fix Fl_Text_Editor overstrike mode (STR #3463).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12848 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-04-18 13:13:07 +00:00
Albrecht Schlosser
fe7ff8888e Fix, optimize, and comment "gleam" scheme box drawing.
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
2018-03-20 16:20:17 +00:00
Albrecht Schlosser
67fd2793a3 Fix latest MinGW build error (S_OK, __FD_ISSET, STR #3454).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12679 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-19 14:50:02 +00:00
Manolo Gouy
6e5c31eab6 Introduce global fl_mac_quit_early that, if set to 0, prevents FLTK from terminating the app after cmd-Q without Fl::run() returning.
This is a MacOS-specific public global variable.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12649 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-02-07 09:37:10 +00:00
Manolo Gouy
49a1d38cfd WIN32 + OpenGL: fix use of wglUseFontBitmapsW() to draw all of UTF under GL with gl_draw() - continued.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12624 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-07 07:47:27 +00:00
Manolo Gouy
3a90d5dc14 WIN32 + OpenGL: fix use of wglUseFontBitmapsW() to draw all of UTF under GL with gl_draw().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12623 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-01-07 07:41:46 +00:00
Albrecht Schlosser
aa216a46d4 CMake/Windows only: add missing #define WIN32 for all compilers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12613 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-28 23:22:43 +00:00
Manolo Gouy
a124051e7e Fix crash after calling Fl_Copy_Surface::draw_decorated_window() with MacOS 10.13
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12611 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-12-28 07:27:18 +00:00
Manolo Gouy
ed632e8cfd Top-level menus should not be inactivated. Their items can be.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12571 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-27 20:50:34 +00:00
Albrecht Schlosser
c249933075 Fix illegal memory access after free when closing fluid (STR #3427).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12566 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-18 18:12:18 +00:00
Albrecht Schlosser
2c01c3ece9 Fix crash when closing fluid with Fl_Table (STR #3427).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12564 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-11-18 17:40:26 +00:00
Manolo Gouy
e0aa84368d MacOS: improve handling of dropped files at launch time for MacOS 10.13
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
2017-10-22 06:19:21 +00:00