summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-09-17 07:28:05 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-09-17 07:28:05 +0200
commit5fa994fcfc88312d15d6a8d6efbffcdd800c5c40 (patch)
tree08bff01eb0196b53d1a04a44813aac1907f905dc
parent5e15c345127556c9fdb91e6798ddfac000ac43e1 (diff)
Wayland.dox: rephrase how FLTK and Wayland interact
-rw-r--r--documentation/src/wayland.dox15
1 files changed, 9 insertions, 6 deletions
diff --git a/documentation/src/wayland.dox b/documentation/src/wayland.dox
index 2ac3c5c6b..d01190ad9 100644
--- a/documentation/src/wayland.dox
+++ b/documentation/src/wayland.dox
@@ -88,13 +88,16 @@ of all displays of the system (see \ref wayland-output "Fl_Wayland_Screen_Driver
}
\endcode
-Overall, and ignoring for now OpenGL usage, FLTK interacts with Wayland in 3 ways :
-- Calling C functions of the \c libwayland-client.so,
-\c libwayland-cursor.so and \c libxkbcommon.so shared libraries and of the bundled libdecor library.
+Overall, and ignoring for now OpenGL usage, FLTK interacts with Wayland as follows :
+- When opening the display: FLTK calls \c Fl::add_fd() in \c FL_READ mode to associate
+a callback function to the socket connecting the client and the compositor.
+- Client to compositor: FLTK calls C functions of the \c libwayland-client.so,
+\c libwayland-cursor.so and \c libxkbcommon.so shared libraries and of the bundled
+libdecor library. These send suitable messages to the compositor writing to the socket.
The names of these functions begin with \c wl_, \c xkb_ or \c libdecor_.
-- Being called by these libraries via the 'listener' mechanism.
-- Listening, after a call to \c Fl::add_fd(), to data sent by the compositor to the client via
-the socket.
+- Compositor to client: the callback function runs when there are data to read in the
+socket; it calls \c wl_display_dispatch() which interprets the read data and calls
+corresponding listeners.
The core protocol defines also a number of mostly opaque structures whose names begin with \c wl_.
The names of symbols and types defined by the other protocols FLTK uses begin with \c xdg_,