Opened 4 months ago

Closed 2 months ago

#20666 closed enhancement (fixed)

fltk-1.4.1 (Breaks ABI. Try if tigervnc can lives with it.)

Reported by: Bruce Dubbs Owned by: Bruce Dubbs
Priority: normal Milestone: 12.3
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description (last modified by Bruce Dubbs)

New minor version.

Currently this package is referenced in:

alsa-tools (optional to build hdspconf and hdspmixer)
pinentry (optional)
tigervnc (required)

Change History (20)

comment:1 by Bruce Dubbs, 4 months ago

CHANGES IN FLTK 1.3.10 - RELEASED: Nov 16 2024

FLTK 1.3.10 is a maintenance release with some fixes and enhancements.

Highlights in this release:

This release includes some new inline methods that were added in 1.4.0 to prepare user code for the migration to 1.4.0. These are mainly methods with new names that replace methods which are deprecated in FLTK 1.4 and would issue compiler warnings if used in 1.4.0. Using the new method names in user code makes it possible to write code that is compatible with both 1.3.10 and 1.4.x w/o compiler warnings.

CMake: The new file 'FLTKConfig.cmake' (generated by CMake builds only) can be used in user CMake projects to find the correct FLTK config file for the required FLTK version (1.3 or 1.4).

Details:

  • Backport support for mouse buttons 4 + 5
  • Add missing FL_EXPORT of class Fl_XFont_On_Demand
  • Fix a bunch of compiler warnings (backported from 'master')
  • Bump version numbers from 1.3.9 to 1.3.10
  • Update bundled libraries
  • Fl_File_Chooser: set insert position to end of string ... after filename "expansion" with current directory
  • Remove unused function after commit f323257cbc59c9ae
  • CMake: improve FLTKConfig.cmake[.in]
  • CMake: add FLTKConfigVersion.cmake
  • Implement missing Fl_Single_Window::make_current()
  • Keep sending FL_DRAG until all mouse buttons are released
  • Fix doxygen warning
  • Finish "Backport support for mouse buttons 4+5"
  • Fix "FLTK on NetBSD very slow on X11 with Unicode locale"
  • macOS: let fullscreen windows have access to the system menubar
  • Simplify creation of OpenGL contexts under X11 platform
  • Crash in macOS when switching fullscreen window between displays
  • macOS: fix "Fl_Window::cursor(...) does not work reliably on some platforms"
  • X11: fix test/gl_overlay stale overlay rendering
  • Fix Fl_Shared_Image refcount
  • Fix crash in Fl_Preferences for deformed group name
  • Fix shared image handling in file chooser
  • Fix OpenGL context caching on macOS
  • macOS: Fix color component mixup in gl_draw text rendering

comment:2 by Bruce Dubbs, 4 months ago

Resolution: fixed
Status: newclosed

Fixed at commits

b487b8d6a3 Update to postgresql-17.1.
498b77bf2d Update to fltk-1.3.10.

comment:3 by Bruce Dubbs, 4 months ago

Resolution: fixed
Status: closedreopened
Summary: fltk-1.3.10fltk-1.4.0

Now version 1.4.0.

comment:4 by Bruce Dubbs, 4 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: reopenednew

comment:5 by Bruce Dubbs, 4 months ago

Status: newassigned

comment:6 by Bruce Dubbs, 4 months ago

Changes in FLTK 1.4.0 Released: Nov 17 2024

