|
Blender V5.3
|
#include "GHOST_WindowWayland.hh"#include "GHOST_SystemWayland.hh"#include "GHOST_Types.hh"#include "GHOST_WaylandUtils.hh"#include "GHOST_WindowManager.hh"#include "GHOST_utildefines.hh"#include "GHOST_Event.hh"#include "GHOST_ContextNone.hh"#include <wayland-client-protocol.h>#include <algorithm>#include <color-management-v1-client-protocol.h>#include <fractional-scale-v1-client-protocol.h>#include <viewporter-client-protocol.h>#include <xdg-activation-v1-client-protocol.h>#include <xdg-decoration-unstable-v1-client-protocol.h>#include <xdg-shell-client-protocol.h>#include <atomic>#include <optional>#include <cstring>#include <sys/mman.h>#include "CLG_log.h"Go to the source code of this file.
Classes | |
| struct | GWL_XDG_Decor_Window |
| struct | GWL_WindowScaleParams |
| struct | GWL_WindowFrame |
| struct | GWL_Window |
| struct | GWL_ImageDescriptionWait |
Functions | |
| static void | gwl_xdg_decor_window_destroy (GWL_XDG_Decor_Window *decor) |
Rounding Utilities | |
| static void | gwl_round_int_by (int *value_p, const int round_value) |
| static void | gwl_round_int2_by (int value_p[2], const int round_value) |
| static bool | gwl_round_int_test (const int value, const int round_value) |
Window-Viewport/Wayland to/from Scale Conversion | |
| wl_fixed_t | gwl_window_scale_wl_fixed_to (const GWL_WindowScaleParams &scale_params, wl_fixed_t value) |
| wl_fixed_t | gwl_window_scale_wl_fixed_from (const GWL_WindowScaleParams &scale_params, wl_fixed_t value) |
| int | gwl_window_scale_int_to (const GWL_WindowScaleParams &scale_params, const int value) |
| int | gwl_window_scale_int_from (const GWL_WindowScaleParams &scale_params, const int value) |
| static uint | divide_ceil_uint (const uint x, const uint d) |
| int | gwl_window_scale_buffer_size_to (const GWL_WindowScaleParams &scale_params, const int logical_size, int *r_buffer_scale) |
Internal #GWL_WindowCursorCustomShape | |
| static void | gwl_window_cursor_custom_free (GHOST_CursorGenerator *cg) |
| static void | gwl_window_cursor_custom_clear (GHOST_CursorGenerator **cg) |
| static GHOST_TSuccess | gwl_window_cursor_custom_load (const GHOST_CursorGenerator &cg, GHOST_SystemWayland *system) |
| static GHOST_TSuccess | gwl_window_cursor_shape_refresh (GHOST_TStandardCursor shape, const GHOST_CursorGenerator *cg, GHOST_SystemWayland *system) |
Internal #GWL_Window Viewport Setup/Tear-down | |
A viewport is needed to implement fractional scale, as the outputs scale may change at runtime, support creating & clearing the viewport as needed. | |
| static int | gwl_window_fractional_to_viewport (const GWL_WindowFrame &frame, const int value) |
| static int | gwl_window_fractional_from_viewport (const GWL_WindowFrame &frame, const int value) |
| static int | gwl_window_fractional_to_viewport_round (const GWL_WindowFrame &frame, const int value) |
| static int | gwl_window_fractional_from_viewport_round (const GWL_WindowFrame &frame, const int value) |
| static bool | gwl_window_viewport_set (GWL_Window *win, bool *r_surface_needs_commit, bool *r_surface_needs_buffer_scale) |
| static bool | gwl_window_viewport_unset (GWL_Window *win, bool *r_surface_needs_commit, bool *r_surface_needs_buffer_scale) |
| static bool | gwl_window_viewport_size_update (GWL_Window *win) |
Internal #GWL_Window Activation | |
| static void | gwl_window_activate (GWL_Window *win) |
Internal #GWL_Window Pending Actions | |
| static void | gwl_window_frame_pending_fractional_scale_set_notest (GWL_Window *win, bool *r_surface_needs_commit, bool *r_surface_needs_buffer_scale) |
| static void | gwl_window_frame_pending_fractional_scale_set (GWL_Window *win, bool *r_surface_needs_commit, bool *r_surface_needs_buffer_scale) |
| static void | gwl_window_frame_pending_size_set (GWL_Window *win, bool *r_surface_needs_commit, bool *r_surface_needs_resize_for_backend, bool *r_surface_needs_buffer_scale) |
| static void | gwl_window_frame_update_from_pending (GWL_Window *win) |
| static void | gwl_window_pending_actions_tag (GWL_Window *win, enum eGWL_PendingWindowActions type) |
| static void | gwl_window_pending_actions_handle (GWL_Window *win) |
| static void | gwl_window_frame_update_from_pending_no_lock (GWL_Window *win) |
Internal Utilities | |
| static int | output_scale_cmp (const GWL_Output *output_a, const GWL_Output *output_b) |
| static int | outputs_max_scale_or_default (const std::span< GWL_Output *const > outputs, const int32_t scale_default, int *r_scale_fractional) |
| static int | outputs_uniform_scale_or_default (const std::span< GWL_Output *const > outputs, const int32_t scale_default, int *r_scale_fractional) |
Public WAYLAND Direct Data Access | |
Expose some members via methods. | |
| void | gwl_xdg_window_icon_free (GWL_XDG_WindowIcon &icon) |
Variables | |
| static constexpr size_t | base_dpi = 96 |
Internal #GWL_Window | |
| #define | PENDING_NUM (PENDING_WINDOW_CURSOR_SHAPE_REFRESH + 1) |
| enum | eGWL_PendingWindowActions { PENDING_WINDOW_FRAME_CONFIGURE = 0 , PENDING_OUTPUT_SCALE_UPDATE , PENDING_OUTPUT_SCALE_UPDATE_DEFERRED , PENDING_WINDOW_SURFACE_COMMIT , PENDING_WINDOW_CURSOR_SHAPE_REFRESH } |
| static void | gwl_window_resize_for_backend (GWL_Window *win, const int32_t size[2]) |
| static void | gwl_window_title_set (GWL_Window *win, const char *title) |
| static GHOST_TWindowState | gwl_window_state_get (const GWL_Window *win) |
| static bool | gwl_window_state_set_for_xdg (xdg_toplevel *toplevel, const GHOST_TWindowState state, const GHOST_TWindowState state_current) |
| static bool | gwl_window_state_set (GWL_Window *win, const GHOST_TWindowState state) |
Listener (Surface), #wl_surface_listener | |
| #define | LOG (&LOG_WL_XDG_TOPLEVEL) |
| #define | LOG (&LOG_WL_FRACTIONAL_SCALE) |
| #define | LOG (&LOG_WL_IMAGE_DESCRIPTION) |
| #define | LOG (&LOG_WL_XDG_TOPLEVEL_DECORATION) |
| #define | LOG (&LOG_WL_XDG_SURFACE) |
| #define | LOG (&LOG_WL_SURFACE) |
| static CLG_LogRef | LOG_WL_SURFACE = {"ghost.wl.handle.surface"} |
| static const wl_surface_listener | wl_surface_listener |
| static void | surface_handle_enter (void *data, wl_surface *, wl_output *wl_output) |
| static void | surface_handle_leave (void *data, wl_surface *, wl_output *wl_output) |
Listener (XDG Top Level), #xdg_toplevel_listener | |
| static CLG_LogRef | LOG_WL_XDG_TOPLEVEL = {"ghost.wl.handle.xdg_toplevel"} |
| static const xdg_toplevel_listener | xdg_toplevel_listener |
| static void | xdg_toplevel_handle_configure (void *data, xdg_toplevel *, const int32_t width, const int32_t height, wl_array *states) |
| static void | xdg_toplevel_handle_close (void *data, xdg_toplevel *) |
| static void | xdg_toplevel_handle_configure_bounds (void *data, xdg_toplevel *, const int32_t width, const int32_t height) |
| static void | xdg_toplevel_handle_wm_capabilities (void *data, xdg_toplevel *, wl_array *capabilities) |
Listener (XDG Activation), #xdg_activation_v1_interface | |
Used by #gwl_window_activate. | |
| static const xdg_activation_token_v1_listener | xdg_activation_listener |
| static const xdg_activation_token_v1_listener * | xdg_activation_listener_get () |
| static void | xdg_activation_handle_done (void *data, xdg_activation_token_v1 *xdg_activation_token_v1, const char *token) |
Listener (Fractional Scale), #wp_fractional_scale_manager_v1_interface | |
Used by #gwl_window_activate. | |
| static CLG_LogRef | LOG_WL_FRACTIONAL_SCALE = {"ghost.wl.handle.fractional_scale"} |
| static const wp_fractional_scale_v1_listener | wp_fractional_scale_listener |
| static void | wp_fractional_scale_handle_preferred_scale (void *data, wp_fractional_scale_v1 *, uint preferred_scale) |
Listener (Image Description), #wp_image_description_v1_listener | |
| static CLG_LogRef | LOG_WL_IMAGE_DESCRIPTION = {"ghost.wl.handle.image_description"} |
| static const wp_image_description_v1_listener | image_description_listener |
| static void | image_description_handle_failed (void *data, wp_image_description_v1 *, uint32_t cause, const char *msg) |
| static void | image_description_handle_ready (void *data, wp_image_description_v1 *, uint32_t identity) |
Listener (XDG Decoration Listener), #zxdg_toplevel_decoration_v1_listener | |
| static CLG_LogRef | LOG_WL_XDG_TOPLEVEL_DECORATION = {"ghost.wl.handle.xdg_toplevel_decoration"} |
| static const zxdg_toplevel_decoration_v1_listener | xdg_toplevel_decoration_v1_listener |
| static void | xdg_toplevel_decoration_handle_configure (void *data, zxdg_toplevel_decoration_v1 *, const uint32_t mode) |
Listener (XDG Surface Handle Configure), #xdg_surface_listener | |
| static CLG_LogRef | LOG_WL_XDG_SURFACE = {"ghost.wl.handle.xdg_surface"} |
| static const xdg_surface_listener | xdg_surface_listener |
| static void | xdg_surface_handle_configure (void *data, xdg_surface *xdg_surface, const uint32_t serial) |
| #define LOG (&LOG_WL_SURFACE) |
Definition at line 1357 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_XDG_SURFACE) |
Definition at line 1357 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_XDG_TOPLEVEL_DECORATION) |
Definition at line 1357 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_IMAGE_DESCRIPTION) |
Definition at line 1357 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_FRACTIONAL_SCALE) |
Definition at line 1357 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_XDG_TOPLEVEL) |
Definition at line 1357 of file GHOST_WindowWayland.cc.
| #define PENDING_NUM (PENDING_WINDOW_CURSOR_SHAPE_REFRESH + 1) |
Definition at line 320 of file GHOST_WindowWayland.cc.
Referenced by gwl_window_pending_actions_handle().
| Enumerator | |
|---|---|
| PENDING_WINDOW_FRAME_CONFIGURE | The state of the window frame has changed, apply the state from GWL_Window::frame_pending. |
| PENDING_OUTPUT_SCALE_UPDATE | The DPI for a monitor has changed or the monitors (outputs) this window is visible on may have changed. Recalculate the windows scale. |
| PENDING_OUTPUT_SCALE_UPDATE_DEFERRED | Workaround for a bug/glitch in WLROOTS based compositors (RIVER for example). Deferring the scale update one even-loop cycle resolves a bug where the output enter/exit events cause the surface buffer being an invalid size. While these kinds of glitches might be ignored in some cases, this caused newly created windows to immediately loose the connection to WAYLAND (crashing from a user perspective). |
| PENDING_WINDOW_SURFACE_COMMIT | The surface needs a commit to run. Use this to avoid committing immediately which can cause flickering when other operations have not yet been performed - such as refreshing the window size. |
| PENDING_WINDOW_CURSOR_SHAPE_REFRESH | The window has gained focus and the cursor shape needs to be refreshed. |
Definition at line 285 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 213 of file GHOST_WindowWayland.cc.
References divide_ceil_uint(), and x.
Referenced by divide_ceil_uint(), and gwl_window_scale_buffer_size_to().
|
static |
Definition at line 156 of file GHOST_WindowWayland.cc.
References GHOST_ASSERT, and gwl_round_int2_by().
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), gwl_round_int2_by(), and GHOST_WindowWayland::setClientSize().
|
static |
Definition at line 150 of file GHOST_WindowWayland.cc.
References GHOST_ASSERT, and gwl_round_int_by().
Referenced by gwl_round_int_by(), and GHOST_WindowWayland::outputs_changed_update_scale().
|
static |
Return true if the value is already rounded by round_value.
Definition at line 166 of file GHOST_WindowWayland.cc.
References gwl_round_int_test().
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), and gwl_round_int_test().
|
static |
Unlike GHOST_WindowWayland::activate which responds to WAYLAND having set the window active. This function makes a request to WAYLAND for the window to become active.
Definition at line 700 of file GHOST_WindowWayland.cc.
References GHOST_System::getWindowManager(), GWL_Window::ghost_system, gwl_window_activate(), GHOST_SystemWayland::wl_seat_active_get_with_input_serial(), wl_surface, GHOST_WindowWayland::wl_surface_get(), GWL_Window::xdg, xdg_activation_listener_get(), GHOST_SystemWayland::xdg_activation_manager_get(), and GHOST_SystemWayland::xdg_app_id_get().
Referenced by gwl_window_activate(), and GHOST_WindowWayland::setOrder().
|
static |
Definition at line 242 of file GHOST_WindowWayland.cc.
References gwl_window_cursor_custom_clear(), and gwl_window_cursor_custom_free().
Referenced by gwl_window_cursor_custom_clear(), and GHOST_WindowWayland::setWindowCursorShape().
|
static |
Definition at line 237 of file GHOST_WindowWayland.cc.
References GHOST_CursorGenerator::free_fn, and gwl_window_cursor_custom_free().
Referenced by gwl_window_cursor_custom_clear(), gwl_window_cursor_custom_free(), GHOST_WindowWayland::setWindowCustomCursorGenerator(), and GHOST_WindowWayland::~GHOST_WindowWayland().
|
staticnodiscard |
Definition at line 251 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::cursor_shape_custom_set(), and gwl_window_cursor_custom_load().
Referenced by gwl_window_cursor_custom_load(), and gwl_window_cursor_shape_refresh().
|
staticnodiscard |
Definition at line 257 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::cursor_shape_set(), GHOST_ASSERT, GHOST_kFailure, GHOST_kStandardCursorCustom, GHOST_kStandardCursorDefault, GHOST_kSuccess, gwl_window_cursor_custom_load(), gwl_window_cursor_shape_refresh(), and GHOST_SystemWayland::main_thread_id.
Referenced by GHOST_WindowWayland::cursor_shape_refresh(), gwl_window_cursor_shape_refresh(), and gwl_window_pending_actions_handle().
|
static |
Scale a value from a Wayland windowing value to the viewport. Scales up or not at all.
Definition at line 564 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale, GHOST_ASSERT, and gwl_window_fractional_from_viewport().
Referenced by gwl_window_fractional_from_viewport(), and GHOST_WindowWayland::wl_fixed_from_window().
|
static |
Definition at line 580 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale, GHOST_ASSERT, and gwl_window_fractional_from_viewport_round().
Referenced by gwl_window_fractional_from_viewport_round(), and gwl_window_viewport_size_update().
|
static |
Scale a value from a viewport value to Wayland windowing. Scale down or not at all.
Definition at line 554 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale, GHOST_ASSERT, and gwl_window_fractional_to_viewport().
Referenced by GHOST_WindowWayland::getDPIHint(), gwl_window_fractional_to_viewport(), and GHOST_WindowWayland::wl_fixed_to_window().
|
static |
Definition at line 574 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale, GHOST_ASSERT, and gwl_window_fractional_to_viewport_round().
Referenced by gwl_window_fractional_to_viewport_round(), and xdg_toplevel_handle_configure().
|
static |
Definition at line 780 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_WindowFrame::fractional_scale, GWL_Window::frame, GWL_Window::frame_pending, gwl_window_frame_pending_fractional_scale_set(), and gwl_window_frame_pending_fractional_scale_set_notest().
Referenced by gwl_window_frame_pending_fractional_scale_set(), gwl_window_frame_pending_size_set(), and gwl_window_frame_update_from_pending_no_lock().
|
static |
Definition at line 750 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_WindowFrame::fractional_scale, GWL_Window::frame, GWL_Window::frame_pending, gwl_window_frame_pending_fractional_scale_set_notest(), gwl_window_viewport_set(), gwl_window_viewport_size_update(), gwl_window_viewport_unset(), GWL_Window::wl, and GWL_Window::wp.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), gwl_window_frame_pending_fractional_scale_set(), and gwl_window_frame_pending_fractional_scale_set_notest().
|
static |
Definition at line 793 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_WindowFrame::fractional_scale, GWL_Window::frame, GWL_Window::frame_pending, GWL_Window::ghost_window, gwl_window_frame_pending_fractional_scale_set(), gwl_window_frame_pending_size_set(), gwl_window_resize_for_backend(), gwl_window_viewport_size_update(), GHOST_WindowWayland::notify_size(), and GWL_WindowFrame::size.
Referenced by gwl_window_frame_pending_size_set(), gwl_window_frame_update_from_pending_no_lock(), and GHOST_WindowWayland::setClientSize().
|
static |
Definition at line 1253 of file GHOST_WindowWayland.cc.
References GWL_Window::frame_pending_mutex, gwl_window_frame_update_from_pending(), and gwl_window_frame_update_from_pending_no_lock().
Referenced by gwl_window_frame_update_from_pending(), and gwl_window_pending_actions_handle().
|
static |
Update the window's GWL_WindowFrame. The caller must handle locking & run from the main thread.
Definition at line 1095 of file GHOST_WindowWayland.cc.
References GHOST_WindowWayland::activate(), GWL_WindowFrame::buffer_scale, GHOST_WindowWayland::deactivate(), GWL_WindowFrame::fractional_scale, GWL_Window::frame, GWL_Window::frame_pending, GHOST_WindowManager::getActiveWindow(), GHOST_SystemWayland::getMilliSeconds(), GHOST_System::getWindowManager(), GHOST_ASSERT, GHOST_kCSDTypeBody, GHOST_kEventWindowDPIHintChanged, GHOST_kWindowStateFullScreen, GWL_Window::ghost_system, GWL_Window::ghost_window, gwl_window_frame_pending_fractional_scale_set(), gwl_window_frame_pending_size_set(), gwl_window_frame_update_from_pending_no_lock(), gwl_window_pending_actions_tag(), gwl_window_resize_for_backend(), gwl_window_state_get(), GWL_XDG_Decor_Window::initial_configure_seen, GWL_WindowFrame::is_active, GWL_WindowFrame::is_fullscreen, GWL_WindowFrame::is_maximized, GHOST_SystemWayland::main_thread_id, GHOST_WindowWayland::notify_decor_redraw(), GWL_XDG_Decor_Window::pending, PENDING_WINDOW_SURFACE_COMMIT, GHOST_System::pushEvent(), GWL_WindowFrame::size, state, GWL_XDG_Decor_Window::surface, GWL_WindowFrame::tiled_edges, GWL_XDG_Decor_Window::toplevel, GWL_Window::wl, GWL_Window::xdg_decor, and GHOST_SystemWayland::xdg_toplevel_icon_update().
Referenced by gwl_window_frame_update_from_pending(), gwl_window_frame_update_from_pending_no_lock(), GHOST_WindowWayland::outputs_changed_update_scale(), and xdg_surface_handle_configure().
|
static |
Definition at line 838 of file GHOST_WindowWayland.cc.
References ARRAY_SIZE(), GWL_Window::cursor_generator, GHOST_Window::getCursorShape(), GWL_Window::ghost_system, GWL_Window::ghost_window, gwl_window_cursor_shape_refresh(), gwl_window_frame_update_from_pending(), gwl_window_pending_actions_handle(), gwl_window_pending_actions_tag(), GHOST_WindowWayland::outputs_changed_update_scale(), GWL_Window::pending_actions, PENDING_NUM, PENDING_OUTPUT_SCALE_UPDATE, PENDING_OUTPUT_SCALE_UPDATE_DEFERRED, PENDING_WINDOW_CURSOR_SHAPE_REFRESH, PENDING_WINDOW_FRAME_CONFIGURE, PENDING_WINDOW_SURFACE_COMMIT, and GWL_Window::wl.
Referenced by gwl_window_pending_actions_handle(), and GHOST_WindowWayland::pending_actions_handle().
|
static |
Definition at line 832 of file GHOST_WindowWayland.cc.
References GWL_Window::ghost_system, gwl_window_pending_actions_tag(), GHOST_SystemWayland::has_pending_actions_for_window, and GWL_Window::pending_actions.
Referenced by GHOST_WindowWayland::cursor_shape_refresh(), gwl_window_frame_update_from_pending_no_lock(), gwl_window_pending_actions_handle(), gwl_window_pending_actions_tag(), GHOST_WindowWayland::outputs_changed_update_scale(), GHOST_WindowWayland::outputs_changed_update_scale_tag(), and xdg_surface_handle_configure().
|
static |
Definition at line 450 of file GHOST_WindowWayland.cc.
References GWL_Window::backend, GWL_Window::ghost_context_type, gwl_window_resize_for_backend(), size(), UNPACK2, and wl_egl_window_resize.
Referenced by gwl_window_frame_pending_size_set(), gwl_window_frame_update_from_pending_no_lock(), and gwl_window_resize_for_backend().
| int gwl_window_scale_buffer_size_to | ( | const GWL_WindowScaleParams & | scale_params, |
| int | logical_size, | ||
| int * | r_buffer_scale ) |
Scale a logical buffer size to physical pixels, returning an integer buffer scale. The buffer scale is rounded up so result / *r_buffer_scale == logical_size.
Definition at line 218 of file GHOST_WindowWayland.cc.
References divide_ceil_uint(), gwl_window_scale_buffer_size_to(), and gwl_window_scale_int_to().
Referenced by ghost_wl_surface_own_cursor_tablet(), gwl_window_scale_buffer_size_to(), and GHOST_SystemWayland::xdg_toplevel_icon_update().
| int gwl_window_scale_int_from | ( | const GWL_WindowScaleParams & | scale_params, |
| const int | value ) |
Definition at line 208 of file GHOST_WindowWayland.cc.
References gwl_window_scale_int_from(), and gwl_window_scale_wl_fixed_from().
Referenced by ghost_wl_surface_own_cursor_tablet(), and gwl_window_scale_int_from().
| int gwl_window_scale_int_to | ( | const GWL_WindowScaleParams & | scale_params, |
| const int | value ) |
Definition at line 204 of file GHOST_WindowWayland.cc.
References gwl_window_scale_int_to(), and gwl_window_scale_wl_fixed_to().
Referenced by ghost_wl_surface_own_cursor_tablet(), gwl_window_scale_buffer_size_to(), and gwl_window_scale_int_to().
| wl_fixed_t gwl_window_scale_wl_fixed_from | ( | const GWL_WindowScaleParams & | scale_params, |
| wl_fixed_t | value ) |
Definition at line 195 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, gwl_window_scale_wl_fixed_from(), GWL_WindowScaleParams::is_fractional, and GWL_WindowScaleParams::scale.
Referenced by ghost_wl_surface_own_cursor_tablet(), gwl_window_scale_int_from(), gwl_window_scale_wl_fixed_from(), and GHOST_SystemWayland::window_cursor_grab_set().
| wl_fixed_t gwl_window_scale_wl_fixed_to | ( | const GWL_WindowScaleParams & | scale_params, |
| wl_fixed_t | value ) |
Definition at line 187 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, gwl_window_scale_wl_fixed_to(), GWL_WindowScaleParams::is_fractional, and GWL_WindowScaleParams::scale.
Referenced by ghost_wl_surface_own_cursor_tablet(), gwl_window_scale_int_to(), gwl_window_scale_wl_fixed_to(), and GHOST_SystemWayland::window_cursor_grab_set().
|
static |
Definition at line 479 of file GHOST_WindowWayland.cc.
References GWL_Window::frame, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateNormal, gwl_window_state_get(), GWL_WindowFrame::is_fullscreen, and GWL_WindowFrame::is_maximized.
Referenced by GHOST_WindowWayland::getState(), gwl_window_frame_update_from_pending_no_lock(), gwl_window_state_get(), and gwl_window_state_set().
|
static |
Definition at line 535 of file GHOST_WindowWayland.cc.
References gwl_window_state_get(), gwl_window_state_set(), gwl_window_state_set_for_xdg(), state, GWL_XDG_Decor_Window::toplevel, and GWL_Window::xdg_decor.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), gwl_window_state_set(), and GHOST_WindowWayland::setState().
|
static |
Definition at line 490 of file GHOST_WindowWayland.cc.
References GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, gwl_window_state_set_for_xdg(), and state.
Referenced by gwl_window_state_set(), and gwl_window_state_set_for_xdg().
|
static |
Definition at line 472 of file GHOST_WindowWayland.cc.
References gwl_window_title_set(), GWL_Window::title, GWL_XDG_Decor_Window::toplevel, and GWL_Window::xdg_decor.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), gwl_window_title_set(), and GHOST_WindowWayland::setTitle().
|
static |
Definition at line 602 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_Window::frame, GWL_Window::ghost_system, gwl_window_viewport_set(), GWL_Window::wl, GWL_Window::wp, and GHOST_SystemWayland::wp_viewporter_get().
Referenced by gwl_window_frame_pending_fractional_scale_set_notest(), and gwl_window_viewport_set().
|
static |
Definition at line 672 of file GHOST_WindowWayland.cc.
References GWL_Window::frame, gwl_window_fractional_from_viewport_round(), gwl_window_viewport_size_update(), GWL_WindowFrame::size, and GWL_Window::wp.
Referenced by gwl_window_frame_pending_fractional_scale_set_notest(), gwl_window_frame_pending_size_set(), and gwl_window_viewport_size_update().
|
static |
Definition at line 640 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_Window::frame, GWL_Window::frame_pending, GHOST_ASSERT, gwl_window_viewport_unset(), GWL_Window::wl, and GWL_Window::wp.
Referenced by gwl_window_frame_pending_fractional_scale_set_notest(), and gwl_window_viewport_unset().
|
static |
Definition at line 136 of file GHOST_WindowWayland.cc.
References gwl_xdg_decor_window_destroy(), GWL_XDG_Decor_Window::surface, GWL_XDG_Decor_Window::toplevel, and GWL_XDG_Decor_Window::toplevel_decor.
Referenced by gwl_xdg_decor_window_destroy(), and GHOST_WindowWayland::~GHOST_WindowWayland().
| void gwl_xdg_window_icon_free | ( | GWL_XDG_WindowIcon & | icon | ) |
Definition at line 2650 of file GHOST_WindowWayland.cc.
References GWL_XDG_WindowIcon::buffer, GWL_XDG_WindowIcon::buffer_data, GWL_XDG_WindowIcon::buffer_size, and gwl_xdg_window_icon_free().
Referenced by gwl_xdg_window_icon_free(), GHOST_SystemWayland::xdg_toplevel_icon_update(), and GHOST_WindowWayland::~GHOST_WindowWayland().
|
static |
Definition at line 1580 of file GHOST_WindowWayland.cc.
References CLOG_WARN, image_description_handle_failed(), and LOG.
Referenced by image_description_handle_failed().
|
static |
Definition at line 1589 of file GHOST_WindowWayland.cc.
References CLOG_INFO, GWL_ImageDescriptionWait::done, image_description_handle_ready(), LOG, and GWL_ImageDescriptionWait::ready.
Referenced by image_description_handle_ready().
|
static |
Return -1 if output_a has a scale smaller than output_b, 0 when there equal, otherwise 1.
Definition at line 1270 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_Output::has_scale_fractional, output_scale_cmp(), GWL_Output::scale, and GWL_Output::scale_fractional.
Referenced by output_scale_cmp(), outputs_max_scale_or_default(), and outputs_uniform_scale_or_default().
|
static |
Definition at line 1295 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_Output::has_scale_fractional, output_scale_cmp(), outputs_max_scale_or_default(), GWL_Output::scale, and GWL_Output::scale_fractional.
Referenced by GHOST_WindowWayland::outputs_changed_update_scale(), and outputs_max_scale_or_default().
|
static |
Definition at line 1320 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_Output::has_scale_fractional, output_scale_cmp(), outputs_uniform_scale_or_default(), GWL_Output::scale, and GWL_Output::scale_fractional.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), and outputs_uniform_scale_or_default().
|
static |
Definition at line 1704 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, ghost_wl_output_own(), ghost_wl_output_user_data(), LOG, GHOST_WindowWayland::outputs_changed_update_scale_tag(), GHOST_WindowWayland::outputs_enter(), surface_handle_enter(), and wl_surface.
Referenced by surface_handle_enter().
|
static |
Definition at line 1719 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, ghost_wl_output_own(), ghost_wl_output_user_data(), LOG, GHOST_WindowWayland::outputs_changed_update_scale_tag(), GHOST_WindowWayland::outputs_leave(), surface_handle_leave(), and wl_surface.
Referenced by surface_handle_leave().
|
static |
Definition at line 1542 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale_preferred, GWL_Window::frame_pending, GWL_Window::ghost_window, LOG, GHOST_WindowWayland::outputs_changed_update_scale_tag(), and wp_fractional_scale_handle_preferred_scale().
Referenced by wp_fractional_scale_handle_preferred_scale().
|
static |
Definition at line 1506 of file GHOST_WindowWayland.cc.
References GWL_Window::ghost_system, GWL_Window::wl, GWL_Window::xdg, xdg_activation_handle_done(), and GHOST_SystemWayland::xdg_activation_manager_get().
Referenced by xdg_activation_handle_done().
|
static |
Definition at line 1526 of file GHOST_WindowWayland.cc.
References xdg_activation_listener, and xdg_activation_listener_get().
Referenced by gwl_window_activate(), and xdg_activation_listener_get().
|
static |
Definition at line 1656 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, GWL_Window::ghost_system, gwl_window_frame_update_from_pending_no_lock(), gwl_window_pending_actions_tag(), LOG, GHOST_SystemWayland::main_thread_id, GWL_XDG_Decor_Window::pending, PENDING_WINDOW_FRAME_CONFIGURE, GWL_XDG_Decor_Window::surface, GWL_Window::xdg_decor, and xdg_surface_handle_configure().
Referenced by xdg_surface_handle_configure().
|
static |
Definition at line 1631 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, LOG, GWL_XDG_Decor_Window::mode, GWL_Window::xdg_decor, and xdg_toplevel_decoration_handle_configure().
Referenced by xdg_toplevel_decoration_handle_configure().
|
static |
Definition at line 1422 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, GHOST_WindowWayland::close(), GWL_Window::ghost_window, LOG, and xdg_toplevel_handle_close().
Referenced by xdg_toplevel_handle_close().
|
static |
Definition at line 1359 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, CLOG_DEBUG, GWL_WindowFrame::fractional_scale, GWL_Window::frame, GWL_Window::frame_pending, GWL_Window::frame_pending_mutex, GHOST_kWindowTiledBottom, GHOST_kWindowTiledLeft, GHOST_kWindowTiledNone, GHOST_kWindowTiledRight, GHOST_kWindowTiledTop, gwl_window_fractional_to_viewport_round(), GWL_WindowFrame::is_active, GWL_WindowFrame::is_fullscreen, GWL_WindowFrame::is_maximized, LOG, GWL_WindowFrame::size, size(), state, GWL_WindowFrame::tiled_edges, WL_ARRAY_FOR_EACH, and xdg_toplevel_handle_configure().
Referenced by xdg_toplevel_handle_configure().
|
static |
Definition at line 1431 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, GWL_XDG_Decor_Window::initial_bounds, GWL_XDG_Decor_Window::initial_configure_seen, LOG, GWL_Window::xdg_decor, and xdg_toplevel_handle_configure_bounds().
Referenced by xdg_toplevel_handle_configure_bounds().
|
static |
Definition at line 1447 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, GHOST_kCSDTypeButtonClose, GHOST_kCSDTypeButtonMaximize, GHOST_kCSDTypeButtonMenu, GHOST_kCSDTypeButtonMinimize, GHOST_kCSDTypeTitlebar, LOG, WL_ARRAY_FOR_EACH, and xdg_toplevel_handle_wm_capabilities().
Referenced by xdg_toplevel_handle_wm_capabilities().
|
staticconstexpr |
Definition at line 75 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::getDPIHint().
|
static |
Definition at line 1612 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1539 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1572 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1701 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1653 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1356 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1628 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1754 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1560 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1522 of file GHOST_WindowWayland.cc.
Referenced by xdg_activation_listener_get().
|
static |
Definition at line 1689 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1641 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1489 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().