Commit Graph

8220 Commits

Author SHA1 Message Date
Manolo Gouy
015d460c49 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.4@13123 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-16 09:11:54 +00:00
Manolo Gouy
d312284099 Account for property graphicsPort of NSGraphicsContext being deprecated in 10.14
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13121 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-10 09:00:45 +00:00
Manolo Gouy
43b511b784 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_Cocoa_Window_Driver::make_current() rather than in
cairo_create_surface().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13119 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-09 14:35:55 +00:00
Manolo Gouy
b325a6b4b2 Add guard against gl_draw(const char*, int) called with null 2nd argument.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13117 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-08 17:48:18 +00:00
Manolo Gouy
ff20361f5a Support of macOS 10.14 Mojave: take care of the FLTK-Cairo interface.
Discussion "Screen buffer flipped in OSX Mojave running 1.4.x"
in fltk.general, 
    http://www.fltk.org/newsgroups.php?s36913+gfltk.general+v36915
describes a Cairo-using FLTK app that runs well after this modification.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13115 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-08 17:09:24 +00:00
Albrecht Schlosser
055de59c1d Fix comment only (wrong STR number).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13113 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-05 19:05:21 +00:00
Manolo Gouy
09abaf4339 Further fix to support gl_start()/gl_finish() under MacOS platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13109 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-02 12:21:06 +00:00
Manolo Gouy
8a04aeb146 MacOS Mojave and gl_start(): fix for 10.14 but not 10.14.1
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13108 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-02 09:27:04 +00:00
Manolo Gouy
6a201d7070 Add useful cast
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13106 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-01 20:33:35 +00:00
Manolo Gouy
3a2439e31c MacOS Mojave: restore use of gl_start()/gl_finish()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13105 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-01 14:34:22 +00:00
Manolo Gouy
6c8115ee9b Remove use of Fl_Gl_Window_Driver.H in file src/Fl_cocoa.mm
Thus, Fl_cocoa.mm is completely independent from code of libfltk_gl.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13104 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-31 12:45:51 +00:00
Manolo Gouy
22bcc7b4ca Remove all dependency to libfltk_gl from Fl_cocoa.mm.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13103 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-31 09:05:26 +00:00
Manolo Gouy
9e20113757 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.4@13100 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-30 08:12:03 +00:00
Greg Ercolano
d65a5a073c Control resizing behavior of UI buttons
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13099 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 19:59:57 +00:00
Greg Ercolano
554d7d3639 Tooltip for browse button, and include a fallback label if icon not found.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13098 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 19:33:11 +00:00
Greg Ercolano
cfe555f410 Print both returned path and relative path in tty.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13097 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 18:33:37 +00:00
Manolo Gouy
c146ba344c Removed temporary comment.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13096 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 17:20:31 +00:00
Greg Ercolano
cf5f3fbca2 Fixes STR#3500 - "Must type two leading slashes to enter an absolute path"
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13094 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 17:12:53 +00:00
Manolo Gouy
71d7a9db79 Fix handling of layer-backed sub GL window moved between retina and non-retina screens.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13093 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 17:09:37 +00:00
Manolo Gouy
ac60de1a92 Fix error in Fl_Cocoa_Gl_Window_Driver::make_current_before()
Fl_Gl_Window_Driver::invalidate() instead of Fl_Gl_Window::invalidate() was called.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13091 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 15:49:15 +00:00
Manolo Gouy
61eb23a9ea Fix handling of GL window moved between retina and non-retina screens.
Part of the fix applies both to layer-backed and non layer-backed windows.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 15:30:44 +00:00
Manolo Gouy
185934b9b0 Fix handling of layer-backed GL window moved between retina and non retina screens.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13089 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 10:14:09 +00:00
Manolo Gouy
2106f867b6 Fixed first drawing of a layer-backed OpenGL window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-28 16:22:05 +00:00
Manolo Gouy
d666a6f234 MacOS Mojave 10.14 support: fix creation of several OpenGL windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13086 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-28 14:20:44 +00:00
Manolo Gouy
50f90a6970 Fix suppport of tabbed windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13085 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-28 02:35:02 +00:00
Manolo Gouy
318a756a60 Stop using viewFrameDidChangeNotification and implement drawRect:(NSRect) for FLViewGL.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-26 07:47:47 +00:00
Albrecht Schlosser
0321ce7a1c Add missing include file <string.h>.
Preparing for another commit...


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13081 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-22 01:04:57 +00:00
Manolo Gouy
3370226f4f Mention added support for MacOS 10.14
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13080 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-21 07:07:38 +00:00
Manolo Gouy
ab51dfc636 Support GL windows on retina display when app does not set Fl::use_high_res_GL(1)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13078 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-20 22:09:28 +00:00
Manolo Gouy
e32b7e1fca Fix resize of layer-backed, top-level GL windows: no more blank window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13076 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-20 07:42:15 +00:00
Manolo Gouy
1741a6c128 Minor improvement of macOS 10.14 mojave support: draw window views with the displayLayer: method
The doc recommends to draw views with the displayLayer: method when the view manages itself
completely its own bitmap:
       If your delegate implements the displayLayer: method, that implementation is responsible 
       for creating a bitmap and assigning it to the layer’s contents property. 

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13075 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-20 07:24:27 +00:00
Albrecht Schlosser
75b6cee6cc Document that Fl_Widget::GROUP_RELATIVE bit is not used.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-19 16:50:57 +00:00
Albrecht Schlosser
1f3c17c8b9 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.4@13072 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-19 16:44:50 +00:00
Manolo Gouy
dd8e60a956 Add support for macOS 10.14 Mojave.
MacOS apps running under 10.14 AND linked with SDK 10.14 use a completely different way
to draw to the screen in comparison with the same app running under 10.13 or earlier:
all views are "layer-backed".
This commit makes FLTK apps running under 10.14 and linked with SDK 10.14 explicitly 
use layers to draw to the screen.
FLTK apps remain downward compatible with earlier macOS versions.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13071 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-19 05:17:24 +00:00
Manolo Gouy
7331900ef8 Remove compilation error when using clang 8:
error: non-constant-expression cannot be narrowed from type 'int' to 'CGFloat'

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13070 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-18 19:33:09 +00:00
Albrecht Schlosser
bd16bad416 Update makesrcdist to work with Git. Work in progress.
This is a working version of makesrcdist and "commandline compatible" with the
previous svn version.

