Commit Graph

8209 Commits

Author SHA1 Message Date
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
Manolo Gouy
b0e0e0912c 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.4@13045 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-12 12:46:09 +00:00
Manolo Gouy
b6f65b1c87 X11: simplify the use of member function Fl_X11_Screen_Driver::init_workarea().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13044 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-07 09:24:35 +00:00
Manolo Gouy
3669f9a8cc MacOS: fix turning GL window to/from fullscreen state.
This fix completes that at r.13039.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13042 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-06 12:56:08 +00:00
Manolo Gouy
6e5c5d58e8 X11: fix Fl::w() and Fl::h() when the screen is rescaled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13041 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-06 11:26:34 +00:00
Manolo Gouy
9a105ea686 Less code is enough to start the OpenGL 3 window fullscreen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13040 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-03 17:16:07 +00:00
Manolo Gouy
ee3fbb849e MacOS: fix creation of fullscreen GL window
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13039 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-03 15:47:48 +00:00
Manolo Gouy
821be0b0eb Complete proper initialisation of the unique Fl_Cocoa_Screen_Driver object.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13038 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-03 09:12:47 +00:00