Commit Graph

5146 Commits

Author SHA1 Message Date
ManoloFLTK
899eaf8a69 Remove useless statement. 2019-01-28 17:10:13 +01:00
Albrecht Schlosser
2c5ba94458 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.
2019-01-25 17:40:51 +01:00
ManoloFLTK
9b272cfa4e 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-24 15:19:33 +01:00
ManoloFLTK
83ecdd183a Remove incorrect putenv(buf) call followed by free(buf). 2019-01-21 16:03:59 +01:00
ManoloFLTK
ba729e50b7 Remove unnecessary code related to layer-backed views.
That code is not useful if layer-backed views are used only with macOS 10.14.
2019-01-20 19:13:08 +01:00
Albrecht Schlosser
bb91970122 Update dependencies (now sorted)
The main dependencies (makedepend files) are now sorted alphabetically
with one dependency per line.
2019-01-18 16:27:32 +01:00
Albrecht Schlosser
80ad88555f Sort makedepend files for better comparability
The intention is to improve (and minimize) diffs when dependencies
are changed and `make depend' is executed.

(1) use `makedepend ... -w 20'
(2) `sort -u' the resultant file with some more "magic".

(1) makes sure that there is only one dependent file per line,
(2) makes lines unique since `makedepend' can output one file
    many times which is redundant and makes diffs hard to read.

This uses 'mv', 'grep', and 'sort' in all FLTK library Makefiles.
Image libraries are intentionally left for a later update.
2019-01-18 15:44:24 +01:00
Albrecht Schlosser
2167908f8e Update (remaining) dependencies 2019-01-18 14:11:41 +01:00
Matthias Melcher
6bc3fa3768 Merge branch 'master' of https://github.com/fltk/fltk into Android 2019-01-17 21:30:16 +01:00
Matthias Melcher
2f0e45e7a7 Android CMake: icons, docs, more apps 2019-01-17 21:29:24 +01:00
ManoloFLTK
d17454ac6a Correct typo in comment. 2019-01-16 13:38:13 +01:00
Albrecht Schlosser
1a1492a174 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.

