Commit Graph

3924 Commits

Author SHA1 Message Date
ManoloFLTK
6dd63788ed Fix fl_endpoints() for macOS platform that was not effective. 2021-03-14 08:22:24 +01:00
ManoloFLTK
eda03f0f88 Backport fix for issue #185 "Shared Image reload() loses initial dimensions" from branch 1.4 2021-02-17 09:30:26 +01:00
Albrecht Schlosser
02e4b8f980 Bump version numbers to 1.3.6 (prepare release part 1) 2021-02-04 14:58:30 +01:00
Albrecht Schlosser
7ce6d2cf5d Fix X11 copy-paste and drag-and-drop target selection (#182)
Select the "best" target rather than a random one out of a list of
suitable targets. The target selection algorithm would sometimes
select the wrong target and hence retrieve unexpected data.

This could happen in both copy-paste and drag-and-drop operations.
2021-02-01 02:13:47 +01:00
ComputerNerd
724eddf208 FLTK 1.3 had the same exterr problem. 2020-12-13 21:54:24 -06:00
Albrecht Schlosser
6b8a7b36b4 Fix doxygen warnings 2020-11-03 11:50:12 +01:00
ManoloFLTK
0d37604d8a Fix when building with SDK 10.15 and running with 11.0 Big Sur
When FLTK runs under macOS "Big Sur", the OS appears as 11.0
if FLTK was built with SDK 11.0 and as 10.16 it it was built with
SDK 10.15.
2020-09-21 15:10:34 +02:00
ManoloFLTK
8f8f83dd53 Add support of macOS "Big Sur" 11.0 2020-08-29 09:47:16 +02:00
Albrecht Schlosser
d4859abe66 Fix DND in read-only Fl_Input (Fl_Output) (#113)
Cherry-picking fix from FLTK 1.4 (master).

See report in fltk.coredev as of Jan 16, 2020:
  "Fl_Input in readonly mode - wrong behaviour".

Summary: Drag and drop within a read-only Fl_Input (i.e. Fl_Output)
  widget would not insert the dragged text (correct) but removed
  the dragged text from the widget (error). This is now fixed.
2020-07-20 13:45:16 +02:00
Albrecht Schlosser
d4d2136b3b Fix overly restrictive JPEG filter (#81)
See https://github.com/fltk/fltk/issues/81

Fixes #81
2020-06-15 04:02:51 +02:00
ManoloFLTK
65ea0f5f43 Have Fl_Pack::draw() call Fl_Group::init_sizes() on its parent group.
Fl_Pack::draw() sometimes resizes itself. This must be followed
by a call to Fl_Group::init_sizes() as indicated in that function's doc:
"If you rearrange the widgets in your group, call this method to register
the new arrangement with the Fl_Group that contains them."
2020-05-29 17:31:38 +02:00
ManoloFLTK
7bcfea7f27 Improve Fl_Copy_Surface under macOS 2020-05-29 17:31:38 +02:00
ManoloFLTK
4dd2718cd0 Restore macOS capacity to turn window fullscreen encompassing several screens. 2020-05-28 12:16:52 +02:00
ManoloFLTK
5972eeb750 Transfer more fixes from branch 1.4 to branch 1.3 2020-05-27 17:38:34 +02:00
ManoloFLTK
8ae0ac92ad Remove changes inadvertently introduced in previous commit (46235ff). 2020-05-27 12:11:16 +02:00
ManoloFLTK
46235ff922 Transfer to branch 1.3 all changes in Fl_cocoa.mm from branch 1.4 as of 20 may 2020
This makes branch 1.3 OK for macOS 10.15 Catalina.
2020-05-27 11:06:03 +02:00
Albrecht Schlosser
219ae5e455 X11: Fix X Input Methods (XIM) (STR 3502, 3192)
Revert commit 958d912ffc using 'XSetLocaleModifiers("@im=");'
which was incorrect (STR 3192).

Apply fix for STR 3502, using 'XSetLocaleModifiers("");' which appears
to be the correct solution for using X Input Methods (XIM).
2020-02-10 13:16:16 +01:00
OKAMURA, Yasunobu
b1e4ec4011 Fix JIS Keyboard dead keys 2020-01-16 16:19:15 +01:00
Albrecht Schlosser
770663920e Fix Fl::add_timeout() in draw() under Linux (STR 3188)
Timeouts queued during Fl_Widget::draw() - called by Fl::flush() -
would not be serviced unless other events were processed. For
Details see STR 3188.
2019-12-09 17:50:15 +01:00
ManoloFLTK
02db5d4799 Fix for Fl_Native_File_Chooser under macOS 10.15 Catalina and in BROWSE_SAVE_FILE mode 2019-12-05 16:14:37 +01:00
ManoloFLTK
68fd81a7ad Fix use of Xrender extension with old, 16-bit framebuffers.
Subject "Bug in 1.4 Displaying PNG under x64 Kernel x86 app." in flak.general
contains a report by Darren Legge that presents the problem,
and a later post stating the code modification does fix the problem.
2019-09-11 15:41:23 +02:00
ManoloFLTK
5dd2b4409f Windows: add bitmap version of graphics when copying to clipboard 2019-07-19 08:12:34 +02:00
ManoloFLTK
b846d26233 X11: add support for copy+paste of image within one app 2019-07-19 08:12:34 +02:00
ManoloFLTK
7ce74b42a0 Fix for STR #3503 - handle Fl_Menu_ deleted while its menu window runs. 2019-02-05 18:44:09 +01:00
Albrecht Schlosser
a8640c6225 Fix Fl_Tree::insert() with pos out ouf range (#18)
The given position to insert a new item was not checked  against the
valid range so the program  could crash if a position less than zero
or greater than children() was given. The position is now clamped to
the valid range, i.e. the item is either prepended or appended.

Fixes issue #18.

Backported from 1.4, commit 9b272cfa4e
2019-01-25 18:27:21 +01:00
ManoloFLTK
c9bb57e58e Fix minor text input problem related to dead key previewing.
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-23 18:55:35 +01:00
Manolo Gouy
a53dbee5e9 Merge branch 'branch-1.3' of https://github.com/fltk/fltk into branch-1.3 2019-01-09 15:32:55 +01:00
Manolo Gouy
294105d8d7 Support running under MacOS 10.14 with SDK 10.14 and 32-bit architecture. 2019-01-09 15:25:29 +01:00
Albrecht Schlosser
35e03733f4 Fix Fl_GIF_Image Color Table handling (STR 3491)
Loading GIF images could crash if there was no "Global Color Table"
but individual "Local Color Tables" with individual images.

Now local color tables are used correctly if available, but images that
lack both global and local color tables are being loaded with a default
(gray) color table and a warning is issued with Fl::warning().

The default color table uses black and white in the first two indices
as recommended by the standard.
2019-01-06 18:03:02 +01:00
Albrecht Schlosser
b7d434b863 Quick fix: menu disappearing (STR #3503 continued)
Quick fix to repair a case when Fl_Menu_Item::pulldown() was called with only
five arguments (argument pbutton == null) as discussed here:

d87ac9b597 (comments)

Backported from 'master': 9ea0d4ccbc
2018-12-11 18:21:00 +01:00
ManoloFLTK
037a09cdea macOS mojave: fix window with subwindow created in iconized form. 2018-12-08 19:15:35 +01:00
Albrecht Schlosser
dabc725486 Complete fix for STR #3503 (Fl_Choice).
Fl_Choice::handle() needs to be fixed as well.
2018-12-07 17:55:31 +01:00
Albrecht Schlosser
3aa32804f7 Fix crash if menu is deleted while menu is open (SGR #3503).
This can happen when a menu widget (e.g. Fl_Choice) is deleted in a
timer callback while the menu is open (pulldown active).
2018-12-07 14:27:39 +01:00
Manolo Gouy
a0b4e146e8 MacOS: further support of scenarios mixing miniaturize/deminiaturize/change 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.3@13132 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-23 09:52:26 +00:00
Manolo Gouy
433b77e5d9 MacOS: introduce classes FLViewLayer and FLGLViewLayer to support layer-based windows under Mojave.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13130 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-22 14:28:57 +00:00
Manolo Gouy
47127be7dd MacOS: fix necessary for 10.14.2 public beta 3
Apple keeps changing how windows are drawn under 10.14 Mojave, even between minor 
releases! 
This change is required to correctly update a GL window moved from a non-retina to
a retina display under 10.14.2 public beta 3 (glpuzzle shows the problem).
It's unsure if it will still be necessary with 10.14.2, or later versions, but the change
does no harm if it's not necessary.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13125 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-17 16:05:11 +00:00
Manolo Gouy
93f4f91429 MacOS: simpler implementation of extra code necessary at first display of layer-backed GL windows
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13122 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-16 08:56:48 +00:00
Manolo Gouy
9dfa8a92a9 Fix macOS 10.14 Mojave support of the FLTK-cairo interface.
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_Window::make_current() rather than in
 cairo_create_surface().

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13120 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-09 14:46:49 +00:00
Manolo Gouy
50b8ba6a53 Remove compilation warning with -Wexpansion-to-defined
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13118 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-09 13:34:02 +00:00
Manolo Gouy
2eea5d5856 Support of macOS 10.14 Mojave: better implementation of the Cairo-FLTK interface.
This implementation puts all code related to Cairo support under Mojave in 
the Cairo-specific source file cairo/Fl_Cairo.cxx, which is preferable.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13116 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-08 17:23:27 +00:00
Manolo Gouy
63626c8f26 Cairo support under macOS 10.14 Mojave: slightly simpler implementation
This post http://www.fltk.org/newsgroups.php?s36927+gfltk.general+v36944
reports a full-size Cairo-using FLTK app to be OK under Mojave with the
equivalent of this fix for the 1.4 branch.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13114 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-08 13:14:37 +00:00
Albrecht Schlosser
8fb3709ff0 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.3@13112 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-05 18:56:24 +00:00
Manolo Gouy
6467a4ada0 MacOS: fix support of Cairo under macOS 10.14 Mojave.
The cairo_test program would redraw the window vertically flipped after the window was
hidden or miniaturized when layer-backed windows were used.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13111 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-05 09:04:38 +00:00
Manolo Gouy
7e04fe0acf Further fix to support gl_start() under MacOS platform.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13110 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-02 12:25:43 +00:00
Manolo Gouy
04e782d946 MacOS Mojave: restore support of gl_start()/gl_finish().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13107 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-01 21:01:41 +00:00
Manolo Gouy
fa89042fac Avoid dependence of Fl_cocoa.mm from libfltk_gl
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13102 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-30 15:45:31 +00:00
Manolo Gouy
5be486de5f 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.3@13101 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-30 08:22:26 +00:00
Manolo Gouy
3409bcbb5e Fix moving GL subwindow between retina and non-retina screens.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13095 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 17:17:43 +00:00
Manolo Gouy
3dcee16c5e Fix handling of layer-backed GL window moved between retina and non-retina screens.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13092 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-29 15:52:51 +00:00
Manolo Gouy
4424fa9d35 Fix first drawing of layer-backed OpenGL window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@13088 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-10-28 16:53:40 +00:00