Commit Graph

6382 Commits

Author SHA1 Message Date
Albrecht Schlosser
2a856dafd4 Remove superfluous center alignment from images
Doxygen uses a <div> with center alignment for images, hence
adding HTML center alignment for image is not only superfluous
but was also inconsistent.

Also removed some more unnecessary HTML tags, updated copyright year.
2022-10-09 19:35:20 +02:00
ManoloFLTK
1a5d6572e9 Fix issue #510: image transparency is not properly processed. 2022-10-09 17:43:06 +02:00
Albrecht Schlosser
4d17cf310d Fix documentation of Fl_Timeout::insert() 2022-10-09 14:30:32 +02:00
ManoloFLTK
e9719e5416 Update window icon-related doc in platform-specific section. 2022-10-06 15:07:39 +02:00
ManoloFLTK
5f189aa213 Make Windows-specific HICON-using functions visible in doc. 2022-10-06 13:15:16 +02:00
ManoloFLTK
6732044a07 Fix use of several FLTK widgets above an GL scene.
The code failed with 2 or more widgets when FLTK would trigger
partial redraws of the widgets, unless the Fl_Gl_Window was FL_DAMAGE_ALL.

This commit also adds a second FLTK widget to example/OpenGL3test to
check this multiple widget situation, and fixes an error where operator ! was used
instead of ~ .
2022-10-06 08:43:09 +02:00
ManoloFLTK
206d9b17e0 Fix issue #509: Cairo drawing: unexpected behaviour
This commit fixes " "drawing an fl_pie() with dimension 1x1".
But it does not change "drawing fl_line() with begin position = end position does not show"
because the same behaviour is observed with Windows and macOS.
2022-10-05 08:52:30 +02:00
ManoloFLTK
30efed7fd4 Revert 75016cb because it doesn't work well with macOS < 13.0
The problem is visible with test/tile when moving the sub window's border.
This also fixes issue #508
2022-10-03 10:21:39 +02:00
ManoloFLTK
4b70bc32c5 Add missing return value to Fl_WinAPI_Gl_Window_Driver::create_gl_context() 2022-10-02 21:37:35 +02:00
ManoloFLTK
1fc23f8506 Clean use of virtual GLContext Fl_Gl_Window_Driver::create_gl_context(). 2022-10-02 13:35:53 +02:00
ManoloFLTK
abc6709e8e macOS: simpler way to delete the GL1 context of widgets-using GL3 windows. 2022-10-02 08:40:38 +02:00
ManoloFLTK
63a7942a66 macOS: support 5 more keys as Fl_Sys_Menu_Bar item shortcuts. 2022-10-01 13:28:52 +02:00
ManoloFLTK
4196daa77e macOS: fixed problem in resizing of widget-containing OpenGL 3 window. 2022-10-01 07:31:42 +02:00
ManoloFLTK
0627213a82 FLTK widgets in OpenGL 3 windows: rewrite for driver system. 2022-09-30 19:25:23 +02:00
ManoloFLTK
a61d8fb682 macOS: simpler code for auxiliary NSView supporting widgets on a GL3 window. 2022-09-30 16:20:51 +02:00
ManoloFLTK
4f6965d39f Support of FLTK widgets in OpenGL 3 windows under Windows. 2022-09-30 15:53:05 +02:00
ManoloFLTK
75016cb853 macOS: implement (BOOL)[FLView isOpaque] to improve drawing performance. 2022-09-30 09:03:54 +02:00
ManoloFLTK
63dcdcec0a macOS: support FL_Up,FL_Down,FL_Left,FL_Right system menu item shortcuts 2022-09-30 07:36:07 +02:00
ManoloFLTK
c96a4f3141 macOS platform: rename Fl_Cocoa_Gl_Window_Driver.cxx to .mm 2022-09-29 16:25:14 +02:00
ManoloFLTK
da66e21e1d Support of FLTK widgets in OpenGL 3 windows - cont'd.
This commit allows to switch between FL_DOUBLE / FL_SINGLE modes
in widget-containing GL3 windows.
Demo program examples/OpenGL3test is modified to show FLTK widgets
even if the platform does not support OpenGL 3.
2022-09-29 09:39:21 +02:00
ManoloFLTK
c2efb0d849 macOS: support of FLTK widgets in OpenGL 3 windows - cont'd.
This code is OK under macOS 10 9 and 13.
2022-09-28 17:06:00 +02:00
ManoloFLTK
7d58e23854 macOS: add necessary setWantsBestResolutionOpenGLSurface:YES message. 2022-09-28 08:23:36 +02:00
ManoloFLTK
3225afaeec Remove use of class Fl_Window_Driver inside libfltk_gl 2022-09-27 16:51:35 +02:00
ManoloFLTK
3ba09047e2 Use PR #507 by @ggarra13 to fix issue #85. 2022-09-27 14:48:22 +02:00
ManoloFLTK
59fc60ea4c Simpler code to support FLTK widgets in macOS OpenGL 3 windows.
Also, the application-level code to add widgets to a GL3 window becomes
platform-independent.
2022-09-27 14:12:39 +02:00
ManoloFLTK
2ffd4e4f1a Replace all calls to sprintf() by calls to snprintf(). 2022-09-26 16:12:18 +02:00
ManoloFLTK
53d9614adb Fix crash under macOS 13 Ventura public beta 6 when closing menu window.
Bizarrely, an NSMouseEntered event arrives returning nil to [event window]!
2022-09-26 10:46:50 +02:00
ManoloFLTK
89f9671b40 Add cross-platform support for adding widgets to an OpenGL3-based Fl_Gl_Window.
Under non-macOS platforms, the key is to call glUseProgram(0); after having used OpenGL 3
which allows to then use OpenGL 1 and draw FLTK widgets over the OpenGL3 scene.

Under macOS, this is impossible because macOS GL3 contexts are not compatible
with GL1. The solution implemented here is to create an additional Fl_Gl_Window
placed above and sized as the GL3-based window, to give it a non opaque,
GL1-based context, and to put the FLTK widgets in that additional window.
2022-09-25 16:39:40 +02:00
ManoloFLTK
bfba62a8a2 GL3 for macOS platform: allow creation of GL1 and GL3 contexts by an app. 2022-09-23 18:21:29 +02:00
ManoloFLTK
0fdc88d2d7 GL3 support under X11: ask for compatibility profile if possible. 2022-09-23 18:09:40 +02:00
ManoloFLTK
eb0bba4058 Fix Fl_X11_Window_Driver::fullscreen_on() and Fl_X11_Window_Driver::fullscreen_off(). 2022-09-23 14:25:32 +02:00
ManoloFLTK
4b6468a80c Wayland: process OPTION_USE_WAYLAND for Unix only 2022-09-23 07:42:04 +02:00
ManoloFLTK
8bbedd65a8 Fix issue #501: build error under macOS 10.10 2022-09-22 20:12:40 +02:00
ManoloFLTK
647b0a8008 Wayland: fix window closing with titlelbar close button. 2022-09-22 10:51:46 +02:00
ManoloFLTK
eb314f5653 Allow use of Fl_Window::default_icon() with a scaled image - Part 2.
Default icons are handled according to their scaled size, if there scaled.
2022-09-17 09:03:34 +02:00
ManoloFLTK
699cca8ff4 Make Fl::set_color(r,g,b,a) effective under Wayland and macOS. 2022-09-15 15:01:12 +02:00
ManoloFLTK
700fb1aadd Improve virtual void* Fl_Gl_Window_Driver::GetProcAddress(procName) 2022-09-14 08:53:45 +02:00
ManoloFLTK
f265ca2afc Avoid deprecated glGetString(GL_EXTENSIONS) call when possible. 2022-09-13 18:41:18 +02:00
ManoloFLTK
e43c2f566d Remove forgotten debug code. 2022-09-13 11:24:08 +02:00
ManoloFLTK
87ee126e1f Allow use of Fl_Window::default_icon() with a scaled image. 2022-09-12 11:07:03 +02:00
ManoloFLTK
d028f0b37d Fix fl_read_image() under hybrid Wayland/X11 platform.
Function fl_read_image() obliges to keep a minimal use of global variable fl_window
also under the Wayland platform, even if its type (Window) makes little sense for
the hybrid library because it has its X11 value (given by X11/X.h) which is not
meaningful for the Wayland leg of the hybrid platform.

