|
Blender V4.3
|
#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 <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_WindowCursorCustomShape |
| 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 (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, int value) |
| int | gwl_window_scale_int_from (const GWL_WindowScaleParams &scale_params, int value) |
Internal #GWL_WindowCursorCustomShape | |
| static void | gwl_window_cursor_custom_free (GWL_WindowCursorCustomShape &ccs) |
| static void | gwl_window_cursor_custom_clear (GWL_WindowCursorCustomShape &ccs) |
| static void | gwl_window_cursor_custom_store (GWL_WindowCursorCustomShape &ccs, const uint8_t *bitmap, const uint8_t *mask, const int32_t size[2], const int32_t hot_spot[2], bool can_invert_color) |
| static GHOST_TSuccess | gwl_window_cursor_custom_load (const GWL_WindowCursorCustomShape &ccs, GHOST_SystemWayland *system) |
| static GHOST_TSuccess | gwl_window_cursor_shape_refresh (GHOST_TStandardCursor shape, const GWL_WindowCursorCustomShape &ccs, 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, int value) |
| static int | gwl_window_fractional_from_viewport (const GWL_WindowFrame &frame, int value) |
| static int | gwl_window_fractional_to_viewport_round (const GWL_WindowFrame &frame, int value) |
| static int | gwl_window_fractional_from_viewport_round (const GWL_WindowFrame &frame, 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 *, int32_t width, 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_XDG_TOPLEVEL) |
Definition at line 1249 of file GHOST_WindowWayland.cc.
Referenced by surface_handle_enter(), surface_handle_leave(), wp_fractional_scale_handle_preferred_scale(), xdg_surface_handle_configure(), xdg_toplevel_decoration_handle_configure(), xdg_toplevel_handle_close(), xdg_toplevel_handle_configure(), xdg_toplevel_handle_configure_bounds(), and xdg_toplevel_handle_wm_capabilities().
| #define LOG (&LOG_WL_FRACTIONAL_SCALE) |
Definition at line 1249 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_XDG_TOPLEVEL_DECORATION) |
Definition at line 1249 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_XDG_SURFACE) |
Definition at line 1249 of file GHOST_WindowWayland.cc.
| #define LOG (&LOG_WL_SURFACE) |
Definition at line 1249 of file GHOST_WindowWayland.cc.
| #define PENDING_NUM (PENDING_WINDOW_CURSOR_SHAPE_REFRESH + 1) |
Definition at line 395 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 e.g.). 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 360 of file GHOST_WindowWayland.cc.
Definition at line 203 of file GHOST_WindowWayland.cc.
References GHOST_ASSERT.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), and GHOST_WindowWayland::setClientSize().
Definition at line 197 of file GHOST_WindowWayland.cc.
References GHOST_ASSERT.
Referenced by GHOST_WindowWayland::outputs_changed_update_scale().
Return true if the value is already rounded by round_value.
Definition at line 213 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 801 of file GHOST_WindowWayland.cc.
References GWL_Window::activation_token, GHOST_WindowManager::getActiveWindow(), 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 284 of file GHOST_WindowWayland.cc.
References gwl_window_cursor_custom_free().
Referenced by gwl_window_cursor_custom_store(), and GHOST_WindowWayland::setWindowCursorShape().
|
static |
Definition at line 274 of file GHOST_WindowWayland.cc.
References GWL_WindowCursorCustomShape::bitmap, free(), and GWL_WindowCursorCustomShape::mask.
Referenced by gwl_window_cursor_custom_clear(), and GHOST_WindowWayland::~GHOST_WindowWayland().
|
static |
Definition at line 319 of file GHOST_WindowWayland.cc.
References GWL_WindowCursorCustomShape::bitmap, GWL_WindowCursorCustomShape::can_invert_color, GHOST_SystemWayland::cursor_shape_custom_set(), GWL_WindowCursorCustomShape::hot_spot, GWL_WindowCursorCustomShape::mask, and GWL_WindowCursorCustomShape::size.
Referenced by gwl_window_cursor_shape_refresh(), and GHOST_WindowWayland::setWindowCustomCursorShape().
|
static |
Definition at line 290 of file GHOST_WindowWayland.cc.
References GWL_WindowCursorCustomShape::bitmap, GWL_WindowCursorCustomShape::can_invert_color, gwl_window_cursor_custom_clear(), GWL_WindowCursorCustomShape::hot_spot, GWL_WindowCursorCustomShape::mask, and GWL_WindowCursorCustomShape::size.
Referenced by GHOST_WindowWayland::setWindowCustomCursorShape().
|
static |
Definition at line 331 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 681 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 697 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 671 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 691 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 881 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 851 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 894 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 1118 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 978 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_XDG_Decor_Window::initial_configure_seen, GWL_WindowFrame::is_active, libdecor_frame_commit, 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 939 of file GHOST_WindowWayland.cc.
References ARRAY_SIZE, GWL_Window::cursor_custom_shape, 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(), 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 933 of file GHOST_WindowWayland.cc.
References GWL_Window::ghost_system, GHOST_SystemWayland::has_pending_actions_for_window, int, 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 513 of file GHOST_WindowWayland.cc.
References GWL_Window::backend, GWL_Window::ghost_context_type, 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, |
| int | value ) |
Definition at line 255 of file GHOST_WindowWayland.cc.
References gwl_window_scale_wl_fixed_from().
| int gwl_window_scale_int_to | ( | const GWL_WindowScaleParams & | scale_params, |
| int | value ) |
Definition at line 251 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 242 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 234 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 548 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(), and gwl_window_state_set().
|
static |
Definition at line 642 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 605 of file GHOST_WindowWayland.cc.
References GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, and state.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), and gwl_window_state_set().
|
static |
Definition at line 531 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 703 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 773 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 741 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 183 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 1135 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 1160 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 1185 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 1676 of file GHOST_WindowWayland.cc.
References CLOG_INFO, data, ghost_wl_output_own(), ghost_wl_output_user_data(), LOG, GHOST_WindowWayland::outputs_changed_update_scale_tag(), and GHOST_WindowWayland::outputs_enter().
|
static |
Definition at line 1691 of file GHOST_WindowWayland.cc.
References CLOG_INFO, data, ghost_wl_output_own(), ghost_wl_output_user_data(), LOG, GHOST_WindowWayland::outputs_changed_update_scale_tag(), and GHOST_WindowWayland::outputs_leave().
|
static |
Definition at line 1387 of file GHOST_WindowWayland.cc.
References CLOG_INFO, 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 1351 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 1371 of file GHOST_WindowWayland.cc.
References xdg_activation_listener.
Referenced by gwl_window_activate().
|
static |
Definition at line 1628 of file GHOST_WindowWayland.cc.
References GWL_XDG_Decor_Window::ack_configure, GWL_XDG_Decor_Window::ack_configure_serial, CLOG_INFO, 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 1603 of file GHOST_WindowWayland.cc.
References CLOG_INFO, data, LOG, GWL_XDG_Decor_Window::mode, and GWL_Window::xdg_decor.
|
static |
Definition at line 1299 of file GHOST_WindowWayland.cc.
References CLOG_INFO, GHOST_WindowWayland::close(), data, GWL_Window::ghost_window, and LOG.
|
static |
Definition at line 1251 of file GHOST_WindowWayland.cc.
References GWL_WindowFrame::buffer_scale, CLOG_INFO, data, GWL_WindowFrame::fractional_scale, GWL_Window::frame, GWL_Window::frame_pending, GWL_Window::frame_pending_mutex, gwl_window_fractional_to_viewport_round(), GWL_WindowFrame::is_active, GWL_WindowFrame::is_fullscreen, GWL_WindowFrame::is_maximised, LOG, GWL_WindowFrame::size, state, and WL_ARRAY_FOR_EACH.
|
static |
Definition at line 1308 of file GHOST_WindowWayland.cc.
References CLOG_INFO, data, GWL_XDG_Decor_Window::initial_bounds, GWL_XDG_Decor_Window::initial_configure_seen, LOG, and GWL_Window::xdg_decor.
|
static |
Definition at line 1324 of file GHOST_WindowWayland.cc.
|
staticconstexpr |
Definition at line 99 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::getDPIHint().
|
static |
Definition at line 1384 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1673 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1625 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1248 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1600 of file GHOST_WindowWayland.cc.
|
static |
Definition at line 1726 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1406 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1367 of file GHOST_WindowWayland.cc.
Referenced by xdg_activation_listener_get().
|
static |
Definition at line 1661 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1613 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
|
static |
Definition at line 1334 of file GHOST_WindowWayland.cc.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().