Windows and macOS send pen events first. If they are not handled by the app, the synthesize them into mouse events and send them again. A bit like FLTK sending FL_KEYBOARD events, and resending FL_SHORTCUT if the keyboard event was not used. Events on the titlebar are never sent to the app, but the results are (calling Fl_Window::resize(), for example). The titlebar is handled by the OS. However, apps can request drawing areas in the title bar for additional functionality to gain some usable space.
Wayland itself does not handle titlebars and resize areas at all (if I understood that correctly). Wayland just provides surfaces. What they do is up to the application. Some GUI libraries generate their own title bars and resize areas, so if your GUI library does not care about pen and touch, you can't move, resize, or close such an app on your desktop that way. Users *must* use the mouse. FLTK doesn't draw its own decoration, but uses a copy of libdecor (similar to a copy of libpng, libjpeg, and libz). So libdecor is CSD, Client Side Decoration.
An alternative is SSD, server side decoration, using for example the xdg-decoration protocol. In its infinite wisdom, Wayland does not *require* as SSD, so there are compositors out there that don't *have* SSD, because of course there are.
So one alternative to libdecor would be to request xdc-decoration, and if that fails, draw our own title bar using FLTK widgets. If I understood this correctly.