Todo: There will likely be more or other commandline arguments to be more flexible
when building source tarballs or snapshots.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13069 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-18 16:21:45 +00:00
Manolo Gouy
b79f3ed1f2 Prepare for support of MacOS 10.14 Mojave.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13067 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-16 09:28:25 +00:00
Manolo Gouy
1367048df2 Fix Fl_OpenGL_Display_Device::capture_gl_rectangle(Fl_Gl_Window*) by making current the window's GL context.
The problem was visible with test/cube: when the window was minimized, only the left GL subwindow
was captured in the window icon.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13066 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-16 09:27:36 +00:00
Matthias Melcher
f58c1d85b8 Fluid inlined text data must be 'const'
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13065 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-09 19:56:33 +00:00
Matthias Melcher
b10524fce2 Avoiding crash when accessing free'd memory.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13064 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-09 19:53:05 +00:00
Albrecht Schlosser
17e593b254 Update (reformat) README.bundled-libs.txt.
--This line, and thupose below, will be ignored--

M    


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13063 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-08 20:09:30 +00:00
Manolo Gouy
506b60a3f9 MacOS 10.14 Mojave: fix support of window capture - continued.
Window capture by initWithFocusedViewRect: does not work if the app is linked against 10.14 SDK
and run under 10.14. In that case, capture is performed instead by CGWindowListCreateImage().
Detection of whether the app was linked against 10.14 SDK is done by checking whether
the FLView possesses a CALayer.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13062 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-05 10:47:16 +00:00
Albrecht Schlosser
a84dec9510 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13061 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-05 00:38:12 +00:00
Manolo Gouy
61c01d9f9a MacOS 10.14 Mojave: fix support of window capture that 10.14 broke.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13060 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-04 07:54:18 +00:00
Albrecht Schlosser
6986a57bfc Update release date. (Test commit)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13059 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-01 17:59:06 +00:00
Manolo Gouy
08910b74ac macOS: check for non-nil image before using it as miniaturized window icon.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13058 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-30 13:46:13 +00:00
Manolo Gouy
f76d2a2bf8 Support for macOS 10.14 Mojave: apps linked with SDK 10.14 did not draw anything in their windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13057 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-27 05:42:57 +00:00
Manolo Gouy
673d95b99c MacOS: fix is_bundled() function for case when [NSBundle mainBundle] is nil.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13055 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-22 07:24:57 +00:00
Albrecht Schlosser
58fbb5cfd2 Update README.md for new Git repository on GitHub.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13054 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-18 16:32:15 +00:00
Manolo Gouy
3131757e9c 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.4@13050 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-16 10:17:23 +00:00