Commit Graph

6745 Commits

Author SHA1 Message Date
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
Manolo Gouy
f3d5f20315 Mac OS 10.13 "High Sierra": restore possibility to run app from a command line and find it activated.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12515 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-18 15:23:41 +00:00
Manolo Gouy
714d970db1 MacOS: make sure all files dropped to the app at launch time are open when Fl_Window->wait_for_expose() is used.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12513 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-18 13:57:18 +00:00
Manolo Gouy
db96b5e091 Mac OS: complete changes needed for 10.13 "High Sierra" regarding how FLTK applications start.
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
2017-10-17 10:35:29 +00:00
Manolo Gouy
150c261a45 MacOS 10.13: fix problem with window made fullscreen by clicking on green window button.
With MacOS 10.13 "High Sierra", when a window is made fullscreen by clicking on the green window button,
 the window hides the system menubar, but it's not possible to show the menubar by moving the pointer
 to the very top of the window. This new way of starting apps fixes this problem.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12504 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-15 17:42:48 +00:00
Manolo Gouy
64112db0cb Better implementation of Fl_Window::wait_for_expose() for Mac OS 10.13 High Sierra.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12487 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-11 15:27:36 +00:00
Albrecht Schlosser
1af036f6ed Add public accessor Fl_Shared_Image::original().
This public, inline, and read-only accessor is intended for debugging
purposes but can be useful for user code as well.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12473 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-10-02 12:38:28 +00:00
Manolo Gouy
d9e36a352f Fix for STR#3397: Font size/type not working inside GL window with gl_font(), gl_draw()
Function load_xfont_for_xft2() tries to load an X font corresponding to a given xft font, to use it
with GL. Under Ubuntu, always the same font was loaded, whatever the family, style and size.
With this fix, style and size requests are honored under Ubuntu. Family request may not be honored.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12403 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-27 07:24:49 +00:00
Manolo Gouy
4703285d28 Strenghten Fl::paste(): the widget's handle method may change Fl::e_text.
The widget's handle method may change the value of Fl::e_text.
 This occurs for instance if this method calls fl_choice().
 So, memorize the value of Fl::e_text before, to delete the correct array after the call to the handle method.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12373 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-08-06 06:29:33 +00:00
Albrecht Schlosser
7b64a4656a Update dependencies (make depend).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12337 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-18 19:25:36 +00:00
Albrecht Schlosser
08533b52b5 Bump version numbers to 1.3.5, prepare for release.
There are still files that need changes, but with this commit the
majority of files is up-to-date.

Files left to be updated later:

 - ANNOUNCEMENT         partly done, needs RELEASE DATE !
 - CHANGES              up-to-date (?), but needs RELEASE DATE !
 - KNOWN_BUGS.html      needs more work (snapshot)
 - maybe more           (unknown)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12336 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-18 18:32:47 +00:00
Albrecht Schlosser
6052771126 Fix ignored buffer pre-allocation (requestedSize) in Fl_Text_Buffer.
See fltk.general "Fl_Text_Buffer constructor bug" on Dec 5, 2016.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12335 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2017-07-18 17:06:42 +00:00