From 1d0e63ea784f0d8e3835f3517d47c11ecf79a79b Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 3 Apr 2023 15:25:19 +0200 Subject: Improve member function Fl_Wayland_Screen_Driver::surface_to_window() Rename it to Fl_Wayland_Window_Driver::surface_to_window() and avoid loop over all mapped FLTK windows that used to be performed. --- documentation/src/wayland.dox | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'documentation') diff --git a/documentation/src/wayland.dox b/documentation/src/wayland.dox index 78fb12619..4c9fbfd94 100644 --- a/documentation/src/wayland.dox +++ b/documentation/src/wayland.dox @@ -126,9 +126,9 @@ necessary glue C source file from a given XML file. For example, for FLTK to use protocol, these commands are run at build time to generate a .c file that will be compiled into libfltk and a header file that FLTK code will include: \code -set(PROTOCOLS /usr/share/wayland-protocols) -wayland-scanner private-code ${PROTOCOLS}/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.c -wayland-scanner client-header ${PROTOCOLS}/stable/xdg-shell/xdg-shell.xml xdg-shell-client-protocol.h +PROTOCOLS=`pkg-config --variable=pkgdatadir wayland-protocols` +wayland-scanner private-code $PROTOCOLS/stable/xdg-shell/xdg-shell.xml xdg-shell-protocol.c +wayland-scanner client-header $PROTOCOLS/stable/xdg-shell/xdg-shell.xml xdg-shell-client-protocol.h \endcode Similar operations are performed for FLTK to use protocols xdg decoration unstable v1 and text input unstable v3. @@ -232,7 +232,7 @@ Wayland defines objects called surfaces of type struct wl_surface. A Wa receive user input, and define a local coordinate system". Buffers allow the client app to draw to surfaces (see below). FLTK makes no use of local coordinate systems. FLTK creates a surface with function \c wl_compositor_create_surface() each time an Fl_Window is show()'n. -Static member function Fl_Wayland_Screen_Driver::surface_to_window(struct wl_surface *) +Static member function Fl_Wayland_Window_Driver::surface_to_window(struct wl_surface *) gives the \c Fl_Window* corresponding to the surface given in argument. Function \c wl_surface_add_listener() associates the surface with a listener which allows to associate each surface with the display where it is mapped. FLTK recognizes 4 distinct -- cgit v1.2.3