From eeb9267e6ea1a8481bef36186e36c02189924f3b Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 13 Mar 2023 10:38:28 +0100 Subject: Wayland: add support for multiple high or low DPI displays --- documentation/src/wayland.dox | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'documentation/src') diff --git a/documentation/src/wayland.dox b/documentation/src/wayland.dox index 1e38611ef..c99dac9b1 100644 --- a/documentation/src/wayland.dox +++ b/documentation/src/wayland.dox @@ -451,19 +451,19 @@ displaying dragged text in a DnD operation. \section wayland-display Displays and HighDPI support -Wayland uses the concept of seat of type struct wl_seat which encompasses displays, -a keyboard, a mouse, and a trackpad. It might be possible for an app to deal with several seats, -but that has not been tested with FLTK yet. Each seat may contain one or more displays, which -Wayland calls outputs, of type struct wl_output. - -As written above, function \c registry_handle_global() discovers available seats at start-up time. -This function also associates a 'listener' to each display -by calling function \c wl_output_add_listener(). This 'listener' is an array of callback function +Wayland uses the concept of seat of type struct wl_seat which encompasses displays, +a keyboard, a mouse, and a trackpad. Although Wayland may be in principle able to deal with several +seats, FLTK's Wayland platform is conceived for one seat only. That seat may contain one or more +displays, which Wayland calls outputs, of type struct wl_output. + +As written above, function \c registry_handle_global() discovers the available seat at start-up time. +This function also associates a listener to each display connected to the system +by calling function \c wl_output_add_listener(). This listener is an array of callback function pointers among which one (\c output_mode) runs when the display is resized and another (\c output_scale) when the Wayland scale factor (see below) is changed. FLTK defines type struct Fl_Wayland_Screen_Driver::output (see \ref output) to store display size and scaling information. -One such record is created for each display. FLTK uses 2 distinct scaling parameters under Wayland: +One such record is created for each display. FLTK uses 2 distinct scaling parameters for each display: - int wld_scale;. This member variable of struct Fl_Wayland_Screen_Driver::output typically equals 1 for standard, and 2 for HighDPI displays. Its value is set by the Wayland compositor for each display with the effect -- cgit v1.2.3