Any ideas on how to get the surface for the titlebar?

2 views
Skip to first unread message

Gonzalo Garramuño

unread,
Jun 22, 2026, 3:43:42 PM (10 hours ago) Jun 22
to fltkc...@googlegroups.com
This is a question for ManoloFLTK and perhaps something he can transmit
to the libdecor folks as an API request(s).

Currently, libdecor seems not allow getting the (sub)surface used for
the title bar.  The Wayland Pen driver receives tool_cb_down (ie a
"touch" with the pen) for that subsurface, not a libdecor_frame or the
actual FLTK surface.  Only when the touch happens on a Fl_Widget do we
get the surface for it and all is peachy in that case.
Mapping the subsurface to a libdecor_frame therefore cannot be done.
Matt's approach was that we iterate through all windows and check
whether they are GTK decorated and assign their libdecor_frame for them
and also raise them (show them to the top of the pile). But that
approach breaks when there are multiple decorated windows, as FLTK can
deliver them in any order.  Also, there's no highlighting of the buttons
as when the mouse moves over the close/maximize/etc. buttons.
Independently from Matt's hard work, I took 3 approachs:

- First one was to make libdecor aware to tablet-v2.  That approach
failed as there can only be one tablet_manager_v2 per application.
- I then similar approach to Matt but with the cairo-plugin approach.  I
did two attempts: one with the an approach similar to Matt's which ran
into the same issues.
- As final attempt, I modified libdecor code to create a function like
libdecor_inject_* where the highlighting would work but still had the
issue of how to pick the appropriate libdecor_frame.

Reply all
Reply to author
Forward
0 new messages