Virtual member function Fl_Surface_Device::as_image_surface() becomes useless.
2022-09-11 19:45:48 +02:00
ManoloFLTK
98d8a5da0c Fix support of CMake OPTION_WAYLAND_ONLY. 2022-09-11 10:42:56 +02:00
ManoloFLTK
ef243d6c86 Add needed variable for Wayland-only platform. 2022-09-11 09:52:02 +02:00
ManoloFLTK
2ea85ea6d7 Fix regression in fl_read_image() after introduction of hybrid Wayland/X11 platform.
The special use context of fl_read_image() inside the draw() function of an
Fl_Double_Window, where the function should read inside the window's double buffer
rather than the on-screen window, no longer worked.

Removal of all uses of the fl_window global variable from platform-independent
code remains necessary, because this variable is ill-defined in the Wayland/X11
library.
2022-09-11 09:15:42 +02:00
ManoloFLTK
b37576aa55 New configure setting "--enable-wayland --disable-x11" to build pure Wayland platform. 2022-09-10 07:44:23 +02:00
ManoloFLTK
203e7b7098 New OPTION_WAYLAND_ONLY for CMake to build pure Wayland platform. 2022-09-09 15:19:15 +02:00
ManoloFLTK
1b0f21cc8f Wayland: support going from borderless to bordered window. 2022-09-09 08:23:09 +02:00
ManoloFLTK
7800c2f3c3 Wayland: fix handling of fast calls to Fl_Window::flush().
Also fix scaling of borderless windows.
2022-09-09 07:26:19 +02:00
ManoloFLTK
0ff31668a1 Wayland: remove memory leak from missing wl_callback_destroy() call.
This hopefully corresponds to the memory leak mentioned in fltk.general
named "FLTK and Wayland".
2022-09-08 16:11:53 +02:00
ManoloFLTK
71069b8570 Add necessary virtual qualifier to ~Fl_Font_Descriptor() and derived. 2022-09-08 16:04:09 +02:00
ManoloFLTK
13e05f4204 Improve support of child windows that may leak outside their parent window.
1) add Wayland code that prevent subwindows from leaking outside their parent.
This does not cover GL subwindows.

2) add macOS code that prevent GL subwindows from leaking outside their parent.
This fixes issue #494 for the macOS platform.

N.B.: Wayland GL subwindows are not prevented from leaking because no solution
that would not require any change in client applications was found. Code that
would cover Wayland GL subwindows but would require client applications to always
use the FL_ALPHA flag is included in this commit in commented out form.
2022-09-07 14:40:16 +02:00
Albrecht Schlosser
deeb977c2e Wayland: fix memory leak on FL_KEYUP events
The old code would allocate memory on FL_KEYDOWN and FL_KEYUP events
and never free the latter.

The fix is to allocate memory only on FL_KEYDOWN events which will
be free'd later as intended.

Also fix two unrelated whitespace errors.
2022-09-06 20:04:33 +02:00
ManoloFLTK
57e0cdec08 Fix for issue #493 2022-09-03 12:36:50 +02:00
Albrecht Schlosser
76858fc040 Fix compiler warning [-Wunused-function]
warning: ‘int xrender_supported()’ defined but not used

This happens only with certain configure options, particularly if
  FLTK_USE_CAIRO is set, i.e. drawing with Cairo is enabled.
