Commit Graph

8216 Commits

Author SHA1 Message Date
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
Manolo Gouy
f235678851 X11 under Ubuntu: read screen scaling information - continued
the first scaling value set at 2 is retained.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13049 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-14 14:49:23 +00:00
Manolo Gouy
d23892ef52 X11 under Ubuntu: read screen scaling information from file $HOME/.config/monitors.xml
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13048 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-14 14:38:06 +00:00
Albrecht Schlosser
a0fcfa55d6 Fix (remove) C++11 extension in header file.
Found with clang [-Wc++11-extensions] (example):

Building CXX object src/CMakeFiles/fltk.dir/Fl_x.cxx.o
In file included from ../../src/Fl_x.cxx:40:
../../src/drivers/X11/Fl_X11_Screen_Driver.H:36:10: warning: unelaborated
  friend declaration is a C++11 extension; specify 'class' to befriend
  'Fl_Screen_Driver' [-Wc++11-extensions]
  friend Fl_Screen_Driver;
         ^
         class
1 warning generated.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13047 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-14 12:13:56 +00:00
Manolo Gouy
07f18a5190 MacOS: Fix rounding to nearest int for negative screen coordinates.
The previous method   int(x + 0.5) is incorrect when x < 0

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13046 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-12 15:12:11 +00:00