Commit Graph

8507 Commits

Author SHA1 Message Date
ManoloFLTK
d88ef8f039 Avoid double window redraw after resize 2019-05-08 11:53:25 +02:00
ManoloFLTK
5a57c928a1 Remove unnecessary code 2019-05-07 12:45:44 +02:00
ManoloFLTK
c00f31ab10 Slightly simpler code for what is specific to macOS 10.14.0 2019-05-06 16:55:41 +02:00
ManoloFLTK
fea125eca9 Restore forcing the position of a window before it's shown 2019-05-06 16:50:42 +02:00
ManoloFLTK
38cf195727 Remove call to Fl_Group::init_sizes() because it's expected from the caller. 2019-05-04 13:25:28 +02:00
ManoloFLTK
ef355e2762 Fix control for subwindow leakage in presence of GUI scaling 2019-05-04 09:44:29 +02:00
ManoloFLTK
5fde73b9ea Reworked algorithm to support window moving across screens 2019-05-02 20:53:10 +02:00
ManoloFLTK
61dbac62e7 Minor change in Fl_Cocoa_Window_Driver::shape(const Fl_Image*) 2019-04-30 15:18:40 +02:00
Albrecht Schlosser
bb55c9251d Fix compiler warning (issue #25)
src/Fl_Table_Row.cxx:56:25: warning: argument 2 range
    [18446744071562067969, 18446744073709551615] exceeds maximum
    object size 9223372036854775807 [-Walloc-size-larger-than=]
     arr = (char*)realloc(arr, count * sizeof(char));
                  ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes #25
2019-04-29 11:36:21 +02:00
ManoloFLTK
738cce154e macOS: further fix to window moving necessary for macOS 10.3
Running the tabs test app with all 6 subwindows shown under 10.3
and moving the window around had 3 subwindows drift away
from their correct position.
2019-04-28 18:34:24 +02:00
ManoloFLTK
172063b2ad macOS: yet simpler implementation of window resize and rescale. 2019-04-28 15:31:02 +02:00
ManoloFLTK
9ac73175be Use NSViewFrameDidChangeNotification instead of NSWindowDidResizeNotification
This allows to support the tabbing/untabbing of windows with simpler, clearer code.

This commit also fixes the resizing of Fl_Overlay_Window that was broken in the
recent commit "Simpler implementation of Fl_Cocoa_Window_Driver::resize()"
    c66caf5dce
2019-04-25 10:30:59 +02:00
ManoloFLTK
a98d3a6569 Use HAVE_GLXGETPROCADDRESSARB preprocessor variable 2019-04-23 18:17:16 +02:00
ManoloFLTK
6f82d88af3 macOS: restore correct tabbing/untabbing of windows - continued
slightly simpler and more explicit than previous commit at
    602c6ffd8a
2019-04-23 08:11:10 +02:00
ManoloFLTK
94f859c373 Consistently compute the current GUI scaling factor value. 2019-04-22 10:02:32 +02:00
ManoloFLTK
602c6ffd8a macOS: restore correct tabbing/untabbing of windows
The recent commit "Simpler implementation of Fl_Cocoa_Window_Driver::resize()"
    c66caf5dce
did not take care of tabbing/untabbing of windows.
This is repaired here.
2019-04-22 09:48:15 +02:00
ManoloFLTK
98b4ece33e Reorder Fl_Cocoa_Window_Driver to support upward OS compatibility 2019-04-21 09:45:06 +02:00
ManoloFLTK
f3bfe93a51 Fix Fl_Cocoa_Window_Driver::fullscreen_off()
The correct order of operations is to resize the window after having set its style.
2019-04-21 09:27:44 +02:00
ManoloFLTK
3f5580d49c macOS: better support of Fl_Window::border(int) 2019-04-20 22:01:48 +02:00
ManoloFLTK
33862479af Merge remote-tracking branch 'origin/master' 2019-04-19 13:05:14 +02:00
ManoloFLTK
ebbee5301b macOS: simpler handling of GL windows when first displayed.
tested on macOS versions 10.3, 10.6, 10.9, 10.14
2019-04-19 13:03:49 +02:00
Greg Ercolano
8d0647732f Fix time drawing color (was not being set)
The items showing the current time looked ugly on linux
when selected, since they were drawing in the leftover
blue color used for drawing the R-G-B box pattern.
2019-04-16 10:56:33 -07:00
ManoloFLTK
698fe39ff1 Minor code reordering 2019-04-15 16:08:16 +02:00
ManoloFLTK
72954f39d8 Minor code reordering. 2019-04-15 12:04:52 +02:00
ManoloFLTK
0067952e1a Correct typo in Doxygen doc 2019-04-14 19:10:08 +02:00
ManoloFLTK
52f4aa5546 Doxygen doc: rewording for more clarity. 2019-04-14 19:07:14 +02:00
ManoloFLTK
bb5ef3b1d0 Doxygen: rewording for more clarity. 2019-04-14 09:54:55 +02:00
ManoloFLTK
0f6cbd1cda Doxygen: rewording for more clarity. 2019-04-14 09:27:41 +02:00
ManoloFLTK
a65d7818be More explicit short doc of Fl_Multi_Label. 2019-04-14 08:57:17 +02:00
ManoloFLTK
5ad95da98e Further Doxygen doc about OpenGL and HighDPI. 2019-04-13 08:32:35 +02:00
ManoloFLTK
8540db95d8 Update Doxygen doc of Fl_Gl_Window::draw() for HighDPI support 2019-04-13 08:09:01 +02:00
ManoloFLTK
f55729ed32 Doxygen: describe better support for OpenGL on HighDPI displays. 2019-04-12 18:47:42 +02:00
ManoloFLTK
4abaeba539 Doxygen: make explanation of how PostScript text works always visible. 2019-04-12 11:29:08 +02:00
ManoloFLTK
1280370fc8 Move Doxygen comments next to member function bodies. 2019-04-12 10:36:02 +02:00
ManoloFLTK
d50d0a3069 Remove function body from Fl_Widget_Surface class declaration. 2019-04-12 10:32:46 +02:00
ManoloFLTK
d36e1a79c3 Add check against hidden window. 2019-04-11 19:02:44 +02:00
ManoloFLTK
3fa2b73698 Update comments of Fl_Cocoa_Window_Driver::make_current() for macOS 10.14 2019-04-11 13:04:53 +02:00
ManoloFLTK
86ddfca2f3 Remove 2 Doxygen warnings
fltk-1.4/src/Fl_Copy_Surface.cxx:66: warning: no uniquely matching class member found for
 int Fl_Copy_Surface_Driver::printable_rect(int *w, int *h)
and same for Fl_Image_Surface_Driver.
2019-04-11 11:28:20 +02:00
Albrecht Schlosser
3bbc453237 Save and restore GL parameters as appropriate
According to the docs "glPixelStorei sets pixel storage modes that
affect the operation of subsequent glReadPixels as well as the
unpacking of texture patterns (see glTexImage2D and glTexSubImage2D)."

Hence we
(a) must be aware that current values of these modes can be anything
    set by user or FLTK code before
(b) should be polite and restore these modes to previous values

See discussion in fltk.coredev, thread "gl_draw problem" started on
Apr 05, 2019.
2019-04-10 17:02:04 +02:00
ManoloFLTK
cb7dbc34d7 Make member function Fl_Surface_Device::driver(Fl_Graphics_Driver*) protected. 2019-04-10 15:20:00 +02:00
ManoloFLTK
d5943f85b9 Use the new Fl_Surface_Device::is_current() virtual function 2019-04-10 13:53:13 +02:00
ManoloFLTK
4f0a16697e Remove useless member functions Fl_XXX_Copy_Surface_Driver::w() and h() 2019-04-10 13:21:23 +02:00
ManoloFLTK
7a0bebb22f New virtual member function bool Fl_Surface_Device::is_current() 2019-04-10 13:14:04 +02:00
ManoloFLTK
22a5dc3085 Function Fl_Screen_Driver::traverse_to_gl_subwindows() is static in its class 2019-04-10 10:22:45 +02:00
ManoloFLTK
8286e37b18 Add public function Fl_RGB_Image *fl_capture_window_part()
In the context of HighDPI screens, the API of function fl_read_image()
is inadequate because a rectangle of size WxH drawing units
of a window may contain many more than W*H pixels.

Function fl_capture_window_part() returns an Fl_RGB_Image
object whose drawing size matches the size of the rectangle
and whose data size matches the, possibly larger, size in pixels
of the corresponding area of the mapped window.
2019-04-09 18:50:18 +02:00
ManoloFLTK
0ddf5e74a9 Fix for STR 3519: the PostScript graphics driver fails with some narrow unicode characters 2019-04-09 16:26:15 +02:00
ManoloFLTK
86849aac8f Improve Fl_Cocoa_Window_Driver::make_current() 2019-04-09 12:43:03 +02:00
ManoloFLTK
abc8f4158f Member Fl_Cocoa_Window_Driver::window_flags_ stores now 2 flags 2019-04-07 11:24:20 +02:00
ManoloFLTK
c66caf5dce Simpler implementation of Fl_Cocoa_Window_Driver::resize() 2019-04-07 09:09:33 +02:00
ManoloFLTK
cc955d27a0 Maintain window position when turning its border on. 2019-04-07 08:57:06 +02:00