2022-09-02 16:28:53 +02:00
Albrecht Schlosser
e0bf25d911 Remove useless if (...) 2022-09-01 17:12:10 +02:00
ManoloFLTK
b75d7526fd Simplify Fl_Window_Driver::screen_num() member functions. 2022-09-01 11:55:41 +02:00
ManoloFLTK
b4686f0e5b Restore building with --disable-xft 2022-09-01 11:45:27 +02:00
ManoloFLTK
736c20f7a2 Wayland platform: remove redirection of stderr. 2022-08-31 10:43:10 +02:00
ManoloFLTK
5701313340 Hybrid Wayland/X11: remove setenv() call from Fl_Wayland_System_Driver::disable_wayland(). 2022-08-31 08:56:56 +02:00
ManoloFLTK
07fd2628fe Hybrid Wayland/X11 platform: improve control of chosen backend. 2022-08-30 17:37:55 +02:00
ManoloFLTK
fcdc2f0e10 Attempt to improve fl_disable_wayland(). 2022-08-30 12:58:57 +02:00
ManoloFLTK
84af966109 Add FL_EXPORT to Fl_Wayland_Screen_Driver::wl_display member variable. 2022-08-30 08:55:14 +02:00
ManoloFLTK
2c1effc385 Wayland: Fix Fl_Gl_Window_Driver::newGlWindowDriver() for shared libs 2022-08-30 08:15:21 +02:00
ManoloFLTK
95c851fda1 Set Fl_Graphics_Driver::set_color(Fl_Color, unsigned) used by macOS, Wayland and display-cairo. 2022-08-30 07:58:16 +02:00
Albrecht Schlosser
510f711513 Improve selection of Wayland or X11 backend
Calling fl_disable_wayland() at runtime must have highest priority
before environment variables are considered.
2022-08-29 19:56:18 +02:00
Albrecht Schlosser
746135f0ae X11: Fix rescaling of non-resizable window (issue #491) 2022-08-29 18:55:01 +02:00
ManoloFLTK
1ca767eb13 Hybrid Wayland/X11 : more accurate writing of fl_wl_display(). 2022-08-29 18:49:15 +02:00
ManoloFLTK
9276ade07b Wayland/X11 hybrid: fix crash of test program demo. 2022-08-29 18:34:11 +02:00
Albrecht Schlosser
c20e7d9efc Update dependencies, fix trailing whitespace 2022-08-29 14:26:28 +02:00
ManoloFLTK
c720aae515 Make hybrid Wayland/X11 platform. 2022-08-29 12:15:32 +02:00
Albrecht Schlosser
6a546d4e9c Fix dependencies and whitespace errors
No "real" code changes, but dependencies can affect building.
2022-08-25 22:04:59 +02:00
ManoloFLTK
6064518100 Remove unneeded FL_EXPORT declaration. 2022-08-25 15:48:54 +02:00
ManoloFLTK
feac10ec89 Wayland: reduce the number of platform-specific FL_EXPORT directives. 2022-08-25 10:42:58 +02:00
ManoloFLTK
51e9b28f39 Add FL_EXPORT directives to support building shared libs with -no-undefined 2022-08-24 15:09:30 +02:00
ManoloFLTK
80ecf605ec Wayland: Fix obscure problem when closing file dialog under recent OS versions.
The problem is that the app sometimes stops after closing a file dialog window.
It results in fact from a bug in function draw_title_bar of libdecor-gtk.c that erroneously
calls libdecor_frame_set_max_content_size(). This bug is being proposed to be fixed
by a MR to libdecor.

But moving the libdecor_frame_set_min/max_content_size() calls after the capability changes
hides the bug, and the problem with file dialog doesn't show.
2022-08-23 16:20:47 +02:00
ManoloFLTK
4611327672 Comment-only changes. 2022-08-23 09:04:14 +02:00
ManoloFLTK
1631e39187 Add FL_EXPORT directives erroneously removed at 7deff86. 2022-08-23 09:02:06 +02:00
ManoloFLTK
a70bd69cfb Fix argument of glMatrixMode() call. 2022-08-21 10:14:18 +02:00
ManoloFLTK
d5a1e7feb9 Add static Fl_Wayland_Window_Driver::gl_plugin() member function. 2022-08-20 17:26:02 +02:00
ManoloFLTK
7deff86b5d Remove FL_EXPORT qualifier from platform-specific class declarations. 2022-08-20 10:16:32 +02:00
ManoloFLTK
b24379133f Add int Fl::system(const char *command) static member function. 2022-08-20 09:57:00 +02:00
ManoloFLTK
ce2f024bce Fl_Graphics_Driver: remove unused virtual qualifiers. 2022-08-19 10:47:42 +02:00
ManoloFLTK
6194b736eb Add a few missing virtual members to Fl_Cairo_Graphics_Driver. 2022-08-18 16:22:28 +02:00
ManoloFLTK
2cfb5fcc57 Document Fl_Gl_Window::draw_begin() and draw_end(). 2022-08-18 11:21:35 +02:00
ManoloFLTK
f927a3047c Simplify class Fl_OpenGL_Display_Device. 2022-08-18 08:53:19 +02:00
ManoloFLTK
5227ee09a3 Remove un-necessary Fl_Wayland_Gl_Window_Driver::capture_gl_rectangle(). 2022-08-18 08:10:26 +02:00
ManoloFLTK
cc87fd8def Simplify Fl_Wayland_Gl_Window_Driver::make_current_before() member function. 2022-08-17 15:24:05 +02:00
ManoloFLTK
1f53b9e203 Wayland platform: improve Fl_Gl_Window resize operations. 2022-08-17 09:26:40 +02:00
ManoloFLTK
d23963af60 Remove useless Fl_Wayland_Window_Driver::show_with_args_begin/end(). 2022-08-15 19:23:57 +02:00
ManoloFLTK
82fa5ea19c Fix Fl_Wayland_Window_Driver::decoration_sizes(). 2022-08-15 18:40:11 +02:00
ManoloFLTK
d325fa504e Replace call to CreateFont() by call to CreateFontW(). 2022-08-13 12:25:04 +02:00
ManoloFLTK
d1d3cc9afa Add virtual Fl_Cairo_Graphics_Driver::cache_size() member function. 2022-08-12 19:47:04 +02:00
ManoloFLTK
b8c227a8f2 Fix Fl_Xlib_Graphics_Driver for drawing tiled images.
Conflicting demands arise in the implementation of class Fl_Xlib_Graphics_Driver
for drawing images with the XRender library :

1) Issue #163 leads to use a bilinear filter to draw-and-scale images.
2) This tends to blur the edges of drawn areas which is bad for tiled images
(that is because the edges get alpha values, even for an opaque source image).

This commit resolves the conflict adding a means to detect whether the library
is busy drawing a tiled image. If so, the bilinear filter is not applied, drawn areas
don't  have blurred edges, resulting in a nice tiling.

With this commit, these test apps perform correctly:
- tiled_image is correct at all scaling factor values also when modified
to use a depth-3 or a depth-4 Fl_RGB_Image as tile;
- unittests - Drawing Images is correct at all scaling factor values;
- pixmap_browser scales correctly up and down JPEG and PNG images.
2022-08-10 10:53:29 +02:00
ManoloFLTK
92f6962b59 Fix Fl_Xlib_Graphics_Driver for tiled-depth 3 images.
Modifying test/tiled_image to make it use a depth-3 image for
tiling (rather than an Fl_Pixmap) shows the filter does require
to use PictOpOver as the render op in the XRenderComposite call.
2022-08-09 17:43:48 +02:00
ManoloFLTK
1562396ec0 Fix Fl_Xlib_Graphics_Driver for RGB image drawing under XQuartz. 2022-08-09 16:05:53 +02:00
Albrecht Schlosser
d20de5bc0a Fix src/Makefile: add missing directory to 'clean' target 2022-08-08 11:33:45 +02:00
Albrecht Schlosser
713d276b1c Fl_Flex: support different margin sizes, improve docs
Support different margin sizes on all four edges. Default margin
  and gap size is now 0 (compatible with Fl_Pack).

Doxygen: move the description from the constructor to the class
  declaration which constitutes a "description".

Make some methods virtual and/or 'const'.