Cherry-picked from: 35e03733f4
2019-01-09 18:07:38 +01:00
Manolo Gouy
2bc7816cab Slight reorganization of the [FLWindow close] method.
It might be safer to use the window's contentView before sending the close message to the window.
2019-01-04 17:50:58 +01:00
ManoloFLTK
38b8dfaaea Remove [FLViewLayer dealloc] method.
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-04 17:06:10 +01:00
ManoloFLTK
06fdfaf822 Restore possibility to compile with SDK 10.7 or earlier. 2019-01-04 16:52:26 +01:00
ManoloFLTK
362f935086 Merge remote-tracking branch 'origin/master' 2018-12-30 11:04:10 +01:00
Manolo Gouy
26bb0e5a83 Under macOS 10.14, Fl_Cocoa_Window_Driver::flush() draws to the bitmap and does [view setNeedsDisplay:YES] 2018-12-30 10:59:53 +01:00
Matthias Melcher
bf9dfa2afd
Merge pull request #11 from MatthiasWM/master
Fixing STR #2901, Fl_Browser formatting char
2018-12-28 17:25:28 -08:00
Matthias Melcher
95ab1dd73e Fixing STR #2901, wrongly escaping the formatting character code in Fl_Browser. 2018-12-29 02:03:49 +01:00
Matthias Melcher
6097bde83c
Merge pull request #10 from MatthiasWM/master
Updated macOS build documentation for 1.4
2018-12-28 16:21:48 -08:00
Matthias Melcher
29fe0c43df Remove obsolete condition to make static analysis happy. 2018-12-29 01:19:51 +01:00
Matthias Melcher
e169b1941f Remove a C style type cast from jpeg_mem_src. 2018-12-29 00:44:39 +01:00
Matthias Melcher
a3ee6cff92 Refactored gl_remove_displaylist_fonts to be more easily readable and to stop triggering static analysis tool. 2018-12-29 00:34:57 +01:00
Matthias Melcher
75eefbcd42 Fixing some minor lint, found by Pavel Shlyak using PVS studio 2018-12-27 13:05:35 +01:00
Albrecht Schlosser
59cd39a505 Fix another clang-tidy warning (issue #5, part 1).
See https://github.com/fltk/fltk/issues/5

As Manolo pointed out the questionable variable was not used (read)
in this case of the switch statement, hence it can be removed.
2018-12-16 13:13:46 +01:00
Albrecht Schlosser
2e6a4eb69a Fix clang-tidy unused variable warning (issue #5, part 3).
https://github.com/fltk/fltk/issues/5
2018-12-15 13:27:39 +01:00
Albrecht Schlosser
9ea0d4ccbc
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)
2018-12-11 11:50:07 +01:00
Albrecht Schlosser
7458281545 Rename README files to README.txt (and several similar files).
Files without '.txt' suffix can't be handled well by Windows (users),
hence renaming such text files to *.txt makes FLTK more "Windows-friendly".

There are a few exceptions (this is intentional): README and other files
in bundled libraries (maintained upstream) are not changed.
2018-12-10 16:50:56 +01:00
ManoloFLTK
0240158d4c macOS: creation of window with subwindow in iconized form - continued.
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-09 10:45:17 +01:00
ManoloFLTK
433f9b8ccb macOS Mojave: fix window with subwindow created in iconized form - continued
Some more changes needed to keep support of MacOS < 10.5
2018-12-08 19:38:15 +01:00
ManoloFLTK
b4c3fec029 macOS Mojave: fix window with subwindow created in iconized form. 2018-12-08 16:31:18 +01:00
Albrecht Schlosser
7c1ccfa038 Complete fix for STR #3503 (Fl_Choice).
Fl_Choice::handle() needs to be fixed as well.
2018-12-07 17:52:32 +01:00
Manolo Gouy
6e49ce0a28 Merge remote-tracking branch 'origin/master' 2018-12-07 16:59:11 +01:00
Manolo Gouy
ed87d98c24 macOS comment only: refer to OS 10.14.2 gone public now. 2018-12-07 16:59:00 +01:00
Albrecht Schlosser
d87ac9b597 Fix crash if menu is deleted while menu is open (SGR #3503).
This can happen if a menu widget (e.g. Fl_Choice) is deleted in a
timer callback while the menu is open (pulldown active).
2018-12-07 14:45:50 +01:00
ManoloFLTK
3bcb1256bb New static member function: Fl_Device_Plugin *Fl_Device_Plugin::opengl_plugin() 2018-12-05 11:04:58 +01:00
ManoloFLTK
d2870d6f7d Define useful implementations of Fl_Graphics_Driver::push_no_clip() and pop_clip(). 2018-12-04 15:11:03 +01:00
ManoloFLTK
b985b884f8 Give a meaningful default implementation to a few more member functions of class Fl_Graphics_Driver. 2018-12-04 12:57:32 +01:00
ManoloFLTK
549d3555a1 Comment only: to try push with git 2018-12-02 19:20:44 +01:00
Manolo Gouy
f53c7fd128 macOS: rewrite opengl_plugin_device() to use less memory.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13143 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-30 09:29:08 +00:00
Manolo Gouy
b04700397e Comments only: correct the header of 2 source files.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13142 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-30 09:05:58 +00:00
Manolo Gouy
c33d3c6aaa Remove unused arguments from the Fl_Device_Plugin::print() member function.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13141 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-30 09:01:12 +00:00
Manolo Gouy
b511f6a7a4 Use the Fl_Gl_Device_Plugin mechanism to simplify the construction of a layer-backed GL window.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-29 17:50:55 +00:00
Albrecht Schlosser
2ef3b39c6a Fix FL_PUSH event handling of Fl_Check_Browser (STR #3004).
Test if the FL_PUSH event is inside the widget area and inside
the scrollbars (if scrollbars are visible).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13138 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-29 00:06:33 +00:00
Manolo Gouy
91bb8bce1f Create default implementation of Fl_Screen_Driver::get_system_scheme() and use it for macOS and Windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13137 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-28 18:01:02 +00:00
Manolo Gouy
db1206065a Windows: Have Fl::x(), Fl::y(), Fl::w() and Fl::h() change their values when the screen is rescaled.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13134 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-26 20:55:23 +00:00
Manolo Gouy
d8c4447c84 MacOS: slightly simpler implementation of 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-26 09:21:40 +00:00
Manolo Gouy
3be39b03b4 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.4@13131 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-23 09:47:08 +00:00
Manolo Gouy
97c0c6a024 MacOS: fix redraw of subwindow when display resolutions before miniaturize and after deminiaturize differ.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13129 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-22 11:55:04 +00:00
Manolo Gouy
7e5b04cab5 macOS: remove two useless statements for layer-backed OpenGL windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13128 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2018-11-21 11:55:04 +00:00