summaryrefslogtreecommitdiff
path: root/src/Fl_cocoa.mm
AgeCommit message (Collapse)Author
2019-01-24Fix minor text input problem related to dead key previewing.ManoloFLTK
macOS normally previews a dead key and then replaces the preview by the final text after the second key is typed. macOS ≥10.7 also opens an auxiliary window to help choosing among possible characters after some keys (e.g., n, c, o, a) are pressed and maintained for a while. The problem fixed here is that after an auxiliary window has been used, dead keys are no longer previewed. That problem emerged at some undetermined point before 10.14 and after 10.7.
2019-01-20Remove unnecessary code related to layer-backed views.ManoloFLTK
That code is not useful if layer-backed views are used only with macOS 10.14.
2019-01-16Correct typo in comment.ManoloFLTK
2019-01-04Slight reorganization of the [FLWindow close] method.Manolo Gouy
It might be safer to use the window's contentView before sending the close message to the window.
2019-01-04Remove [FLViewLayer dealloc] method.ManoloFLTK
The Apple doc recommends not to release resources in an object's dealloc method. The job is now done in the [FLWindow close] method.
2019-01-04Restore possibility to compile with SDK 10.7 or earlier.ManoloFLTK
2018-12-30Under macOS 10.14, Fl_Cocoa_Window_Driver::flush() draws to the bitmap and ↵Manolo Gouy
does [view setNeedsDisplay:YES]
2018-12-09macOS: creation of window with subwindow in iconized form - continued.ManoloFLTK
With macOS 10.13 and 10.14 at least, recursivelySendToSubwindows:@selector(display) is not necessary in the new procedure where the window icon is computed in windowDidMiniaturize rather than in windowWillMiniaturize as was done before.
2018-12-08macOS Mojave: fix window with subwindow created in iconized form - continuedManoloFLTK
Some more changes needed to keep support of MacOS < 10.5
2018-12-08macOS Mojave: fix window with subwindow created in iconized form.ManoloFLTK
2018-12-07macOS comment only: refer to OS 10.14.2 gone public now.Manolo Gouy
2018-12-05New static member function: Fl_Device_Plugin *Fl_Device_Plugin::opengl_plugin()ManoloFLTK
2018-12-02Comment only: to try push with gitManoloFLTK
2018-11-30macOS: rewrite opengl_plugin_device() to use less memory.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13143 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-29Use the Fl_Gl_Device_Plugin mechanism to simplify the construction of a ↵Manolo Gouy
layer-backed GL window. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-26MacOS: slightly simpler implementation of ↵Manolo Gouy
Fl_Cocoa_Window_Driver::wait_for_expose(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13133 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-23MacOS: further support of scenarios mixing miniaturize/deminiaturize/change ↵Manolo Gouy
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.4@13131 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-22MacOS: fix redraw of subwindow when display resolutions before miniaturize ↵Manolo Gouy
and after deminiaturize differ. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-21macOS: remove two useless statements for layer-backed OpenGL windows.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13128 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-20Minor reorder of operations performed when layered window is 1st drawn.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13127 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-20macOS: reorganize the code running when windows are moved between retina and ↵Manolo Gouy
non-retina displays. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13126 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-16MacOS: introduce classes FLViewLayer and FLGLViewLayer to handle ↵Manolo Gouy
layer-backed views. Both new classes are derived from FLView. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13124 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-16MacOS: simpler implementation of extra code necessary at first display of ↵Manolo Gouy
layer-backed GL windows git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13123 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-10Account for property graphicsPort of NSGraphicsContext being deprecated in 10.14Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13121 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-09Fix macOS 10.14 Mojave support of the FLTK-cairo interface.Manolo Gouy
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-02MacOS Mojave and gl_start(): fix for 10.14 but not 10.14.1Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13108 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-01Add useful castManolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13106 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-01MacOS Mojave: restore use of gl_start()/gl_finish()Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13105 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-31Remove use of Fl_Gl_Window_Driver.H in file src/Fl_cocoa.mmManolo Gouy
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-31Remove all dependency to libfltk_gl from Fl_cocoa.mm.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13103 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-30Fix issue when moving window between retina/non-retina screens while window ↵Manolo Gouy
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-29Removed temporary comment.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13096 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29Fix handling of layer-backed sub GL window moved between retina and ↵Manolo Gouy
non-retina screens. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13093 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29Fix handling of GL window moved between retina and non-retina screens.Manolo Gouy
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-29Fix handling of layer-backed GL window moved between retina and non retina ↵Manolo Gouy
screens. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13089 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-28Fixed first drawing of a layer-backed OpenGL window.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13087 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-28MacOS Mojave 10.14 support: fix creation of several OpenGL windows.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13086 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-28Fix suppport of tabbed windows.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13085 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-26Stop using viewFrameDidChangeNotification and implement drawRect:(NSRect) ↵Manolo Gouy
for FLViewGL. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-20Support GL windows on retina display when app does not set ↵Manolo Gouy
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-20Fix resize of layer-backed, top-level GL windows: no more blank window.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13076 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-20Minor improvement of macOS 10.14 mojave support: draw window views with the ↵Manolo Gouy
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-19Add support for macOS 10.14 Mojave.Manolo Gouy
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-18Remove compilation error when using clang 8:Manolo Gouy
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-05 MacOS 10.14 Mojave: fix support of window capture - continued.Manolo Gouy
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-04MacOS 10.14 Mojave: fix support of window capture that 10.14 broke.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13060 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-30macOS: check for non-nil image before using it as miniaturized window icon.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13058 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-27Support for macOS 10.14 Mojave: apps linked with SDK 10.14 did not draw ↵Manolo Gouy
anything in their windows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13057 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-22MacOS: fix is_bundled() function for case when [NSBundle mainBundle] is nil.Manolo Gouy
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13055 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-09-16MacOS: fix regression in OS 10.13 where an unbundled app had its system menu ↵Manolo Gouy
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