Commit Graph

3836 Commits

Author SHA1 Message Date
Manolo Gouy
b73e953b42 MacOS: fix possible issue with fullscreen windows containing hidden subwindows
An error occurred with the tabs test program :
 - activate the last tab (containing 3 subwindows)
 - activate another tab (the subwindows get hidden)
 - set window fullscreen ===> the subwindows are visible, but they should not
 - reactivate the last tab ===> the subwindows are not where they should be

The new code does not show this error.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12084 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-06 18:37:54 +00:00
Albrecht Schlosser
af12372e42 Accept empty Fl_Pixmap in Fl_RGB_Image c'tor (STR #3348).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12073 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-02 11:47:36 +00:00
Manolo Gouy
58ce9d778a MacOS: avoid crash when closing a fullscreen window
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12071 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-11-01 21:18:21 +00:00
Manolo Gouy
8b93da8f20 MacOS: fix a small problem where command Quit of the application menu may not work if Fl_Native_File_Chooser is used before any window is shown.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12055 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-27 15:43:09 +00:00
Manolo Gouy
0f0597eb58 "File Systems" menu item of Fl_File_Chooser: make sure "/" is listed as one of the mounted filesystems.
One FreeBSD user reported a case where "/" does not appear in /etc/fstab, and thus
did not appear when the "File Systems" menu item of Fl_File_Chooser is run.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12047 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-19 05:55:03 +00:00
Albrecht Schlosser
de80a36218 Fix inconsistent interpretation of ld() in image handling (STR #3308).
Documentation has been fixed and clarified, and ld() handling is now
consistent in Fl_(RGB_)Image, their subclasses and fl_draw_image()
and similar functions.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12028 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-14 16:35:44 +00:00
Albrecht Schlosser
5c19bf07bf Documentation fixes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12026 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-14 14:33:14 +00:00
Manolo Gouy
842c45f938 Fl_Native_File_Chooser on MacOS: improve handling of case where no chooser title is set.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12012 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-05 07:36:04 +00:00
Manolo Gouy
6324e540fe Improve Fl_Native_File_Chooser open dialog under Mac OS 10.12 that had lost its titlebar message.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12010 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-04 14:56:38 +00:00
Manolo Gouy
6df5b37006 Fix for STR#3308 - MacOS-specific part
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12008 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-04 11:26:36 +00:00
Albrecht Schlosser
c8837ffaec Fl_Shared_Image documentation enhancements and clarifications.
Minor code changes (e.g. renaming of variables) included, but no functional
changes.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12002 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-01 22:35:37 +00:00
Greg Ercolano
7651217fa3 Applying my suggested patch to solve immediate issues with STR #3231.
Probably more needs to be done (see STR), but at least solves the
immediate issues.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12000 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-10-01 21:20:18 +00:00
Manolo Gouy
f658fc0aea Add necessary autorelease pool for function get_window_frame_sizes()
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11991 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-27 20:08:23 +00:00
Manolo Gouy
8a1b394380 MacOS platform: fix building under OS 10.4 that may not have kCGBitmapByteOrder32Host #define'd
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11989 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-27 10:36:08 +00:00
Greg Ercolano
6930bfca17 Small doc clarification for omitted word, caught by Albrecht via private email.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11986 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-26 19:29:03 +00:00
Albrecht Schlosser
8a392f90de X11: More explicit warning when using rotated text w/o Xft.
The warning is issued to stderr only once (previously: every time rotated
text was used).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11977 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-25 11:07:06 +00:00
Albrecht Schlosser
c930e2c0c0 Fl_Tree documentation fixes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11975 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-24 22:47:28 +00:00
Albrecht Schlosser
6def7a3924 Fix copyright year.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11970 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-23 14:03:40 +00:00
Albrecht Schlosser
b7fc62a589 Fix potential crash when using keyboard nav. on Fl_Tabs (STR #3333).
Also: more consistent use of 'const int nc = children()'. Added 'const'
qualifier for clarity only. This does not change the behavior.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11969 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-23 14:01:12 +00:00
Manolo Gouy
9c429ac63c Remove the 'suppressed' variable from cocoaMouseHandler(), a useless residue from ancient code.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11959 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-21 06:10:06 +00:00
Albrecht Schlosser
ad65146bf9 Update dependencies.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11955 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-20 13:19:25 +00:00
Manolo Gouy
0c457fb89d Remove possible warnings when compiled with -Wundef
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11943 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-13 11:51:24 +00:00
Manolo Gouy
6796d05425 Fix typo in macro __LP64__
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11939 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-12 16:22:59 +00:00
Greg Ercolano
3317b4df30 Code indent consistency + doxygen \code indent fixes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11923 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-05 19:28:21 +00:00
Greg Ercolano
1dc11af70f Fixes STR#3200 issue with filter() on Win32.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11920 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-05 16:46:59 +00:00
Albrecht Schlosser
c0fb27cc2f Fix compiler warning (STR #3081).
Note to devs: this was already fixed in branch-1.3-porting.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11914 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-09-01 12:41:19 +00:00
Greg Ercolano
f2aabb5ef8 Fixes STR# 3325 - fixes scheme oriented focus box drawing problems when Fl_Choice height is <20
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11907 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-30 19:08:36 +00:00
Manolo Gouy
924f223fc4 Fix slight scaling error when pasting Enhanced metafile from clipboard.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11903 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-28 15:18:44 +00:00
Manolo Gouy
172c8c8984 Remove implicit conversion between Fl_Image* and Fl_RGB_Image*
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11902 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-28 09:51:10 +00:00
Manolo Gouy
3b5bf9691d Use desktop scaling factor also when pasting an Enhanced Metafile
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11901 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-28 06:54:20 +00:00
Manolo Gouy
4ca9bc95f8 Fix Fl_Copy_Surface on Windows 10 when the display scaling factor is > 100%
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11898 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-27 15:17:02 +00:00
Manolo Gouy
57e48378d7 Add Doxygen comments for the Fl_RGB_Image::alloc_array and ::array public attributes.
Also, document what is the value of alloc_array after construction of an Fl_RGB_Image object.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11896 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-27 11:10:54 +00:00
Manolo Gouy
da759d41df Fix Fl_Window::decorated_h() and decorated_w() when display scaling factor > 100% under Windows 10.
Fl_Paged_Device::draw_decorated_window() is also repaired.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11894 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-27 06:41:24 +00:00
Albrecht Schlosser
c79ec99d05 Fix compiler warnings and simplify X11 screen_init().
This function sets the screen dimensions and tries to use Xrandr,
Xinerama, and basic X11 functions (in this order) to get the screen
sizes and resolutions (dpi).

This commit simplifies conditional compilation and fixes "unused variable"
compiler warnings under certain conditions as mentioned by Greg in
fltk.general, thread "Can not change font size in Kubuntu 16.04" on
Mon, 15 Aug 2016 00:25:32 -0700.

Also merged back small improvements of branch-1.3-porting.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11889 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-23 16:38:10 +00:00
Albrecht Schlosser
b68501bddd Improve documentation, fix Fl_Window::icon(NULL).
This is now documented as legal to reset a window icon.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11881 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-20 17:08:27 +00:00
Pierre Ossman
0eb99fa0b1 Fix buffer overflow in CR/LF conversion
An already present CR/LF combination causes us to jump two characters,
but we failed to update the length counter when doing this.

This also makes sure we handle the corner case of a CR as the last
character.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11873 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-16 13:30:26 +00:00
Albrecht Schlosser
ff214db67a Fix typos, separate local variables of image scaling algorithms.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11868 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-09 15:19:46 +00:00
Albrecht Schlosser
6e688a52be [CMake] Restore ability to build shared libs under Linux etc.
Under Linux we link the shared image libs and forms libs with fltk_SHARED
(again), but this does currently not work with Visual Studio, hence we
need to differentiate in src/CMakeLists.txt when building shared libs.


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11866 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-08 14:17:22 +00:00
Albrecht Schlosser
ba56c33726 [CMake] Fix Windows dll build with Visual Studio generator.
Now you can set OPTION_BUILD_SHARED_LIBS:BOOL=ON to build FLTK dll's with
Visual Studio. Tested and works (Visual Studio 2010 + 2015).

Todo: dll names and target directories may need some changes.

Todo: Shared libraries under Linux with CMake don't work yet:
/usr/bin/ld: ../lib/libfltk.a(Fl.cxx.o): relocation R_X86_64_32S against
  `.bss' can not be used when making a shared object; recompile with -fPIC



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11865 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-08-08 12:25:08 +00:00
Albrecht Schlosser
a51a940890 Fix compiler warnings (gcc 6.1).
Some of these warnings were benign (code formatting), but one of them
showed a potential bug (zero divide in test/fraciewer.cxx).

Fixed warnings:

 2 suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' [-Wparentheses]
 1 this 'while' clause does not guard... [-Wmisleading-indentation]
 1 this 'for' clause does not guard... [-Wmisleading-indentation]
 1 this 'else' clause does not guard... [-Wmisleading-indentation]


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11849 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-29 09:23:44 +00:00
Albrecht Schlosser
9721373219 Doc changes: set fl_font before fl_measure() (STR #3243)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11847 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-24 08:53:08 +00:00
Greg Ercolano
60ac8a8eba Fixes STR #3270; when an image is used as a link,
this mod synchronizes the link's hot spot with the image.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11844 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-23 04:25:40 +00:00
Greg Ercolano
f22cd53795 Fixes to fl_choice() docs, added screenshots.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11842 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-22 02:05:44 +00:00
Greg Ercolano
2bb2192dd3 Solves STR#3294; added methods to let user set the userdeicon,
and removed the performance degrading automatic deicon creation.




git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11840 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-21 00:35:06 +00:00
Albrecht Schlosser
fa2bb6514b Improve drawing of rounded box (STR #2943).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11814 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-15 22:10:23 +00:00
Albrecht Schlosser
97bb88960e Fix unnecessary case-sensitive comparison (STR #2899).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11813 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-15 20:01:08 +00:00
Albrecht Schlosser
6e503e90a0 Allow widget callback to be NULL (STR #2835).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11811 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-15 19:23:16 +00:00
Albrecht Schlosser
f40cb28308 Fix uninitialized variable warning.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11810 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-15 10:24:35 +00:00
Greg Ercolano
1c761bedc3 Solves STR# 3305 as ABI feature 1.3.4.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11808 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-14 18:48:43 +00:00
Greg Ercolano
e45dfc2b20 Small code simplification as suggested in comment #15 of STR#2828
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2016-07-14 01:12:21 +00:00