Methods Fl::event_x_pixel() and Fl::event_y_pixel() committed at r.10941
are removed. Instead method Fl_Gl_Window::pixels_per_unit() is added.
The documentation explains in more detail how to write cross-platform
FLTK code supporting high resolution OpenGL windows on retina displays.
The examples/OpenGL3test.cxx app exercises Fl_Gl_Window::pixels_per_unit().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10945 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
in pixel units that differ from FLTK units for OpenGL windows mapped to a retina display.
On non Mac OS platforms, these are synonyms of Fl::event_x() and Fl::event_y().
The example/OpenGL3test demo program is modified to call these new functions.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10941 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
that copies a window to the clipboard together with its title bar and borders.
This requires very little new code because the capture of window decorations
is shared with the Fl_Paged_Device::print window() method.
The device test program is changed to call the new method.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10928 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
altogether for subwindows; keep it unchanged for windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10913 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
it covers the dock and the system menu bar. The default behavior of a subwindow of such
a fullscreen window is to be prevented to cover the menu bar (which makes not much sense
because this bar is covered by the main window). If the location of the subwindow within
its parent window expected by FLTK would have it cover the menu bar, Mac OS moves
it down. The subwindow therefore does not lie where FLTK wants it.
This patch overrides the adequate method of the NSWindow class to prevent this bad behavior.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10911 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
as child of an FLTK window when turning a window full-screen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10909 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
whereas OpenGL window capture returns RGBA as before. Capturing a window with subwindow(s)
requires ARGB <--> RGBA conversion when Quartz and OpenGL windows are mixed.
The OpenGL-inside-Quartz case was taken care of before.
Here, the Quartz-inside-OpenGL case is properly handled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10900 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
enclosing window when they are programmatically resized or moved.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10899 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Allow proper initial display of a subwindow-containing window in iconized state
(previously, the subwindow was not displayed in the icon).
Also fixes a problem with subwindows when the screen resolution was changed
while the window was iconized.
Tested with Mac OS 10.11, 10.6 and 10.3.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10891 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
On the X11/MSWindows platforms, this requires external installation of the GLEW library.
This fixes STR#3198 and STR#3257.
Added two new examples programs.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10876 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
when an ARGB system image is converted to the RGBA format.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10870 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2) improved window creation in iconized state (child windows still don't show in icon, though).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10860 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
The -[NSWindow makeKeyAndOrderFront:] message used to make the window appear on the screen,
but, starting with 10.10 (approximately), this changed, and it became necessary to query for events
for a new window to appear on the screen. With 10.11 two event messages are needed.
The solution is therefore to implement Fl_Window::wait_for_expose().
- Calling NSDisableScreenUpdates()()/NSEnableScreenUpdates() before and after window updates
greatly accelerates multi-window update operations.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10826 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
from later OS versions.
Unfortunately, it does not work with Mac OS 10.3
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10818 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
use different pasteboard data type names according to running OS.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10817 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
graphics context to draw to a window. This requires Mac OS 10.4.
The advantage is that it is possible for a secondary thread to call
Fl_Window::make_current() without needing to create an autorelease pool.
We save the native graphics state, and also the state with origin at top.
Fl_X::q_release_context() restores the graphics state twice to return to
the native state. This allows to use a single graphics context for a single
window and a single thread.
Under 10.3, we have to create a new NSGraphicsContext when Fl_Window::make_current()
is called directly, so that secondary threads cannot call Fl_Window::make_current() without
having created an autorelease pool.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10816 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
- do not use NSOpenGLPFAMultisample
- do not use -[NSBitmapImageRep bitmapFormat]
that require Mac OS 10.4
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10815 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
- avoid double redraw after window deminiaturization
- make sure that a new window appears on screen during the Fl_X::make() call
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10801 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Screen captures produce ARGB data (instead of RGBA until 10.10)
so access to the raw image data takes now this into account.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10789 ea41ed52-d2ee-0310-a9c1-e6b18d33e121