Clarify demo programs, make them even more "FLTK style".
2022-08-07 16:00:41 +02:00
ManoloFLTK
f5b14397dd Wayland platform: fix declaration of local variable 'scale'. 2022-08-07 10:49:11 +02:00
ManoloFLTK
5dfc64ef32 Wayland platform: move repeated code into Fl_Wayland_Graphics_Driver::buffer_commit(). 2022-08-07 10:43:38 +02:00
ManoloFLTK
b25549ffa7 Wayland: make sure wl_surface_frame() is followed by wl_surface_commit(). 2022-08-06 17:30:44 +02:00
ManoloFLTK
149673863d Wayland: fix regression from 50d26b0 in test/mandelbrot. 2022-08-06 16:50:58 +02:00
ManoloFLTK
33ea30432f Check for error while communicating with Wayland - cont'd. 2022-08-06 10:27:17 +02:00
ManoloFLTK
e73e13120e Check for error while communicating with Wayland. 2022-08-06 10:07:38 +02:00
ManoloFLTK
169c6980d1 Fl_Darwin_System_Driver: use explicit unicode characters, comment out coding sequences. 2022-08-02 17:48:39 +02:00
Albrecht Schlosser
c8565bf4f3 Fix Fl_Flex unsetting of set_size()
Don't add the widget to the array if size == 0 (unset) but it has
not been in the array (or it's called twice).
2022-08-01 19:56:08 +02:00
Albrecht Schlosser
f37aca15e9 Add Fl_Flex widget from Karsten Pedersen (issue #255)
This work is based on the repository and latest commit:
  https://github.com/osen/FL_Flex.git

  commit 36e4ed75a00daac825b87e81295818b4650991f5
  Author: Karsten Pedersen <...>
  Date:   Fri Apr 23 12:06:16 2021 +0000

    Added Fltk (LGPL) license.

This widget is similar to Fl_Pack and supports either one row or one
column of widgets but has some more features. Test and demo programs
are included:

  test/flex_login.cxx: simple "login window" demo program
  test/flex_demo.cxx:  slightly more complex demo program

The original demo programs can still be compiled and built with
the new widget provided you '#include <FL/Fl_Flex.H>'.
Backwards compatible methods are included (except debug()).

The original widget has been modified to match FLTK standards and
enhanced in several ways, including:

- support box frames
- add HORIZONTAL and VERTICAL enum values (as in Fl_Pack)
- add horizontal() method (as in Fl_Pack)
- use type() rather than internal 'direction' variable
- add standard widget constructor (x, y, w, h, label)
- add margin and gap accessors rather than hard coding constants
- improve test and demo programs
- add documentation
- replace <vector> with array as required by FLTK CMP
- rename camelCase method names, keeping old names for compatibility:
  - change 'setSize(Fl_Widget*, int)'   to 'set_size(Fl_Widget*, int)'
  - change 'bool isSetSize(Fl_Widget*)' to 'int set_size(Fl_Widget*)'
- remove debug() method
- add a way to "unset" fixed size: set_size(Fl_Widget *, 0)
- add layout() method to force recalculation of children
- unify resizeRow() and resizeCol() methods to avoid code duplication
- improve widget size calculation.
2022-08-01 15:33:20 +02:00
ManoloFLTK
c411778e71 Add support of macOS Ventura 13.0 2022-07-30 12:13:05 +02:00
Albrecht Schlosser
29a3062b02 Improve check mark visibility for small sizes
This looks a little better and more like FLTK 1.3
2022-07-27 20:20:33 +02:00
Albrecht Schlosser
15bbfeb975 Configure/make: update dependencies 2022-07-27 19:45:08 +02:00
ManoloFLTK
3932ed261f Fix for issue #471 for the Wayland platform. 2022-07-27 17:52:58 +02:00
ManoloFLTK
f77c4737bb Fix for issue #471: Different Fl_Window::resize() behavior between v1.3.8 and v1.4 2022-07-27 16:53:43 +02:00
ManoloFLTK
d6832f210c Fl_Sys_Menu_Bar: allow use of more keys as menu shortcuts. 2022-07-27 00:52:09 +02:00
ManoloFLTK
f582e06224 Fl_Sys_Menu_Bar: allow use of escape and tab as menu shortcuts. 2022-07-26 19:01:41 +02:00
ManoloFLTK
2241bab478 Remove useless variables and preprocessor directives. 2022-07-26 18:58:44 +02:00
ManoloFLTK
f61dfc3c05 Remove redundant Fl_Xlib_Graphics_Driver::scale_bitmap_for_PostScript() under USE_XFT=1. 2022-07-26 10:01:51 +02:00
ManoloFLTK
acc9075a58 Remove redundant Fl_PostScript_Graphics_Driver::color() under Pango. 2022-07-26 09:39:30 +02:00
ManoloFLTK
d026f29993 Document the class hierarchy below Fl_System_Driver. 2022-07-26 09:29:49 +02:00
ManoloFLTK
237c0c1393 Add Pango version check for Fl_PostScript_Graphics_Driver 2022-07-24 18:03:11 +02:00
ManoloFLTK
cd60ea17b0 Add Fl_PostScript_File_Device::set_current() and end_current() members. 2022-07-24 08:46:52 +02:00
ManoloFLTK
2cedae1ece Fl_Cairo_Graphics_Driver: simpler handling of font size. 2022-07-21 13:57:02 +02:00
ManoloFLTK
4ae905cc9d Change prototype of virtual Fl_Graphics_Driver::pango_font_description(). 2022-07-20 08:37:21 +02:00
ManoloFLTK
536c32ee99 Fl_Cairo_Graphics_Driver: simpler way to construct the PangoLayout object. 2022-07-18 22:58:02 +02:00
Albrecht Schlosser
3560ff450f Remove empty line 2022-07-16 16:52:26 +02:00
Leon Winter
9d27ec8754 beep: use maximum loudness for error, otherwise system-default 2022-07-16 16:52:26 +02:00
Leon Winter
3dd8c314d6 Let beep use system default settings
Please note that the parameter 'percent' of XBell(3).
Given the value of 100, the system defined setting
(normally specified via xset) is ignored and the
percent of 100 is used instead. When calling the
bell from fltk with FL_BEEP_DEFAULT I would expect
to get the default (system specified) percent setting.
2022-07-16 16:52:26 +02:00
ManoloFLTK
2327ede74c Add explanatory comments about text handling by Fl_Cairo_Graphics_Driver. 2022-07-11 12:11:04 +02:00
Albrecht Schlosser
79ce6547ce Fix non-xft build referencing fl_get_font_xfld() (#461)
This is only one part of issue 461 which describes two build errors
on "Raspberry Pi4 bullseye". It turned out that the build didn't
find Xft.
2022-07-09 22:05:46 +02:00
ManoloFLTK
f097141662 Move member q_width from class Fl_Font_Descriptor to Fl_Quartz_Font_Descriptor.
That's because this member is used only in Fl_Quartz_Font_Descriptor.
2022-07-06 10:18:40 +02:00
ManoloFLTK
c6659c9a29 Fl_Cairo_Graphics_Driver: fix issues in string width computations when scaling applies.
The implemented approach is to create and use the pango_layout_ object only relatively
to an unscaled cairo context. With this, the pixel width of a drawn string equals
the sum of the widths of its characters.
2022-07-06 10:05:00 +02:00
Albrecht Schlosser
3c6b34bb70 Fix a potential memory leak, see issue #457 2022-07-05 18:49:15 +02:00
ManoloFLTK
d096ec48d0 Documentation: add missing mentions of the Wayland platform. 2022-07-05 10:13:31 +02:00
ManoloFLTK
844d3d6d5c Wayland platform.: complete support of gl_start/gl_finish. 2022-07-04 11:44:03 +02:00
ManoloFLTK
8a2559e1af Wayland platform: add missing initialisation to Fl_Wayland_Gl_Window_Driver::gl_start(). 2022-07-02 17:41:45 +02:00
ManoloFLTK
16ecd6b821 Wayland platform: more accurate initial state of window buffer. 2022-07-02 16:44:17 +02:00
ManoloFLTK
c7493496c9 Wayland platform: add support of FL_ALPHA for GL windows. 2022-07-02 16:43:27 +02:00
Albrecht Schlosser
ef72df0dc7 Improve X11 selection data transfer (INCR) protocol (#451)
This improves reading large selections and fixes one more bug.

- Fix reading selection data size of clients that don't send the size.
  These clients don't respect the ICCCM. Using a default size instead.

- Improve memory allocation by pre-allocating at least 4 MB and
  extending by 4 MB to reduce the number of realloc() operations.
  This may waste up to 4 MB buffer space but this is only an issue
  if clients don't send an appropriate size (see above).

- Limit the initial allocation to 200 MB in case clients send higher
  values. This is very unlikely and might be a bug in these clients.
  Default extension as above would apply anyway.

- Add more comments and optional debug statements (commented out).

Note: reading selections (clipboard) from other clients using the
  INCR protocol is implemented but the opposite (providing large
  selections (clipboard) by using the INCR protocol is not.
2022-07-02 15:44:46 +02:00
Albrecht Schlosser
c555629162 Fix "Segfault if using very large selections" (issue #451)
- Fix reading the size (aka "lower bound") of selection data.

- Use Fl::fatal() to terminate the process if memory for the selection
  (aka clipboard) data can't be allocated. This should rarely
  happen but if it does this is at least a "clean" exit and does
  not overwrite arbitrary data waiting for later errors that are
  hard to debug (as the old code would have done).

  Todo: find a better solution because this can be caused by
  another faulty process (the "selection owner"). It would be good
  if we could ignore the transfer rather than killing the process.

- Continue processing the INCR protocol if another "unexpected" event
  is received. Such events can definitely happen but the current code
  can't deal with this because other events might cause recursions.
  Hence such events are currently ignored.

  Example: pressing and holding ctrl/v would trigger another clipboard
  transfer while we're still processing one.

Todo: maybe process "other" events correctly while processing the INCR
  protocol. The current processing is done inside a function and would
  need to call fl_handle() with potential recursions, hence this would
  likely need major refactoring.
2022-07-01 17:39:41 +02:00
Albrecht Schlosser
42c27da735 Reformat, remove unnecessary code, add comments 2022-07-01 17:39:41 +02:00
ManoloFLTK
50d26b09a8 Wayland platform: add support of gl_start() / gl_finish(). 2022-07-01 09:10:32 +02:00
Michael Tolly
65e5cd27cc kdialog native picker: properly handle spaces in filenames
Asks kdialog to use newlines for multiple files instead
2022-06-29 18:49:51 +02:00
ManoloFLTK
47f0d63f19 Wayland platform: send FL_ENTER/LEAVE/MOVE events to top-level windows only. 2022-06-29 18:02:11 +02:00
ManoloFLTK
a025a46cac Wayland platform: add support of FL_LEAVE event. 2022-06-28 18:47:15 +02:00
ManoloFLTK
8dd7ab1922 Fix for issue #450 : Fl_Counter slips into infinite loop (V2).
Need to poll only for the file descriptor associated to the wayland display.
2022-06-27 19:40:08 +02:00
ManoloFLTK
c2185f31b9 Remove unused code controlled by the FLTK_CONSOLIDATE_MOTION preprocessor variable. 2022-06-27 14:55:40 +02:00
ManoloFLTK
2a5c2322f1 Fix for issue #454 : crash in Fl::get_font_name(). 2022-06-27 13:25:35 +02:00
ZJUGKC
2f52b54a08
Fix unicode support in scandir_win32.c by using GetFileAttributesW (#455)
* Fix unicode support in scandir_win32.c by using GetFileAttributesW

* Remove the useless comments in scandir_win32.c
2022-06-25 20:53:19 +02:00
ManoloFLTK
feb0d918fb Remove arbitrary maximum length of font name. 2022-06-25 20:00:17 +02:00
ManoloFLTK
fb7469c85c Fix for issue #452: Fl::get_font_name failure on OS-X. 2022-06-24 19:50:47 +02:00
ManoloFLTK
617dc2ce12 Fix for issue #450: Fl_Counter slips into infinite loop.
This issue revealed that the macOS and Wayland platform processed events slightly differently
from other platforms.
Under X11 and Windows, Fl::wait() processes one event if one is present, and also all other events
present in the event queue immediately after the processing of that event.
Under macOS and Wayland, Fl::wait() processes one event if one is present and returns.

This commits makes the macOS and Wayland platforms behave as other platforms.
2022-06-23 19:12:35 +02:00
ManoloFLTK
e698af035a Fix issue #427 - 2nd part
Fix Fl_Tiled_Image made from scaled source image.
Fix Fl_Shared_Image::update() to allow scaled source image.
Correct handling of default value (-1) of 3rd argument of 3-argument Fl_BMP_Image constructor.
2022-06-20 12:49:38 +02:00
ManoloFLTK
02870242ee Move input method support to Fl_Screen_Driver from Fl_Graphics_Driver 2022-06-19 10:23:24 +02:00
Albrecht Schlosser
232743c3a5 Fix Fl_Counter event handling (#450, part 2)
This fixes some issues of the repeat timeout of Fl_Counter. It could
happen that the widget missed the FL_RELEASE event, for instance if
a modal window like fl_message() was opened in the callback but there
could be other reasons as well. See issue #450 for more info.
2022-06-17 17:16:59 +02:00
Albrecht Schlosser
f3bf231cc0 Improve reliability of timeout handling (#450, part 1)
This commit prevents "timer loops" without intermediate event handling
if callback handling takes longer than the timer delay of repeating
timers.

For more details see GitHub issue #450.
2022-06-17 17:05:10 +02:00
ManoloFLTK
d8eb1f9ca4 Minor simplification of Fl_Wayland_Graphics_Driver::cairo_init. 2022-06-13 16:37:25 +02:00
ManoloFLTK
394298aff4 Add explanatory comment about WL_SHM_FORMAT_ARGB8888 and CAIRO_FORMAT_ARGB32. 2022-06-13 16:19:43 +02:00
ManoloFLTK
2fc2c5b562 Fix support of transparent windows by wayland platform. 2022-06-13 10:41:24 +02:00
MatthiasWM
1b1e8a4d46 Issue #141: fl_filename_absolute bugs fixed for MSWindows. 2022-06-12 14:53:06 +02:00
Matthias Melcher
995e3118a6 Local isdirsep() must not be visible to the outside. 2022-06-12 14:14:23 +02:00
Matthias Melcher
e6ca751e92 Issue #142: fl_filename_absolute correctly handles trailing "..". 2022-06-12 14:07:16 +02:00
ManoloFLTK
c6516673ee New member Fl_Cairo_Graphics_Driver::bitmap_to_pattern() to avoid code duplication. 2022-06-12 09:04:22 +02:00
ManoloFLTK
78ca44ccca Fix Fl_Wayland_Window_Driver::shape_bitmap_(Fl_Image*). 2022-06-11 15:19:37 +02:00
Matthias Melcher
79be9fb792 Reverting previous fix.
It introduced a new issue. Sorry!
2022-06-11 12:36:59 +02:00
Matthias Melcher
9c89a7f320 Handling trailing ".." in fl_filename_absolute. 2022-06-11 12:34:47 +02:00
Matthias Melcher
bcbdf5546f Some docs for printing asynchronously. 2022-06-11 11:57:15 +02:00
ManoloFLTK
23d0a631cf Remove useless code from Fl_Wayland_Window_Driver::{un}map()
That code was useless because map() and unmap() get only called for subwindows.
2022-06-11 09:36:16 +02:00
ManoloFLTK
6add57d4bd Wayland under FreeBSD: use package evdev-proto which brings linux/input.h 2022-06-06 15:32:54 +02:00
ManoloFLTK
a7de80d6f7 Fix for issue #447: dotted focus rectangles are a little "ragged" with some scales. 2022-06-04 11:44:21 +02:00
ManoloFLTK
b78035624d Fl_Cairo_Graphics_Driver: fix GUI rescaling.
The solution to avoid blurred graphics when the GUI is scaled is to turn off
cairo antialiasing when drawing horizontal and vertical lines and rectangles.
2022-05-27 08:58:35 +02:00
ManoloFLTK
7fcd4b73d7 Wayland platform: more accurate procedure to map a GL (sub)window. 2022-05-25 18:37:43 +02:00
ManoloFLTK
a118732f7c Improve rectf() and push_clip() under cairo and GUI scaling. 2022-05-25 16:05:36 +02:00
ManoloFLTK
6c6a80b90e Add detailed explanations in Fl_Wayland_Gl_Window_Driver::make_current_before() 2022-05-24 11:07:04 +02:00
ManoloFLTK
d971f6f59f Simpler, compositor-independent procedure to map GL window under Wayland. 2022-05-23 19:45:12 +02:00
Albrecht Schlosser
40569e53c7 Fix MinGW build with shared libs (#445)
Add missing lib 'gdiplus' to shared libs.
2022-05-22 00:07:40 +02:00
ManoloFLTK
ad96df9e93 Wayland under FreeBSD: detect <GL/glu.h> and fix LIBDECOR_PLUGIN_DIR. 2022-05-21 07:55:03 +02:00
ManoloFLTK
de91a92e67 Wayland under FreeBSD: add support for CMake-based builds. 2022-05-20 17:46:05 +02:00
ManoloFLTK
9c9ce66d05 Wayland under FreeBSD: fix support of GL windows. 2022-05-20 15:22:28 +02:00
ManoloFLTK
1c37c29e2d Avoid "hides overloaded function" warning messages. 2022-05-19 10:28:39 +02:00
ManoloFLTK
905a90f660 Make Fl_Wayland_Screen_Driver::close_display() close the GL connection if any. 2022-05-17 12:11:18 +02:00
ManoloFLTK
f01216f167 Weston support: handle click on titlebar. 2022-05-17 10:40:09 +02:00
ManoloFLTK
b2bd12ae5e Fix Fl_Wayland_Window_Driver::wait_for_expose() - still WIP. 2022-05-16 19:22:57 +02:00
ManoloFLTK
2c52ebe210 Improve Fl_Wayland_Window_Driver::wait_for_expose(). 2022-05-16 16:34:59 +02:00
ManoloFLTK
5747c3eed9 Fix Fl_Wayland_Window_Driver::take_focus() required for recent Wayland versions. 2022-05-16 11:25:28 +02:00
ManoloFLTK
6efdcb1e6f Simpler code to map GL windows under Wayland. 2022-05-15 09:04:47 +02:00
ManoloFLTK
b6dae138d4 Restore top-level GL window under Weston. 2022-05-14 17:21:25 +02:00
ManoloFLTK
7fe6f4cf1d Have FLTK follow the Wayland surface holding keyboard focus. 2022-05-13 09:13:11 +02:00
ManoloFLTK
879f5f0770 Slightly simplify Fl_Wayland_Window_Driver::use_border(). 2022-05-10 17:26:37 +02:00
ManoloFLTK
9d054a169b Remove typos. 2022-05-10 17:00:32 +02:00
ManoloFLTK
a638d90e00 Add missing closing parenthesis. 2022-05-10 16:56:25 +02:00
ManoloFLTK
b6e0122926 Fix for issue #441: Some minor regressions with borderless+fullscreen (Wayland). 2022-05-10 16:52:46 +02:00
ManoloFLTK
ad27da578a Avoid glpuzzle crash when resizing while puzzle is spinning - cont'd. 2022-05-09 19:56:17 +02:00
ManoloFLTK
48ca0e3b50 Avoid glpuzzle crash when resizing while puzzle is spinning. 2022-05-09 14:07:02 +02:00
ManoloFLTK
20c50312fc Cleaner declaration of public function fl_wl_cairo(). 2022-05-09 09:41:50 +02:00
ManoloFLTK
c02fba6bb9 Slight simplification of Fl_Wayland_Graphics_Driver::create_shm_buffer(). 2022-05-07 18:08:07 +02:00
ManoloFLTK
1d64b78554 Change protection levels in classes Fl_XXX_Gl_Window_Driver 2022-05-07 15:16:29 +02:00
ManoloFLTK
d4472e5e53 Remove useless typedef declaration. 2022-05-06 09:52:52 +02:00
ManoloFLTK
217120c281 Move struct shape_data_type inside Fl_XXX_Window_Driver. 2022-05-05 18:57:07 +02:00
ManoloFLTK
170a9d8e1f Approximate result of pango_font_metrics_get_height() for Pango < 1.44 2022-05-05 12:20:24 +02:00
ManoloFLTK
af91083a7f Fl_Cairo_Graphics_Driver: simpler code with early calls to cairo_surface_destroy().
Add also replacement for pango_font_metrics_get_height() which requires Pango 1.44
2022-05-05 11:34:10 +02:00
ManoloFLTK
e02ee7d5f1 Add check against null pointer occurrence reported with Gmsh (Issue #434). 2022-05-05 10:21:50 +02:00
ManoloFLTK
7d5d2af547 Cairo: reduce vertical offset for text position needed by Fl_Text_Display. 2022-05-04 08:28:12 +02:00
ManoloFLTK
a6e2940792 Remove one-pixel top and left borders of shaped windows. 2022-05-03 11:49:38 +02:00
ManoloFLTK
9082c44cd0 Issue #438 : Wayland: Text drawing different from Xft version - cont'd. 2022-05-02 19:40:43 +02:00
ManoloFLTK
049cef17f7 Set line height as computed by Pango. 2022-05-02 12:41:20 +02:00
ManoloFLTK
85cf597765 Keep the PangoLayout member private in class Fl_Cairo_Graphics_Driver. 2022-05-02 11:05:23 +02:00
ManoloFLTK
71dedbc886 Issue #438 : Wayland: Text drawing different from Xft version - cont'd. 2022-05-01 09:44:20 +02:00
ManoloFLTK
cf1c8b1125 Fix for issue #438 : Wayland: Text drawing different from Xft version - cont'd. 2022-04-30 16:37:28 +02:00
ManoloFLTK
5341f0e45e Add explanatory comments about text size and vertical position. 2022-04-29 16:34:47 +02:00
ManoloFLTK
1b513d3f00 Fix for issue #438 : Wayland: Textdrawing different from Xft version. 2022-04-29 13:10:40 +02:00
ManoloFLTK
a8da590d11 Fix for issue #434 : Segfaults on macOS. 2022-04-29 09:38:27 +02:00
ManoloFLTK
4618fa9053 Create member function Fl_Cairo_Graphics_Driver::set_cairo()- cont'd. 2022-04-25 10:29:57 +02:00
ManoloFLTK
8808d11578 Create member function Fl_Cairo_Graphics_Driver::set_cairo(). 2022-04-25 10:22:23 +02:00
ManoloFLTK
285e8e843a Create Fl_Cairo_Graphics_Driver::handle_dummy_cairo(cairo_t *cr). 2022-04-23 16:15:05 +02:00
ManoloFLTK
8e21120f75 Restore use of CMake OPTION_USE_SYSTEM_LIBDECOR 2022-04-22 08:00:00 +02:00
ManoloFLTK
9367bb5108 Avoid code duplication using os_create_anonymous_file() from libdecor. 2022-04-21 07:38:51 +02:00
ManoloFLTK
24885b3810 Minor improvement of get_prog_name(). 2022-04-21 07:06:18 +02:00
Albrecht Schlosser
804c48515d Improve docs of Fl_Image and related classes (#431)
Clarifications as discussed since April 15, 2022 07:00 UTC (see GitHub
issue #431).
2022-04-20 17:26:33 +02:00
ManoloFLTK
c1d0783df9 Document how to set window icons under Wayland - cont'd. 2022-04-15 11:05:19 +02:00
ManoloFLTK
827f91110b Remove unimplemented window icon-related member functions and variables.
Wayland uses .desktop files to set window icons.
2022-04-15 08:31:32 +02:00
Albrecht Schlosser
8bcfb88679 Fix documentation typo
Fix missing opening quote. (#431 cont'd)
2022-04-15 02:16:06 +02:00
Albrecht Schlosser
114dbc9c81 Clarify documentation of Fl_Image::copy() and more (#431)
- emphasize that Fl_Image::copy(W, H) creates an image with
  w() == data_w() == W and h() == data_h() == H
- clarify some more docs of Fl_Image methods (ensure that data_w()
  and data_h() are used where appropriate rather than w() and h()
- improve wording, examples, and formatting of related docs.

Closes #431
2022-04-15 02:01:33 +02:00
ManoloFLTK
d83d89679b Fix for issue #429 : Segfault with Ctrl+/- with current git version 2022-04-14 11:07:56 +02:00
Albrecht Schlosser
10537b7143 Make Fl_Image::copy() 'const', including all derived classes
Copying an image does not (and must not) change the original object,
hence copy() should always be 'const'.

This is *necessary* if the given Fl_Image object is 'const'.
2022-04-13 16:50:30 +02:00
ManoloFLTK
e25758582e Fix for issue #427 - continued. 2022-04-13 09:30:31 +02:00
ManoloFLTK
bfae813c4e Fix for issue #427: Problems with data_w, data_h, w, h of Fl_Image. 2022-04-12 15:06:21 +02:00
ManoloFLTK
fad867a5d3 Modify test/cairo_test.cxx to show roles of OPTION_CAIRO and OPTION_CAIROEXT.
Also make clear that these options require, for now, Fl_Double_Window to work cross-platform.
2022-04-12 09:20:34 +02:00
ManoloFLTK
0d59e32b84 Fix for issue #426 - cont'd. 2022-04-10 15:09:25 +02:00
ManoloFLTK
223bf6309b Fix for issue #426: "configure --enable-cairoext" flips display upside down 2022-04-08 16:22:22 +02:00
Albrecht Schlosser
385f0d5b4d Rename remaining FLTK_USE_CAIRO to FLTK_HAVE_CAIROEXT
Thanks to Manolo for finding this.
2022-04-07 15:14:30 +02:00
ManoloFLTK
21428bad10 Undo most of f6a93eb that was a bad move. 2022-04-07 11:31:12 +02:00
Albrecht Schlosser
dacf243889 Fix build w/o Xft 2022-04-07 03:40:43 +02:00
ManoloFLTK
d1bffee04a Remove useless instructions. 2022-04-06 13:25:54 +02:00
ManoloFLTK
f6a93eb060 Remove warnings: comparison of integer expressions of different signedness [-Wsign-compare] 2022-04-06 13:25:17 +02:00
ManoloFLTK
6a30f63fe4 Fix for "Fl_Native_File_Chooser_GTK does not respect PREVIEW option" in fltk.general. 2022-04-05 09:19:26 +02:00
ManoloFLTK
2ee27e39db Catch also Fl_Posix_System_Driver after rename stat -> flstat in Fl_System_Driver 2022-04-04 08:30:43 +02:00
Albrecht Schlosser
9a7af11108 Silence compiler warnings [-Wunused-but-set-variable] 2022-04-03 22:30:59 +02:00
Albrecht Schlosser
717a7d266b Remove '#include <sys/stat.h>' from FL/platform_types.h
- Add this include statement only where needed.
- Rename Fl_System_Driver::stat() to flstat().

This fixes an issue when using some (!) MinGW 64-bit build systems
that obviously '#define stat _stat64' or similar. This would
result in compiler problems if 'stat()' is a member function of
Fl_System_Driver.
2022-04-03 22:01:41 +02:00
ManoloFLTK
9aba7c9db0 Fl_Wayland_Window_Driver::scroll() when GUI scaling >= 2. 2022-04-01 14:52:47 +02:00
ManoloFLTK
d992a12403 Merge remote-tracking branch 'refs/remotes/origin/master' 2022-04-01 14:36:41 +02:00
ManoloFLTK
a53efd73d7 Fix regression introduced with d9a6ec8 visible in test/scroll. 2022-04-01 14:36:33 +02:00
Albrecht Schlosser
e91d65cd2f Fix whitespace errors (no code changes) 2022-03-31 16:00:11 +02:00
ManoloFLTK
d9a6ec88e4 Add support of Fl_Region to the Cairo graphics driver
and remove it from the Wayland graphics driver.
2022-03-31 10:36:01 +02:00
Albrecht Schlosser
df4503ea2c Export fl_cmap to be able to build shared FLTK libraries 2022-03-27 17:13:16 +02:00
Albrecht Schlosser
b037472649 Move src/cmap.cxx to util/cmap.cxx (utilities folder)
Regenerated src/fl_cmap.h with less spaces, updated copyright year.
Only whitespace and comments are changed in this file.

Note that src/cmap.cxx is not compiled to build the FLTK libs,
it's only used to generate src/fl_cmap.h.
2022-03-27 17:05:55 +02:00
ManoloFLTK
dc8c4b5676 Wayland: replace public fl_event_time by static wld_event_time. 2022-03-27 09:20:30 +02:00
YX
e9b1c2fed0 Add const to Fl_Image::fail() (PR #415) 2022-03-26 17:55:13 +01:00
Albrecht Schlosser
fc250a3aa2 Update documentation and dependencies 2022-03-25 17:27:46 +01:00
ManoloFLTK
0ab3ca7cf6 Remove documentation of non-existant function return values. 2022-03-25 16:54:53 +01:00
ManoloFLTK
427e4dbc7a Remove platform-dependent type Fl_Bitmask (not in documented public API). 2022-03-24 10:00:01 +01:00
ManoloFLTK
70f61a63f4 Merge remote-tracking branch 'refs/remotes/origin/master' 2022-03-24 06:30:33 +01:00
ManoloFLTK
194164054b Remove useless virtual member function overrides. 2022-03-24 06:30:27 +01:00
ian.macarthur
29c6d6c679 Remove vsscanf_l() call from Win32 driver (it appears to be a BSD-ism and unsupported by the MS tools) and rename several clocale specific methods from "name" to "vname" since they take a va_list not a variable list of arguments. 2022-03-23 19:46:35 +01:00
ManoloFLTK
54ecae9bda Create struct wld_window *Fl_Wayland_Window_Driver::wld_window to replace eventually fl_window. 2022-03-23 14:11:49 +01:00
ManoloFLTK
2d71a95b5d Wayland: replace global fl_display by function struct wl_display *fl_wl_display(). 2022-03-23 11:37:25 +01:00
ManoloFLTK
26a78c4992 Fix for issue #419: Wayland: scale/resize issue. 2022-03-23 07:57:17 +01:00
Albrecht Schlosser
f1b00c6637 Fix driver definitions of vsnprintf() and vsscanf()
These two functions are fully defined in the platform specific driver
methods, there's no need to define them in the base class.

This quick fix returns 0 from the base class method. The main reason
was to avoid a compiler error of MSVC 2010 and earlier, i.e. before
MSVC 2012.

Todo: int Fl_WinAPI_System_Driver::clocale_sscanf() needs to be fixed
because '_vsscanf_l()' (with lower case 'L' for 'locale') does not
exist in MSVC 2010 and earlier. It is not clear yet in which version
it was added - current MS docs show it in MSVC 2015 and later.
2022-03-21 17:16:14 +01:00
Albrecht Schlosser
fa84b58cd5 Fix silly MSVC 2010 parser warnings
Code like "void copy(const char */*stuff*/, ...)" would issue the
warning "'*/' seen outside comment" which is formally true but ...

These warnings don't appear with newer MS compilers, but I fixed them
anyway.
2022-03-21 17:03:13 +01:00
Albrecht Schlosser
35c212ef3b Fix MSVC 2010 warning: using 'this' in initializer list
This is a legitimate warning although it probably didn't do any harm.
2022-03-21 16:57:32 +01:00
Albrecht Schlosser
9e16f3439e Fix MSVC 2010 warning/error: declare variables in C early
... before other code gets executed in a block. The warning or errors
generated were MORE than confusing.
2022-03-21 16:55:07 +01:00
ManoloFLTK
ff4cf80891 Avoid using same name (p) for distinct members of derived classes - cont'd. 2022-03-21 16:10:34 +01:00
ManoloFLTK
d87b62ea69 Avoid using same name (p) for distinct members of derived classes. 2022-03-21 15:56:50 +01:00
ManoloFLTK
bf5b902180 Rename member Fl_Graphics_Driver::p to xpoint to avoid shadowing. 2022-03-21 14:39:00 +01:00
ManoloFLTK
49dae86edf Fix for issue #418 : some warnings about unused functions. 2022-03-21 12:12:07 +01:00
ManoloFLTK
a9412b41bb Issue #359 RFE: access the MacOS windowid . 2022-03-21 11:41:51 +01:00
ManoloFLTK
7e76929aff Fix for issue #416: Fl_Xlib_Graphics_Driver_font_xft.cxx has a libasan error. 2022-03-21 10:31:09 +01:00
ManoloFLTK
19439e8e0a Remove unnecessary constructors. 2022-03-21 10:01:45 +01:00
Albrecht Schlosser
4bcd5c467b Improve documentation of Fl_Image::copy()
Mention the new Fl_Image::release() method to delete all types of
images.
2022-03-20 15:52:08 +01:00
Albrecht Schlosser
7758020edb Fix Fl_Tiled_Image::copy(int W, int H)
Remove false "optimization" that would return the same pointer
if the requested width and height are the same.

Note: copy() must always return a new image (this is the expected
behavior of copy). Otherwise deleting one of the objects (either
the source or the copy) would delete the other one as well.
2022-03-20 15:35:04 +01:00
ManoloFLTK
791fc7d6eb Update description of Fl_Graphics_Driver class hierarchy. 2022-03-20 15:10:43 +01:00
ManoloFLTK
a2229c8b6b Fix typo in comment. 2022-03-20 14:07:33 +01:00
ManoloFLTK
bc606cce57 Simpler updateTrackingAreas method of class FLView is enough. 2022-03-20 14:06:30 +01:00
ManoloFLTK
f5628aa66d Fix issue #413: Commit 29d9e31 creates memory handling problem under macOS. 2022-03-20 08:09:34 +01:00
Albrecht Schlosser
733ffed630 Add missing initialization parts of Fl_SVG_Image 2022-03-19 15:34:45 +01:00
ManoloFLTK
5884d37ee8 Restore default YES value for FLWindow releasedWhenClosed property. 2022-03-19 08:42:09 +01:00
ManoloFLTK
aa955812f9 Fix for issue #411: send FL_ENTER / FL_LEAVE events to Fl_Window objects. 2022-03-18 14:26:44 +01:00
ManoloFLTK
ace51a4b8d More detailed doc of how to change the current drawing surface. 2022-03-18 06:52:06 +01:00
ManoloFLTK
618eb8f105 Improve handling of custom cursor by Wayland platform. 2022-03-17 11:08:02 +01:00
ManoloFLTK
b12ec7d75e Add necessary #include <FL/platform.H> directive. 2022-03-16 08:06:42 +01:00
ManoloFLTK
8bfb0aa75c Remove typo in Fl_Wayland_Image_Surface_Driver.H 2022-03-16 08:04:44 +01:00
ManoloFLTK
6235abf79d Add member variable Window Fl_Wayland_Image_Surface_Driver::pre_window. 2022-03-16 08:00:51 +01:00
ManoloFLTK
576fbcde53 Fix for issue fltk#410 - continued. 2022-03-15 15:58:48 +01:00
ManoloFLTK
7f5ce4d7a9 Fix for issue #410 2022-03-15 05:57:19 +01:00
ManoloFLTK
2d833a54fd Move initialisation of X11 and Wayland built-in font names to fl_???_platform_init.cxx 2022-03-14 15:28:38 +01:00
ManoloFLTK
2500899b09 Remove unnecessary #include directives 2022-03-13 09:44:37 +01:00
ManoloFLTK
b549cfaaea Separate platform init functions from platform-specific driver files 2022-03-13 08:56:35 +01:00
ManoloFLTK
e8461a6191 Document Fl::set_font(Fl_Font, const char *) with platform-specific details. 2022-03-10 19:06:46 +01:00
ManoloFLTK
5b26d2b203 Fix for issue #404 about Fl::get_key(int). 2022-03-10 16:06:04 +01:00
ManoloFLTK
9d869d73c1 Begin documenting the Wayland platform, new in FLTK version 1.4 2022-03-10 15:05:26 +01:00
ManoloFLTK
9e4c7aa77c Restore building for X11 platform + Pango (issue #405). 2022-03-10 09:09:29 +01:00
ManoloFLTK
1e68edddc0 Add safety check in Fl_Wayland_Window_Driver::label(). 2022-03-09 17:04:59 +01:00
Greg Ercolano
6d3071b859 Small doc improvements for Fl_Tree_Item. 2022-03-09 06:12:42 -08:00
ManoloFLTK
f97fbffa7b Move all font stuff to Fl_Cairo_Graphics_Driver from Fl_Wayland_Graphics_Driver. 2022-03-09 08:46:49 +01:00
ManoloFLTK
e3f67b8e56 Add necessary call to Fl_Cairo_Graphics_Driver::needs_commit_tag(). 2022-03-09 08:33:49 +01:00
Albrecht Schlosser
af9cffc2db Fix doxygen warning 2022-03-08 16:00:46 +01:00
ManoloFLTK
5b1d1e2470 Some reformatting and fix else reach in Fl_Cairo_Graphics_Driver::transformed_vertex. 2022-03-08 09:30:32 +01:00
Albrecht Schlosser
53b40f4138 Improve documentation on Fl_Menu_Item's and related methods (#332)
See discussion on GitHub Issue #332.

Summary: don't change FLTK code but document what to do and not to do.
2022-03-07 18:28:32 +01:00
ManoloFLTK
9e7f49f56f Add missing member initialisation in Fl_Cairo_Graphics_Driver constructor. 2022-03-07 08:34:49 +01:00
ManoloFLTK
f8db18597a Complete class Fl_Cairo_Graphics_Driver using Fl_Wayland_Graphics_Driver 2022-03-06 19:47:06 +01:00
Albrecht Schlosser
272bc2560c Fix MSVC compiler warning
warning C4099: 'Fl_Menu_Item': type name first seen using 'struct'
  now seen using 'class'
2022-03-05 16:05:31 +01:00
Albrecht Schlosser
5ebb76050b Fix size_range() - continued (issue #392)
- fix window size of GL windows as reported for test/glpuzzle.cxx
- fix window not resizing on ctrl/+/- (X11 only)

Unfortunately the previous commit "optimized" a necessary X11 message
away. This is now fixed.

Fixes #392.
2022-03-05 15:50:49 +01:00
ManoloFLTK
c2c7795614 Rename Fl_wayland.cxx to fl_wayland_clipboard_dnd.cxx 2022-03-05 12:28:21 +01:00