[fltk/fltk] Extend FLTK with a cross-platform way to undock and dock widget groups (PR #1603)
ManoloFLTK
02:07 Sep 07
This PR corresponds to discussion #1257 with the same title.
This PR extends FLTK with class Fl_Dockable_Group, derived from Fl_Group, and defined as: a group that can be detached from its parent, dragged with the mouse to some destination in the GUI, and docked there.
Docking widget groups in a Wayland client application poses a difficult problem because Wayland completely hides the position of a window in a display which prevents the detection of whether a window is moved above a given part of the application's GUI. Two major Wayland compositors, Gnome's Mutter and KDE's Kwin, have recently decided to implement a new Wayland protocol, XDG toplevel drag, designed specifically to support widget docking. This PR solves the docking problem under Wayland using this new protocol, and has a backup mechanism based on Wayland's drag-and-drop feature to approximate widget docking in absence of the XDG toplevel drag protocol to support early versions of Wayland.
Class Fl_Dockable_Group hides all differences between how platforms handle undocking and docking.
A test program, dock_undock, is added to provide usage examples. Command make dock_undock
after cmake configuration and generation of the FLTK fork will build this program.
You can view, comment on, or merge this pull request online at:
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <fltk/fltk/pull/1603@github.com>
Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.