Bug Fixes:

  • Windows: Fix "fullscreen_off does not correctly preserve window size" (#1116)
  • Fix rounding issues with Fl_RGB_Image::draw() + Fl_Copy_Surface (#1120, #1124)
  • Windows: Fix "Keyboard shortcut (alt+letter) does not work in input widget" (#1122)
  • macOS: Fix Alt-modifier handling in Fl_Shorcut_Button
  • Windows: Fix flicker/animation when transitioning from fullscreen to maximized
  • Wayland: protect against rounding errors in copy_region()

Documentation and other Improvements:

  • Revert gtk+ specific "chevron style" arrow drawing (#1117)
  • Update CREDITS.txt
  • Improve 'test/fltk-versions' demo program

Changes in FLTK 1.4.0 RC3 Released: Nov 08 2024

Bug Fixes:

  • Windows: "Fullscreen doesn't always pick the correct display" (#1097)
  • macOS: "Mixing native fullscreen button with Fl_Window::fullscreen()" (#1098)
  • Wayland: Issue in maximization of a borderless window (#1099)
  • macOS: "Merge All Windows" fails if focused window is borderless (#1100)
  • macOS: Fl_Window::fullscreen() doesn't work for unfocused tabbed window (#1101)
  • Fl_Tile resizing for "sudden" size changes (#1102)
  • macOS: Weak linking error with latest SDK 15 (#1103, #1105)
  • X11: test/checkers drawing artifacts when window is scaled (#1109)
  • X11: test/curve "points" mode not drawn correctly (#1110)
  • X11: test/gl_overlay stale overlay rendering (#1111)
  • fl_draw_image() with horizontal flip reads out of bounds (#1112)
  • macOS: Very minor high DPI rounding issue with fl_rect (#1113)
  • macOS: Prevent changing window border if window is fullscreen or maximized
  • Mac/XQuartz: Restore Fl_Widget_Surface::draw_decorated_window()

Other Improvements:

  • Improve member function Fl_Wayland_Graphics_Driver::copy_offscreen()
  • Make Fl_Window::flush() public for consistency with subclasses
  • Improve UI layout of 'fltk-options'
  • Fix compiler warnings
  • Improve and clarify documentation, including README.CMake.txt

Changes in FLTK 1.4.0 RC2 Released: Oct 27 2024

  • Add range check to Fl_Group::child(int)
  • Fix Windows Ctrl character handling for scaling shortcuts
  • Fluid: Add missing code for Fl_Grid and Fl_Flex live preview (#1092)
  • Enhance documentation
  • Mention HighDPI support in 'ANNOUNCEMENT'
  • Update CHANGES.txt

Changes in FLTK 1.4.0 RC1 Released: Oct 20 2024

General Information about this Release

  • FLTK 1.4.0 is based on FLTK 1.3.4 (released Nov 15 2016). Later updates have partially been backported to 1.3.x releases, see CHANGES_1.3.txt for more information.
  • CMake is the primary supported build system in FLTK 1.4.0 and later. CMake can be used to generate Makefiles, IDE project files, and files for several other build systems by using different "generators" provided by CMake (for instance Ninja, CodeBlocks, Eclipse, KDevelop3, Xcode, etc.). FLTK uses "Modern CMake" since release 1.4.0 which simplifies user project build systems significantly. See README.CMake.txt and documentation chapter "Migrating Code from FLTK 1.3 to 1.4" for more information.
  • autoconf/configure is still supported by the FLTK Team for backwards compatibility with older systems that lack CMake support. Support of autoconf/configure will be dropped in FLTK 1.5.0.
  • FLTK 1.4 introduces a new platform, Wayland, available for recent Linux distributions and FreeBSD. For details see README.Wayland.txt.

New Features and Extensions

  • fltk-config allows to compile multiple files with more compiler and linker options given on the commandline.
  • fl_contrast() functionality has been improved, adding a new contrast calculation method based on human contrast perception. This new function is now the default but the old, less accurate, contrast function can be chosen as an option.
  • Timeout handling has been unified across platforms (#379), see documentation in chapter "Migrating Code from FLTK 1.3 to 1.4".
  • New Fl::remove_next_timeout(...) to remove only one timeout (#992).
  • New fltk-options executable, improved Fl::option documentation.
  • New function Fl_Window::get_size_range() (#981).
  • New FL_DEPRECATED macro to flag deprecated functions and methods.
  • Enable suppression of "deprecated" warnings by macro FL_NO_DEPRECATE.
  • New animated GIF images support (Fl_Anim_GIF_Image class) (#375).
  • GIF and BMP files can now be "read" from memory, i.e. they can be included in source code (use their new constructors).
  • New Fl_Scheme_Choice widget can be used to easily switch schemes in apps.
  • A new scheme named "oxy" has been added (STR 2675, STR 3477).
  • Drawing "Arrows" has been unified in all core widgets.
  • Drawing "Radio Buttons" has been unified in all core widgets.
  • Drawing "Check Marks" has been unified in all core widgets.
  • New methods Fl_Group::on_insert/on_remove/on_move (#527) can be used in derived classes to detect addition or removal of children.
  • FLTK widgets can now be used in OpenGL 3 windows.
  • The new convenience function Fl::hide_all_windows() can be used to close all open windows, for instance to exit the running program.
  • Windows platform: optionally use GDI+ to antialias oblique lines and curves.
  • Windows: The new function Fl::args_to_utf8() can be used to convert "wide character" commandline arguments to UTF-8.
  • X11 and Wayland platforms: Added support of HiDPI displays. FLTK apps detect the current display scaling factor and use it to scale all windows.
  • MSWindows platform: FLTK applications detect the display scaling factor and automatically scale their GUI accordingly. This effectively renders WIN32 FLTK apps "per-monitor DPI-aware" whereas they were "DPI-unaware" before.
  • Dynamical GUI rescaling: it is possible on all platforms to rescale all FLTK windows mapped to a screen by typing ctrl-'+' (enlarge), ctrl-'-' (shrink) or ctrl-'0' (back to starting scaling factor value). Under macOS, the corresponding keystrokes are cmd-'+', cmd-'-', cmd-'0'. The resulting GUI scaling factor (e.g., 170 %) transiently appears in a yellow popup window. Use new Fl::option() item OPTION_SHOW_SCALING to turn on/off these popups. Windows moved between screens adjust to the scaling factor of their screen. This supports desktops mixing screens with distinct resolutions. In addition, use environment variable FLTK_SCALING_FACTOR to further adjust the starting scaling factor of all FLTK apps.
  • Note: On some platforms and with some international keyboard layouts you may need to set Fl::option(OPTION_SIMPLE_ZOOM_SHORTCUT) to be able to use one or more of the scaling shortcuts above with or without pressing the Shift key. The new executable fltk-options can be used to set this option either system wide or for a single user.
  • New horizontal and vertical label margins.
  • Fluid got a lot of UI and functional improvements and the Fluid docs have been reworked and put in an own "Fluid User Manual" (HTML and PDF). Fluid supports the new Fl_Flex and Fl_Grid widgets. For more details please see the manual.
  • New Fl_Grid class to layout multiple columns and rows of widgets.
  • New Fl_Flex class to layout one row or one column of widgets.
  • New Fl_Terminal widget supporting Unicode/UTF-8, ANSI/xterm escape codes with full RGB color control.
  • New Fl_Copy_Surface to copy drawings to the clipboard.
  • New Fl::keyboard_screen_scaling(0) call stops recognition of ctrl/+/-/0/ keystrokes as scaling all windows of a screen.
  • New member function Fl_Image::scale(int width, int height) to set the drawing size of an image independently from its data size. The same function was previously available only for class Fl_Shared_Image and with FL_ABI_VERSION >= 10304. New member functions Fl_Image::data_w() and Fl_Image::data_h() give the width and height of the image data.
  • New member functions Fl_Widget::bind_image(Fl_Image *img) and Fl_Widget::bind_deimage(Fl_Image *img) to bind an image to a widget, that is, to set an image to be used as part of the widget label and also to be deleted when the widget is deleted.
  • New member function Fl_Menu_::menu_end() to ensure that the menu is fully constructed in its final location after dynamic modifications. This is called automatically before the menu is shown.
  • New Fl_SVG_Image class: gives support of scalable vector graphics images to FLTK using the nanosvg software.
  • New Fl_ICO_Image class to read Windows .ico icon files.
  • New classes Fl_PDF_File_Surface, Fl_SVG_File_Surface and Fl_EPS_File_Surface to save any FLTK graphics to PDF, SVG or EPS files, respectively.
  • New member functions Fl_Window::maximize(), Fl_Window::un_maximize() and Fl_Window::maximize_active() to programmatically manage window maximization.
  • Fl_Button now supports a compact flag that visually groups closely set buttons into keypads.
  • Fl_Tabs widget now supports close buttons for individual tabs.
  • Fl_Tabs widget now supports four different modes for handling an overflowing number of tabs.
  • Mouse buttons 4 + 5 (aka "side buttons") are now supported (#1076, #1068). These are typically used as "back" and "forward" functions, e.g. in browsers.
  • Windows platform: added support for using a manifest to set the application's level of DPI awareness (issue #309).
  • class Fl_Native_File_Chooser on the X11/Wayland platform relies on external commands zenity (PR #599), or kdialog (issue #278), or on the GTK library to construct file dialogs. New "Preview" switch added to the GTK dialog. The libgtk-based dialog uses in priority the file chooser dialog of GTK version 3 when available on the running platform, and falls back to version 2 when V3 is not available. In contrast, GTK version 2 was used in priority by FLTK 1.3.x. New FL::option() item OPTION_FNFC_USES_ZENITY to turn on/off use of zenity-based file dialogs.
  • The undocumented feature FLTK_CONSOLIDATE_MOTION is now OFF on X11 and removed on macOS. In FLTK 1.3 this feature has been ON on X11. The macro can now be set on the compiler commandline and can be used to reduce the number of mouse move events sent to the application but it may be unreliable. Recommendation: let it switched OFF unless you really need it.
  • New function fl_capture_window() to capture the content of a rectangular zone of a mapped window and return it as an Fl_RGB_Image. It improves with HighDPI displays what can be done with fl_read_image().
  • The Windows platform now draws oblique and curved lines in antialiased form. The new function void fl_antialias(int state); allows to turn off or on such antialiased drawing. The new function int fl_antialias(); returns whether line and curve drawing is currently antialiased.
  • The border radius of "rounded" box types can be limited and the shadow width of "shadow" box types can be configured (issue #130). See Fl::box_border_radius_max() and Fl::box_shadow_width().
  • New fl_putenv() is a cross-platform putenv() wrapper (see docs).
  • New public variable Fl_Image::register_images_done allows an app. to detect whether function fl_register_images() has been called.
  • Fix Fl::add_timeout() under Linux (STR 3516).
  • Fix early timeouts in Fl_Clock seen in some environments (STR 3516).
  • Fl_Printer::begin_job() uses by default the Gnome print dialog on the X11 platform when the GTK library is available at run-time. That can be turned off with Fl::option(OPTION_PRINTER_USES_GTK, false).
  • New member functions Fl_Paged_Device::begin_job() and begin_page() replace start_job() and start_page(). The start_... names are maintained for API compatibility.
  • Fl_Gl_Window can now contain FLTK widgets that are drawn on top of the OpenGL scene.
  • OpenGL draws text using textures on all platforms, when the necessary hardware support is present (a backup mechanism is available in absence of this support). Thus, all text drawable in Fl_Window's can be drawn in Fl_Gl_Window's (STR#3450).
  • New member function Fl_Menu_Bar::play_menu(const char *title) to programmatically open a menu of a menubar.
  • New member functions Fl::program_should_quit(void), and Fl::program_should_quit(int) to support detection by the library of a request to terminate cleanly the program.
  • MacOS platform: the processing of the application menu's "Quit" item has been changed. With FLTK 1.3.x, the application terminated when all windows were closed even before Fl::run() or Fl::wait() could return. With FLTK 1.4, Fl::run() returns so the app follows its normal termination path.
  • FLTK apps on the MacOS platform contain automatically a Window menu, which, under MacOS ≥ 10.12, allows to group/ungroup windows in tabbed form. The new Fl_Sys_Menu_Bar::window_menu_style() function allows to specify various styles for the Window menu, even not to create it.
  • New function: int fl_open_ext(const char* fname, int binary, int oflags, ...) to control the opening of files in binary/text mode in a cross-platform way.
  • Fix for issue #247 : loading SVG image with BOM.
  • Fl_Text_Selection got a new method length() and returns 0 in length() and in all offsets (start(), end(), position()) if no text is selected (selected() == false). The behavior in FLTK 1.3 and earlier versions (returning undefined values if !selected()) was confusing.
  • New method Fl_Group::bounds() replaces Fl_Group::sizes() which is now deprecated. Fl_Group::bounds() uses the new class Fl_Rect that contains widget coordinates and sizes x(), y(), w(), and h() (STR #3385). Documentation for bounds() and its internal structure was added.
  • New method shadow(int) allows to disable the shadows of the hands of Fl_Clock, Fl_Clock_Output, and derived widgets.
  • New method Fl_Tabs::tab_align() allows to set alignment of tab labels, particularly to support icons on tab labels (STR #3076).
  • Added Fl_Surface_Device::push_current(new_surface) and Fl_Surface_Device::pop_current() to set/unset the current surface receiving graphics commands.
  • New macros for easy function and method callbacks with multiple type safe arguments (see FL_METHOD_CALLBACK_1 etc.) .
  • The value box size of Fl_Value_Slider is now user settable (STR 3222).
  • The new header file FL/fl_config.h replaces FL/abi-version.h and includes some more build configuration settings. This file is always included automatically.
  • Nested (aka recursive) common dialogs are now possible (STR 3242, #282).

Removed Features

  • X11 platform: Support of XDBE, the configure option '--enable-xdbe' and the CMake option 'OPTION_USE_XDBE' have been removed because XDBE was unreliable and rarely supported by X servers. Double buffering support in Fl_Double_Window is not affected.
  • Hardware "overlay" support has been removed. This was rarely implemented and should not affect user code because overlay support is simulated.

New Configuration Options (ABI Version)

  • Add --without-fluid configure option (#725) if Fluid is not needed.
  • X11 platform: Added support for drawing text with the pango library which allows to draw most scripts supported by Unicode, including CJK and right-to-left scripts. FLTK now outputs PostScript that draws those scripts in vectorial form. The corresponding CMake option is FLTK_USE_PANGO. The corresponding configure option is --enable-pango. This option is OFF by default when the build is only for X11 and ON when Wayland support is built as well.
  • Configure option --enable-wayland allows to build the FLTK library for the new Wayland platform while remaining compatible with X11. The corresponding CMake option is FLTK_BACKEND_WAYLAND. This option is ON by default.
  • Configure options --enable-wayland --disable-x11 used together allow to build FLTK for the Wayland backend only (no x11 backend). Under CMake, the equivalent option is to set FLTK_BACKEND_WAYLAND=ON and FLTK_BACKEND_X11=OFF.
  • The new configure option --disable-gdiplus removes the possibility to draw antialiased lines and curves on the Windows platform. The corresponding CMake option is FLTK_GRAPHICS_GDIPLUS.
  • The library can be built without support for reading SVG images or writing graphics in SVG format using the --disable-svg configure option or turning off FLTK_OPTION_SVG in CMake.
  • The library can be built without support for PostScript, thus reducing its size, using the --disable-print configure option or turning off FLTK_OPTION_PRINT_SUPPORT in CMake. That makes classes Fl_PostScript_File_Device, Fl_EPS_File_Surface and Fl_Printer (under X11 platform only) ineffective.
  • FLTK's ABI version can be configured with 'configure' and CMake. See documentation in README.abi-version.txt.
  • Building the 'Forms' compatibility library 'fltk_forms' is now optional, default is ON. This may be turned to OFF in a later FLTK release.
  • CMake/Windows/MSVC: New option to select MSVC Runtime when linking apps.

Bundled libraries

  • Bundled image libraries have been upgraded to newer versions. For details see documentation/src/bundled-libs.dox or online docs.

1.4.0 ABI FEATURES

  • None. FLTK 1.4.0 has a new ABI, breaking 1.3.x ABI.

comment:7 by Bruce Dubbs, 4 months ago

Milestone: 12.399-Waiting
Summary: fltk-1.4.0fltk-1.4.0 (Breaks ABI. Wait until something needs it.)

comment:8 by Bruce Dubbs, 4 months ago

Owner: changed from Bruce Dubbs to blfs-book
Status: assignednew

comment:9 by Bruce Dubbs, 4 months ago

Description: modified (diff)

in reply to:  description comment:10 by Xi Ruoyao, 4 months ago

Replying to Bruce Dubbs:

pinentry (optional)

Also for pinentry it's not very useful. The priority of pinentry-fltk is even lower than pinentry-curses, so it won't be used at all unless the user manually recreates /usr/bin/pinentry symlink to points to pinentry-fltk.

comment:11 by Xi Ruoyao, 2 months ago

I guess if tigervnc builds fine with it we can just update. The ABI breakage only means you need to rebuild the packages depending on it to use the new library, it does not necessarily mean you cannot build the packages depending on it anymore (sometimes it means that, but sometimes not).

comment:12 by Xi Ruoyao, 2 months ago

Milestone: 99-Waiting12.3
Summary: fltk-1.4.0 (Breaks ABI. Wait until something needs it.)fltk-1.4.0 (Breaks ABI. Try if tigervnc can lives with it.)

comment:13 by Bruce Dubbs, 2 months ago

Summary: fltk-1.4.0 (Breaks ABI. Try if tigervnc can lives with it.)fltk-1.4.1 (Breaks ABI. Try if tigervnc can lives with it.)

Release notes for version 1.4.1 are at https://github.com/fltk/fltk/releases

Download url: https://github.com/fltk/fltk/releases/download/release-1.4.1/fltk-1.4.1-source.tar.gz

There is a separate tarball for docs: fltk-1.4.1-docs-html.tar.gz Unsure what fltk-1.4.1-fluid-docs-html.tar.gz is.

We may want to add -disable-fluid (do not know why we need that). Others: --enable-pango --enable-usecairo (both seem to be default)

Build at -j4:

16.2 Elapsed Time -  fltk-1.4.1
 
md5sum : 203eed9e14a7bd6ff0373c0f3f32ef07  /usr/src/fltk/fltk-1.4.1-source.tar.gz
9052 /usr/src/fltk/fltk-1.4.1-source.tar.gz SIZE (8.839 MB)
182044 kilobytes BUILD SIZE (177.777 MB)
SBU=.188

Programs: fltk-config  fltk-options  fluid
Libraries: libfltk.so libfltk_forms.so libfltk_gl.so libfltk_images.so
Directories: /usr/share/doc/fltk-1.4.1 /usr/include/FL

There also also 4 static libraries. I could not find a way to turn those off. There are also /usr/share/man/cat{1,3} that should be removed.

comment:14 by Bruce Dubbs, 2 months ago

More info:

fluid - the fast light user‐interface designer

comment:15 by Bruce Dubbs, 2 months ago

I did get an error when building tigervnc:

Building C object vncviewer/CMakeFiles/vncviewer.dir/xkb_to_qnum.c.o
/build/tigervnc/tigervnc-1.14.1/vncviewer/DesktopWindow.cxx: In constructor ‘DesktopWindow::DesktopWindow(int, int, const char*, const rfb::PixelFormat&, CConn*)’:
/build/tigervnc/tigervnc-1.14.1/vncviewer/DesktopWindow.cxx:211:15: error: cannot convert ‘Fl_Window::maximize’ from type ‘void (Fl_Window::)()’ to type ‘bool’
  211 |   if (maximize) {
      |               ^
Last edited 2 months ago by Bruce Dubbs (previous) (diff)

comment:16 by Bruce Dubbs, 2 months ago

I found this: https://github.com/TigerVNC/tigervnc/issues/1897

"I'm afraid FLTK 1.4 cannot be used when building TigerVNC. Please install FLTK 1.3 instead and it should build fine."

OTOH there is also this: TigerVNC 1.15.0 beta Pre-release 5 days ago

I looked at the current offending code and the problem still seems to exist.

comment:17 by Douglas R. Reno, 2 months ago

I looked at the open PRs on Github and found this: https://github.com/TigerVNC/tigervnc/pull/1887

I haven't tested to see if it builds though. Note that we also will need to check hdspconf and hdspmixer in alsa-tools, though if this is the only thing holding the update back we may consider just removing those utilities like we did for GTK+-2.

comment:18 by Bruce Dubbs, 2 months ago

I got tigervnc to build with FLTK-1.4.1 with one simple sed:

sed -i "s/maximize)/::&/" vncviewer/DesktopWindow.cxx

It tests OK.

Looking at alsa-tools, both hdspconf and hdspmixer build. I can run both, but I do not have the hardware to actually test those programs. I did check that both linked in the fltk library and --help does the right thing.

For pinentry, a change to configure is needed:

sed -i "/FLTK 1/s/3/4/" configure

pinentry-fltk does link in the proper library and --help works, but I don't know how to properly test the program. ======

If the above is satisfactory, I can update to FLTK-1.4.1.

comment:19 by Bruce Dubbs, 2 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: newassigned

comment:20 by Bruce Dubbs, 2 months ago

Resolution: fixed
Status: assignedclosed

Fixed at commit 96837787a9.

Note: See TracTickets for help on using tickets.