|
Blender V5.0
|
#include "GHOST_WindowWayland.hh"#include "GHOST_SystemWayland.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 <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 <malloc.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 |
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) |
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::vector< GWL_Output * > &outputs, const int32_t scale_default, int *r_scale_fractional) |
| static int | outputs_uniform_scale_or_default (const std::vector< GWL_Output * > &outputs, const int32_t scale_default, int *r_scale_fractional) |
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_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 *, xdg_toplevel *, wl_array *) |
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 (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 1235 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_XDG_SURFACE) |
Definition at line 1235 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_XDG_TOPLEVEL_DECORATION) |
Definition at line 1235 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_FRACTIONAL_SCALE) |
Definition at line 1235 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_XDG_TOPLEVEL) |
Definition at line 1235 of file GHOST_WindowWayland.cc.
| #define PENDING_NUM (PENDING_WINDOW_CURSOR_SHAPE_REFRESH + 1) |
Definition at line 368 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 333 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 221 of file GHOST_WindowWayland.cc.
References GHOST_ASSERT.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), and GHOST_WindowWayland::setClientSize().
|
static |
Definition at line 215 of file GHOST_WindowWayland.cc.
References GHOST_ASSERT.
Referenced by GHOST_WindowWayland::outputs_changed_update_scale().
|
static |
Return true if the value is already rounded by round_value.
Definition at line 231 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
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 778 of file GHOST_WindowWayland.cc.
References GWL_Window::activation_token, GHOST_System::getWindowManager(), GWL_Window::ghost_system, UNLIKELY, 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 GHOST_WindowWayland::setOrder().
|
static |
Definition at line 289 of file GHOST_WindowWayland.cc.
References gwl_window_cursor_custom_free().
Referenced by GHOST_WindowWayland::setWindowCursorShape().
|
static |
Definition at line 284 of file GHOST_WindowWayland.cc.
References GHOST_CursorGenerator::free_fn.
Referenced by gwl_window_cursor_custom_clear(), GHOST_WindowWayland::setWindowCustomCursorGenerator(), and GHOST_WindowWayland::~GHOST_WindowWayland().
|
static |
Definition at line 298 of file GHOST_WindowWayland.cc.
References GHOST_SystemWayland::cursor_shape_custom_set().
Referenced by gwl_window_cursor_shape_refresh().
|
static |
Definition at line 304 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(), and GHOST_SystemWayland::main_thread_id.
Referenced by GHOST_WindowWayland::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 658 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale, and GHOST_ASSERT.
Referenced by GHOST_WindowWayland::wl_fixed_from_window().
|
static |
Definition at line 674 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale, and GHOST_ASSERT.
Referenced by 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 648 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale, and GHOST_ASSERT.
Referenced by GHOST_WindowWayland::getDPIHint(), and GHOST_WindowWayland::wl_fixed_to_window().
|
static |
Definition at line 668 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale, and GHOST_ASSERT.
Referenced by xdg_toplevel_handle_configure().
|
static |
Definition at line 858 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_WindowFrame::fractional_scale, GWL_Window::frame, GWL_Window::frame_pending, and gwl_window_frame_pending_fractional_scale_set_notest().
Referenced by gwl_window_frame_pending_size_set(), and gwl_window_frame_update_from_pending_no_lock().
|
static |
Definition at line 828 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_WindowFrame::fractional_scale, GWL_Window::frame, GWL_Window::frame_pending, gwl_window_viewport_set(), gwl_window_viewport_size_update(), gwl_window_viewport_unset(), GWL_Window::surface, GWL_Window::viewport, GWL_Window::wl, and GWL_Window::wp.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), and gwl_window_frame_pending_fractional_scale_set().
|
static |
Definition at line 871 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_resize_for_backend(), gwl_window_viewport_size_update(), GHOST_WindowWayland::notify_size(), and GWL_WindowFrame::size.
Referenced by gwl_window_frame_update_from_pending_no_lock(), and GHOST_WindowWayland::setClientSize().
|
static |
Definition at line 1104 of file GHOST_WindowWayland.cc.
References GWL_Window::frame_pending_mutex, and gwl_window_frame_update_from_pending_no_lock().
Referenced by 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 955 of file GHOST_WindowWayland.cc.
References GWL_XDG_Decor_Window::ack_configure, GWL_XDG_Decor_Window::ack_configure_serial, 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_kEventWindowDPIHintChanged, GWL_Window::ghost_system, GWL_Window::ghost_window, gwl_window_frame_pending_fractional_scale_set(), gwl_window_frame_pending_size_set(), gwl_window_pending_actions_tag(), gwl_window_resize_for_backend(), gwl_window_state_get(), gwl_window_state_set_for_xdg(), GWL_XDG_Decor_Window::initial_configure_seen, GWL_WindowFrame::is_active, libdecor_frame_commit, libdecor_frame_get_xdg_toplevel, libdecor_state_free, libdecor_state_new, GHOST_SystemWayland::main_thread_id, GWL_XDG_Decor_Window::pending, PENDING_WINDOW_SURFACE_COMMIT, GHOST_System::pushEvent(), GWL_WindowFrame::size, state, GWL_Window::surface, GWL_XDG_Decor_Window::surface, UNPACK2, GWL_Window::wl, and GWL_Window::xdg_decor.
Referenced by gwl_window_frame_update_from_pending(), GHOST_WindowWayland::outputs_changed_update_scale(), and xdg_surface_handle_configure().
|
static |
Definition at line 916 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_tag(), i, 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, GWL_Window::surface, and GWL_Window::wl.
Referenced by GHOST_WindowWayland::pending_actions_handle().
|
static |
Definition at line 910 of file GHOST_WindowWayland.cc.
References GWL_Window::ghost_system, 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(), GHOST_WindowWayland::outputs_changed_update_scale(), GHOST_WindowWayland::outputs_changed_update_scale_tag(), and xdg_surface_handle_configure().
|
static |
Definition at line 486 of file GHOST_WindowWayland.cc.
References GWL_Window::backend, GWL_Window::ghost_context_type, size(), UNPACK2, and wl_egl_window_resize.
Referenced by gwl_window_frame_pending_size_set(), and gwl_window_frame_update_from_pending_no_lock().
| int gwl_window_scale_int_from | ( | const GWL_WindowScaleParams & | scale_params, |
| const int | value ) |
Definition at line 273 of file GHOST_WindowWayland.cc.
References gwl_window_scale_wl_fixed_from().
| int gwl_window_scale_int_to | ( | const GWL_WindowScaleParams & | scale_params, |
| const int | value ) |
Definition at line 269 of file GHOST_WindowWayland.cc.
References gwl_window_scale_wl_fixed_to().
| wl_fixed_t gwl_window_scale_wl_fixed_from | ( | const GWL_WindowScaleParams & | scale_params, |
| wl_fixed_t | value ) |
Definition at line 260 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_WindowScaleParams::is_fractional, and GWL_WindowScaleParams::scale.
Referenced by gwl_window_scale_int_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 252 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_WindowScaleParams::is_fractional, and GWL_WindowScaleParams::scale.
Referenced by gwl_window_scale_int_to(), and GHOST_SystemWayland::window_cursor_grab_set().
|
static |
Definition at line 525 of file GHOST_WindowWayland.cc.
References GWL_Window::frame, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateNormal, GWL_WindowFrame::is_fullscreen, and GWL_WindowFrame::is_maximised.
Referenced by GHOST_WindowWayland::getState(), GHOST_WindowWayland::GHOST_WindowWayland(), gwl_window_frame_update_from_pending_no_lock(), and gwl_window_state_set().
|
static |
Definition at line 619 of file GHOST_WindowWayland.cc.
References GWL_Window::frame, gwl_window_state_get(), gwl_window_state_set_for_xdg(), result, state, GWL_XDG_Decor_Window::toplevel, and GWL_Window::xdg_decor.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), and GHOST_WindowWayland::setState().
|
static |
Definition at line 582 of file GHOST_WindowWayland.cc.
References GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, and state.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), gwl_window_frame_update_from_pending_no_lock(), and gwl_window_state_set().
|
static |
Definition at line 508 of file GHOST_WindowWayland.cc.
References libdecor_frame_set_title, GWL_Window::title, GWL_XDG_Decor_Window::toplevel, and GWL_Window::xdg_decor.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), and GHOST_WindowWayland::setTitle().
|
static |
Definition at line 680 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_Window::frame, GWL_Window::ghost_system, GWL_Window::surface, GWL_Window::viewport, GWL_Window::wl, GWL_Window::wp, and GHOST_SystemWayland::wp_viewporter_get().
Referenced by gwl_window_frame_pending_fractional_scale_set_notest().
|
static |
Definition at line 750 of file GHOST_WindowWayland.cc.
References GWL_Window::frame, gwl_window_fractional_from_viewport_round(), GWL_WindowFrame::size, GWL_Window::viewport, and GWL_Window::wp.
Referenced by gwl_window_frame_pending_fractional_scale_set_notest(), and gwl_window_frame_pending_size_set().
|
static |
Definition at line 718 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, GWL_Window::frame, GWL_Window::frame_pending, GHOST_ASSERT, GWL_Window::surface, GWL_Window::viewport, GWL_Window::wl, and GWL_Window::wp.
Referenced by gwl_window_frame_pending_fractional_scale_set_notest().
|
static |
Definition at line 201 of file GHOST_WindowWayland.cc.
References GWL_XDG_Decor_Window::surface, GWL_XDG_Decor_Window::toplevel, and GWL_XDG_Decor_Window::toplevel_decor.
Referenced by GHOST_WindowWayland::~GHOST_WindowWayland().
|
static |
Return -1 if output_a has a scale smaller than output_b, 0 when there equal, otherwise 1.
Definition at line 1121 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_Output::has_scale_fractional, GWL_Output::scale, and GWL_Output::scale_fractional.
Referenced by outputs_max_scale_or_default(), and outputs_uniform_scale_or_default().
|
static |
Definition at line 1146 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_Output::has_scale_fractional, output_scale_cmp(), outputs, GWL_Output::scale, and GWL_Output::scale_fractional.
Referenced by GHOST_WindowWayland::outputs_changed_update_scale().
|
static |
Definition at line 1171 of file GHOST_WindowWayland.cc.
References FRACTIONAL_DENOMINATOR, GWL_Output::has_scale_fractional, output_scale_cmp(), outputs, GWL_Output::scale, and GWL_Output::scale_fractional.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1661 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, data, ghost_wl_output_own(), ghost_wl_output_user_data(), LOG, GHOST_WindowWayland::outputs_changed_update_scale_tag(), GHOST_WindowWayland::outputs_enter(), and wl_surface.
|
static |
Definition at line 1676 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, data, ghost_wl_output_own(), ghost_wl_output_user_data(), LOG, GHOST_WindowWayland::outputs_changed_update_scale_tag(), GHOST_WindowWayland::outputs_leave(), and wl_surface.
|
static |
Definition at line 1373 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, data, FRACTIONAL_DENOMINATOR, GWL_WindowFrame::fractional_scale_preferred, GWL_Window::frame_pending, GWL_Window::ghost_window, LOG, and GHOST_WindowWayland::outputs_changed_update_scale_tag().
|
static |
Definition at line 1337 of file GHOST_WindowWayland.cc.
References GWL_Window::activation_token, data, GWL_Window::ghost_system, GWL_Window::surface, GWL_Window::wl, GWL_Window::xdg, and GHOST_SystemWayland::xdg_activation_manager_get().
|
static |
LIBDECOR support committing a window-configuration in the main-thread that was handled in a non-main-thread.
This is needed for proper order of operations as the commit needs to occur after the buffer is resized (something that can't be done from a non-main thread). Without this, the window-frame can get out of sync with its contents and resizing is slow.
Eventually LIBDECOR should support copying & freeing a configuration, even when it does, older versions of the library will to be supported and the workaround will need to be kept. See: https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/64 Queue configuration calls until a valid window frame size is available. This is needed because LIBDECOR has an issue where windows initialized with a zero size don't have a usable title bar. see #117583.
Definition at line 1357 of file GHOST_WindowWayland.cc.
References xdg_activation_listener.
Referenced by gwl_window_activate().
|
static |
Definition at line 1613 of file GHOST_WindowWayland.cc.
References GWL_XDG_Decor_Window::ack_configure, GWL_XDG_Decor_Window::ack_configure_serial, CLOG_DEBUG, data, 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, and GWL_Window::xdg_decor.
|
static |
Definition at line 1588 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, data, LOG, GWL_XDG_Decor_Window::mode, and GWL_Window::xdg_decor.
|
static |
Definition at line 1285 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, GHOST_WindowWayland::close(), data, GWL_Window::ghost_window, and LOG.
|
static |
Definition at line 1237 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, CLOG_DEBUG, data, GWL_WindowFrame::fractional_scale, GWL_Window::frame, GWL_Window::frame_pending, GWL_Window::frame_pending_mutex, gwl_window_fractional_to_viewport_round(), i, GWL_WindowFrame::is_active, GWL_WindowFrame::is_fullscreen, GWL_WindowFrame::is_maximised, LOG, GWL_WindowFrame::size, size(), state, and WL_ARRAY_FOR_EACH.
|
static |
Definition at line 1294 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, data, GWL_XDG_Decor_Window::initial_bounds, GWL_XDG_Decor_Window::initial_configure_seen, LOG, and GWL_Window::xdg_decor.
|
static |
Definition at line 1310 of file GHOST_WindowWayland.cc.
References CLOG_DEBUG, and LOG.
|
staticconstexpr |
Definition at line 115 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::getDPIHint().
|
static |
Definition at line 1370 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1658 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1610 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1234 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1585 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1711 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1391 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1353 of file GHOST_WindowWayland.cc.
Referenced by xdg_activation_listener_get().
|
static |
Definition at line 1646 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1598 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1320 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().