Commit Graph

5376 Commits

Author SHA1 Message Date
Albrecht Schlosser
3e4baae6fc Fix DND in read-only Fl_Input (Fl_Output)
See report in fltk.coredev as of today (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-01-16 17:12:24 +01:00
OKAMURA, Yasunobu
dd3bf0791e Fix JIS Keyboard dead keys 2020-01-16 16:17:36 +01:00
Albrecht Schlosser
33825df108 Don't include 'src/flstring.h' in menubar demo
src/flstring.h should only be used in library code because it
  includes <config.h>.

Document this fact in src/flstring.h.
2020-01-16 15:59:00 +01:00
Albrecht Schlosser
dfaab4ae90 Fix uninitialized vars in calls to fl_clip_box() (issue #6)
The main fixes are only to avoid static code analyzer warnings reported
in issue #5, but there are also minor bug fixes included. These bug
fixes are more of theoretical concerns though.

Close #6.
2020-01-15 21:23:26 +01:00
ManoloFLTK
3265d439f3 Slightly improve Fl_Quartz_Graphics_Driver::copy_offscreen() when macOS ≥ 10.4 2020-01-15 18:18:59 +01:00
Matthias Melcher
afcc79c3f7 Merge remote-tracking branch 'refs/remotes/origin/master' 2020-01-14 19:22:03 +01:00
Matthias Melcher
ed80d9cef0 Fixed some documentation for Fl_Preferences and fl_make_path. 2020-01-14 19:21:58 +01:00
ManoloFLTK
d598f9ea06 Fix typo in comment 2020-01-14 16:31:47 +01:00
Albrecht Schlosser
2437a75d5f Add missing Fl_Image_Reader files
Forgot to add these files. Sorry for the noise.
2020-01-13 23:15:00 +01:00
Albrecht Schlosser
115a6025f6 Fix Doxygen warnings and errors 2020-01-13 23:11:35 +01:00
Albrecht Schlosser
1e2b0af443 Combine image readers in class Fl_Image_Reader
This new class is explicitly internal and undocumented. We can
rename and/or redefine or extend it as we need.

This work is based on Matt's recent update with separate internal
classes BMPReader and GIFReader which have been replaced by
Fl_Image_Reader.
2020-01-13 22:41:13 +01:00
ManoloFLTK
c90baf9492 Bring main window to front when it's not there. 2020-01-13 18:01:29 +01:00
ManoloFLTK
2990717d6e Implement Fl_Window::icon() and default_icon() for macOS
The implementation is effective for macOS 10.10 and above.
Demo program test/device uses the new implementation.
2020-01-11 14:57:58 +01:00
Matthias Melcher
006d71c663 Improved documentation of Fl_Preferences.
Detailed information on how preference file paths are generated, and preliminary docs what happens if that fails. Documentation, on what FLTK die pre 1.4 when any of this failed. Also, a little TODO list for me that I will hopefully get to in the next days.
2020-01-11 00:19:58 +01:00
Matthias Melcher
7e0c82637d Updated image readers.
Removed duplicate code from Fl_JPEG_Image, updated and unified Doxygen comments. Avoiding name conflict in new protected functions.
2020-01-10 18:46:45 +01:00
Albrecht Schlosser
2411336e84 Fix X11 RTL text clipping (STR 2798) - part 2
Yet another fix for RTL text...
2020-01-09 00:35:42 +01:00
Albrecht Schlosser
2df013931b Improve X11 coordinate clipping for text (STR 2798)
Text outside the 16-bit X11 coordinate space must be clipped before
calling X11 draw functions, otherwise text might appear anywhere
in the window because X11 would "truncate" the coordinates instead
of proper clipping (X11 handles only 16-bit coordinates).
2020-01-08 19:50:35 +01:00
ManoloFLTK
d2e2077544 Fix Doxygen description of the constructors. 2020-01-05 15:51:47 +01:00
Albrecht Schlosser
97e30260ec Update dependencies and .gitignore 2020-01-04 01:54:30 +01:00
Matthias Melcher
9c5888aa34 MacOS: Added the original code to the Fl_Preferences path that would search $HOME first, and only if that fails, we try other ways to find the home directory. This should be highly compatible with what we had first. 2020-01-04 00:51:22 +01:00
Matthias Melcher
618024827e Merge remote-tracking branch 'refs/remotes/origin/master' 2020-01-03 21:38:18 +01:00
Matthias Melcher
1ba9e64ba9 Added code to read GIF files from memory (GitHub issue #33, 2/2) 2020-01-03 21:37:52 +01:00
Matthias Melcher
86893a90cb Added code to read BMP files from memory (GitHub issue #33, 1/2) 2020-01-03 21:10:00 +01:00
MatthiasM
27d22aeed6 Fixed previous commit for MSWindows. 2020-01-03 18:13:14 +01:00
MatthiasWM
c82d3878a4 Linux build: typos and stupidities to prev. commit 2020-01-03 17:55:08 +01:00
Matthias Melcher
462b681679 Linux/MSWindows: improved Fl_Preferences file path checking 2020-01-03 17:42:22 +01:00
Matthias Melcher
8147199a41 macOS: checking Fl_Preferences file path improved
zlib: removed warning
2020-01-03 17:05:52 +01:00
Matthias Melcher
db6fa8bf86 Merge remote-tracking branch 'refs/remotes/origin/master' 2019-12-31 18:33:01 +01:00
Matthias Melcher
c0237a1f04 Limiting file access for Fl_Preferences.
Added Fl_Preferences::file_access() and various flags that make it possible to limit or completely deny file access to the preferences system, either for the core library or for the application or both.
2019-12-31 18:30:04 +01:00
ManoloFLTK
a234ba7f33 Merge branch 'master' of https://github.com/fltk/fltk 2019-12-27 12:27:33 +01:00
ManoloFLTK
07c2ba56da 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."
2019-12-27 12:14:26 +01:00
Albrecht Schlosser
3701950a90 Fix rare early timeouts in Fl_Clock (STR 3516).
This is the main patch for Fl_Clock discussed in STR 3516. Although
the root cause under Linux (in Fl::add_timeout()) has been fixed
in a previous commit (35a3e7cc1) early timeouts may still occur,
e.g. under Windows in a Virtualbox environment.

This commit reverts bab61a93d and replaces it with the patch proposed
by Manolo and further discussed in STR 3516.
2019-12-26 18:13:03 +01:00
Albrecht Schlosser
35a3e7cc16 Fix Fl::add_timeout() under Linux (STR 3516)
See comment 14 (excerpt):

"The current implementation basically handles add_timeout() the same
way as repeat_timeout(), i.e. add_timeout() *calls* repeat_timeout().
However, repeat_timeout() intentionally *corrects* the timeout value
by the value found in the global variable 'missed_timeout_by' which
is set when the timer expires, directly before the timer callback
is called. This variable is never reset."

This commit resets the variable as necessary in Fl::add_timeout().
2019-12-26 17:19:05 +01:00
Matthias Melcher
70179b618a Merge remote-tracking branch 'refs/remotes/origin/master' 2019-12-23 14:35:41 +01:00
Matthias Melcher
bd77a6e976 Android Image driver was incomplete and did not compile. 2019-12-22 18:47:27 +01:00
ManoloFLTK
f68dee3288 Fix problems after closing full-screen window
macOS strangely sends NSViewFrameDidChangeNotification and a drawRect: message to its content view
after having sent to the window the close message. That is apparently new in 10.15.2
2019-12-20 10:59:19 +01:00
ManoloFLTK
896112ca82 Merge branch 'master' of https://github.com/fltk/fltk 2019-12-19 18:25:48 +01:00
ManoloFLTK
803a472c5f Fix support of screen scaling under macOS 2019-12-19 18:25:09 +01:00
Albrecht Schlosser
0a124ac7e1 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:53:58 +01:00
ManoloFLTK
ee9ada9678 Undo commit b1bcd1f that was not necessary. 2019-11-09 07:21:56 +01:00
ManoloFLTK
b1bcd1f19f Safer control of memory allocation of aux_bitmap member of FLView 2019-11-08 21:02:43 +01:00
ManoloFLTK
cc4801133f X11 + pango: Sort font names ignoring case. 2019-11-08 10:09:18 +01:00
ManoloFLTK
2445797e45 Reorganise use of virtual member function Fl_Surface_Device::end_current() 2019-11-07 14:28:20 +01:00
ManoloFLTK
4abb0d0a25 Comments only: place new class Fl_GTK_Printer_Driver in the inheritance description. 2019-11-05 17:17:37 +01:00
ManoloFLTK
da29db9f9c Slightly simpler code to support fl_overlay_rect() on HighDPI screens. 2019-11-02 11:41:42 +01:00
ManoloFLTK
ecdb386f3d Fix HiDPI support under X11 to read/draw RGB image from/to display. 2019-11-01 14:32:07 +01:00
ManoloFLTK
04ec829bfb Fix fl_overlay_rect() under X11 on HighDPI display.
The mandelbrot demo program is fixed.
2019-11-01 08:26:22 +01:00
ManoloFLTK
031a7a8414 Merge remote-tracking branch 'refs/remotes/origin/master' 2019-10-30 21:14:15 +01:00
ManoloFLTK
527327b8e4 Restore CMake support of Darwin + XQuartz + fink test platform 2019-10-30 21:13:52 +01:00
Albrecht Schlosser
1f9d027bb6 Fix typo and debug output when loading libgtk
A recent commit changed the library name, supposedly unintended.

While testing I found that the debug statements generated confusing
output (both "selected GTK-3" and "selected GTK-2") when GTK-3 was
available.
2019-10-30 19:00:12 +01:00