Blender V5.0
GHOST_SystemWayland Class Reference

#include <GHOST_SystemWayland.hh>

Inherits GHOST_System.

Public Member Functions

 GHOST_SystemWayland ()
void ime_begin (const GHOST_WindowWayland *win, int32_t x, int32_t y, int32_t w, int32_t h, bool completed) const
void ime_end (const GHOST_WindowWayland *win) const
Public WAYLAND Utility Functions

Functionality only used for the WAYLAND implementation.

uint64_t ms_from_input_time (const uint32_t timestamp_as_uint)
GHOST_TSuccess pushEvent_maybe_pending (const GHOST_IEvent *event)
void seat_active_set (const struct GWL_Seat *seat)
struct wl_seat * wl_seat_active_get_with_input_serial (uint32_t &serial)
bool output_unref (struct wl_output *wl_output)
void output_scale_update (GWL_Output *output)
bool window_surface_unref (const wl_surface *wl_surface)
bool window_cursor_grab_set (const GHOST_TGrabCursorMode mode, const GHOST_TGrabCursorMode mode_current, int32_t init_grab_xy[2], const GHOST_Rect *wrap_bounds, GHOST_TAxisFlag wrap_axis, wl_surface *wl_surface, const struct GWL_WindowScaleParams &scale_params)
Public Member Functions inherited from GHOST_System
GHOST_ITimerTaskinstallTimer (uint64_t delay, uint64_t interval, GHOST_TimerProcPtr timer_proc, GHOST_TUserDataPtr user_data=nullptr) override
GHOST_TSuccess removeTimer (GHOST_ITimerTask *timerTask) override
GHOST_TSuccess disposeWindow (GHOST_IWindow *window) override
bool validWindow (GHOST_IWindow *window) override
bool useNativePixel () override
void useWindowFocus (const bool use_focus) override
void setAutoFocus (const bool auto_focus) override
GHOST_IWindowgetWindowUnderCursor (int32_t x, int32_t y) override
void dispatchEvents () override
GHOST_TSuccess addEventConsumer (GHOST_IEventConsumer *consumer) override
GHOST_TSuccess removeEventConsumer (GHOST_IEventConsumer *consumer) override
GHOST_TSuccess getModifierKeyState (GHOST_TModifierKey mask, bool &is_down) const override
GHOST_TSuccess getButtonState (GHOST_TButton mask, bool &is_down) const override
void setTabletAPI (GHOST_TTabletAPI api) override
GHOST_TTabletAPI getTabletAPI ()
GHOST_TSuccess getPixelAtCursor (float r_color[3]) const override
GHOST_TSuccess showMessageBox (const char *, const char *, const char *, const char *, const char *, GHOST_DialogOptions) const override
GHOST_TSuccess pushEvent (const GHOST_IEvent *event)
GHOST_TimerManagergetTimerManager () const
GHOST_EventManagergetEventManager () const
GHOST_WindowManagergetWindowManager () const
void initDebug (GHOST_Debug debug) override
bool isDebugEnabled () override

Public Attributes

std::mutex * server_mutex = nullptr
std::mutex * timer_mutex = nullptr
std::thread::id main_thread_id
std::atomic< bool > has_pending_actions_for_window = false
Public Attributes inherited from GHOST_System
bool native_pixel_
bool window_focus_
bool auto_focus_

GHOST Implementation

WAYLAND specific implementation of the GHOST_System interface.

 GHOST_SystemWayland (bool background)
 ~GHOST_SystemWayland () override
GHOST_TSuccess init () override
bool processEvents (bool waitForEvent) override
bool setConsoleWindowState (GHOST_TConsoleWindowState action) override
GHOST_TSuccess getModifierKeys (GHOST_ModifierKeys &keys) const override
GHOST_TSuccess getButtons (GHOST_Buttons &buttons) const override
char * getClipboard (bool selection) const override
void putClipboard (const char *buffer, bool selection) const override
GHOST_TSuccess hasClipboardImage () const override
uintgetClipboardImage (int *r_width, int *r_height) const override
GHOST_TSuccess putClipboardImage (uint *rgba, int width, int height) const override
uint8_t getNumDisplays () const override
uint64_t getMilliSeconds () const override
GHOST_TSuccess getCursorPositionClientRelative (const GHOST_IWindow *window, int32_t &x, int32_t &y) const override
GHOST_TSuccess setCursorPositionClientRelative (GHOST_IWindow *window, int32_t x, int32_t y) override
GHOST_TSuccess getCursorPosition (int32_t &x, int32_t &y) const override
GHOST_TSuccess setCursorPosition (int32_t x, int32_t y) override
uint32_t getCursorPreferredLogicalSize () const override
void getMainDisplayDimensions (uint32_t &width, uint32_t &height) const override
void getAllDisplayDimensions (uint32_t &width, uint32_t &height) const override
GHOST_IContextcreateOffscreenContext (GHOST_GPUSettings gpu_settings) override
GHOST_TSuccess disposeContext (GHOST_IContext *context) override
GHOST_IWindowcreateWindow (const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_GPUSettings gpu_settings, const bool exclusive, const bool is_dialog, const GHOST_IWindow *parent_window) override
GHOST_TCapabilityFlag getCapabilities () const override
void setMultitouchGestures (const bool use) override
GHOST_TSuccess cursor_shape_set (GHOST_TStandardCursor shape)
GHOST_TSuccess cursor_shape_check (GHOST_TStandardCursor cursor_shape)
GHOST_TSuccess cursor_shape_custom_set (const GHOST_CursorGenerator &cg)
GHOST_TSuccess cursor_bitmap_get (GHOST_CursorBitmapRef *bitmap)
GHOST_TSuccess cursor_visibility_set (bool visible)
bool cursor_grab_use_software_display_get (const GHOST_TGrabCursorMode mode)

Public WAYLAND Direct Data Access

Expose some members via methods.

GHOST_TimerManagerghost_timer_manager ()
struct wl_displaywl_display_get ()
struct wl_compositor * wl_compositor_get ()
struct zwp_primary_selection_device_manager_v1 * wp_primary_selection_manager_get ()
struct xdg_activation_v1 * xdg_activation_manager_get ()
struct zwp_pointer_gestures_v1 * wp_pointer_gestures_get ()
struct wp_fractional_scale_manager_v1 * wp_fractional_scale_manager_get ()
struct wp_viewporter * wp_viewporter_get ()
struct xdg_wm_base * xdg_decor_shell_get ()
struct zxdg_decoration_manager_v1 * xdg_decor_manager_get ()
const std::vector< GWL_Output * > & outputs_get () const
struct wl_shm * wl_shm_get () const
bool use_window_frame_get ()
static const char * xdg_app_id_get ()

Additional Inherited Members

Static Public Member Functions inherited from GHOST_ISystem
static GHOST_TSuccess createSystem (bool verbose, bool background)
static GHOST_TSuccess createSystemBackground ()
static GHOST_TSuccess disposeSystem ()
static GHOST_ISystemgetSystem ()
static const char * getSystemBackend ()
static GHOST_TBacktraceFn getBacktraceFn ()
static void setBacktraceFn (GHOST_TBacktraceFn backtrace_fn)
static bool getUseWindowFrame ()
static void setUseWindowFrame (bool use_window_frame)
Protected Member Functions inherited from GHOST_System
 GHOST_System ()
 ~GHOST_System () override
GHOST_TSuccess exit () override
Protected Member Functions inherited from GHOST_ISystem
 GHOST_ISystem ()
virtual ~GHOST_ISystem ()=default
Protected Attributes inherited from GHOST_System
GHOST_TimerManagertimer_manager_
GHOST_WindowManagerwindow_manager_
GHOST_EventManagerevent_manager_
bool multitouch_gestures_
GHOST_TTabletAPI tablet_api_
bool is_debug_enabled_
Static Protected Attributes inherited from GHOST_ISystem
static GHOST_ISystemsystem_ = nullptr
static const char * system_backend_id_ = nullptr
static GHOST_TBacktraceFn backtrace_fn_ = nullptr
static bool use_window_frame_ = true

Detailed Description

Definition at line 149 of file GHOST_SystemWayland.hh.

Constructor & Destructor Documentation

◆ GHOST_SystemWayland() [1/2]

◆ GHOST_SystemWayland() [2/2]

GHOST_SystemWayland::GHOST_SystemWayland ( )
inline

Definition at line 152 of file GHOST_SystemWayland.hh.

References GHOST_SystemWayland(), and true.

◆ ~GHOST_SystemWayland()

GHOST_SystemWayland::~GHOST_SystemWayland ( )
override

Definition at line 7759 of file GHOST_SystemWayland.cc.

Member Function Documentation

◆ createOffscreenContext()

GHOST_IContext * GHOST_SystemWayland::createOffscreenContext ( GHOST_GPUSettings gpu_settings)
overridevirtual

◆ createWindow()

GHOST_IWindow * GHOST_SystemWayland::createWindow ( const char * title,
int32_t left,
int32_t top,
uint32_t width,
uint32_t height,
GHOST_TWindowState state,
GHOST_GPUSettings gpu_settings,
const bool exclusive,
const bool is_dialog,
const GHOST_IWindow * parent_window )
overridevirtual

Create a new window. The new window is added to the list of windows managed. Never explicitly delete the window, use disposeWindow() instead.

Parameters
titleThe name of the window (displayed in the title bar of the window if the OS supports it).
leftThe coordinate of the left edge of the window.
topThe coordinate of the top edge of the window.
widthThe width the window.
heightThe height the window.
stateThe state of the window when opened.
gpu_settingsMisc GPU settings.
exclusiveUse to show the window on top and ignore others (used full-screen).
is_dialogStay on top of parent window, no icon in taskbar, can't be minimized.
parent_windowParent (embedder) window
Returns
The new window (or 0 if creation failed).

Implements GHOST_ISystem.

Definition at line 8757 of file GHOST_SystemWayland.cc.

References GHOST_GPUSettings::context_type, getMilliSeconds(), GHOST_WindowWayland::getValid(), GHOST_CONTEXT_PARAMS_FROM_GPU_SETTINGS, GHOST_kEventWindowSize, left, GHOST_GPUSettings::preferred_device, pushEvent, state, top, and GHOST_System::window_manager_.

◆ cursor_bitmap_get()

◆ cursor_grab_use_software_display_get()

bool GHOST_SystemWayland::cursor_grab_use_software_display_get ( const GHOST_TGrabCursorMode mode)

◆ cursor_shape_check()

GHOST_TSuccess GHOST_SystemWayland::cursor_shape_check ( GHOST_TStandardCursor cursor_shape)

◆ cursor_shape_custom_set()

◆ cursor_shape_set()

◆ cursor_visibility_set()

◆ disposeContext()

GHOST_TSuccess GHOST_SystemWayland::disposeContext ( GHOST_IContext * context)
overridevirtual

Dispose of a context.

Parameters
contextPointer to the context to be disposed.
Returns
Indication of success.

Implements GHOST_ISystem.

Definition at line 8716 of file GHOST_SystemWayland.cc.

References GHOST_kDrawingContextTypeNone, GHOST_kSuccess, server_mutex, wl_egl_window_destroy, and wl_surface.

◆ getAllDisplayDimensions()

void GHOST_SystemWayland::getAllDisplayDimensions ( uint32_t & width,
uint32_t & height ) const
overridevirtual

Returns the combine dimensions of all monitors.

Returns
The dimension of the workspace.

Implements GHOST_ISystem.

Definition at line 8599 of file GHOST_SystemWayland.cc.

References INT32_MAX, INT32_MIN, output, server_mutex, UNPACK2, and xy.

◆ getButtons()

GHOST_TSuccess GHOST_SystemWayland::getButtons ( GHOST_Buttons & buttons) const
overridevirtual

Returns the state of the mouse buttons (outside the message queue).

Parameters
buttonsThe state of the buttons.
Returns
Indication of success.

Implements GHOST_System.

Definition at line 7973 of file GHOST_SystemWayland.cc.

References GWL_SeatStatePointer::buttons, GHOST_kFailure, GHOST_kSuccess, gwl_display_seat_active_get(), gwl_seat_state_pointer_active(), server_mutex, and UNLIKELY.

◆ getCapabilities()

◆ getClipboard()

char * GHOST_SystemWayland::getClipboard ( bool selection) const
overridevirtual

Return the clipboard buffer or null.

Parameters
selectionUse the "primary" selection. Check the GHOST_kCapabilityClipboardPrimary for backends that support this.
Returns
Returns the clipboard data as a null terminated string or null when unavailable.

Implements GHOST_System.

Definition at line 8131 of file GHOST_SystemWayland.cc.

References data, server_mutex, system_clipboard_get(), and system_clipboard_get_primary_selection().

◆ getClipboardImage()

uint * GHOST_SystemWayland::getClipboardImage ( int * r_width,
int * r_height ) const
overridevirtual

Get image data from the Clipboard

Parameters
r_widththe returned image width in pixels.
r_heightthe returned image height in pixels.
Returns
pointer uint array in RGBA byte order. Caller must free.

Reimplemented from GHOST_System.

Definition at line 8281 of file GHOST_SystemWayland.cc.

References ImBuf::byte_buffer, data, ImBufByteBuffer::data, GWL_Seat::data_offer_copy_paste, free(), GHOST_URL_decode_alloc(), ghost_wl_mime_img_png, ghost_wl_mime_text_uri_list, gwl_clipboard_uri_ranges(), gwl_display_seat_active_get(), IB_byte_data, IMB_freeImBuf(), IMB_load_image_from_filepath(), IMB_load_image_from_memory(), server_mutex, system_clipboard_get(), GWL_DataOffer::types, UNLIKELY, ImBuf::x, and ImBuf::y.

◆ getCursorPosition()

GHOST_TSuccess GHOST_SystemWayland::getCursorPosition ( int32_t & x,
int32_t & y ) const
overridevirtual

Returns the current location of the cursor (location in screen coordinates)

Parameters
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns
Indication of success.

Implements GHOST_ISystem.

Definition at line 8527 of file GHOST_SystemWayland.cc.

References getCursorPositionClientRelative_impl(), GHOST_kFailure, ghost_wl_surface_user_data(), gwl_display_seat_active_get(), gwl_seat_state_pointer_active(), server_mutex, GWL_SeatStatePointer::surface_window, UNLIKELY, GWL_SeatStatePointer::wl, wl_surface, x, and y.

◆ getCursorPositionClientRelative()

GHOST_TSuccess GHOST_SystemWayland::getCursorPositionClientRelative ( const GHOST_IWindow * window,
int32_t & x,
int32_t & y ) const
overridevirtual

Returns the current location of the cursor (location in window coordinates)

Parameters
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns
Indication of success.

Reimplemented from GHOST_System.

Definition at line 8491 of file GHOST_SystemWayland.cc.

References getCursorPositionClientRelative_impl(), GHOST_kFailure, gwl_display_seat_active_get(), gwl_seat_state_pointer_active(), server_mutex, GWL_SeatStatePointer::surface_window, UNLIKELY, GWL_SeatStatePointer::wl, x, and y.

◆ getCursorPreferredLogicalSize()

uint32_t GHOST_SystemWayland::getCursorPreferredLogicalSize ( ) const
overridevirtual

Returns
the size of the cursor in logical pixels (before Hi-DPI scaling is applied).

Reimplemented from GHOST_System.

Definition at line 8572 of file GHOST_SystemWayland.cc.

References GWL_Seat::cursor, gwl_display_seat_active_get(), server_mutex, and GWL_Cursor::theme_size.

◆ getMainDisplayDimensions()

void GHOST_SystemWayland::getMainDisplayDimensions ( uint32_t & width,
uint32_t & height ) const
overridevirtual

Returns the dimensions of the main display on this system.

Returns
The dimension of the main display.

Implements GHOST_ISystem.

Definition at line 8581 of file GHOST_SystemWayland.cc.

References output, server_mutex, and UNPACK2.

◆ getMilliSeconds()

uint64_t GHOST_SystemWayland::getMilliSeconds ( ) const
overridevirtual

Returns the system time. Returns the number of milliseconds since the start of the system.

Note
The exact method used is platform dependent however monotonic methods should be used instead of wall-clock time.
Returns
The number of milliseconds.

Implements GHOST_ISystem.

Definition at line 8400 of file GHOST_SystemWayland.cc.

Referenced by createWindow(), data_device_handle_drop(), data_device_handle_enter(), data_device_handle_leave(), gwl_seat_key_repeat_timer_add(), gwl_window_frame_update_from_pending_no_lock(), keyboard_handle_enter(), ms_from_input_time(), pointer_handle_enter(), pointer_handle_frame(), processEvents(), setCursorPositionClientRelative_impl(), and window_cursor_grab_set().

◆ getModifierKeys()

◆ getNumDisplays()

uint8_t GHOST_SystemWayland::getNumDisplays ( ) const
overridevirtual

Returns the number of displays on this system.

Returns
The number of displays.

Implements GHOST_ISystem.

Definition at line 8391 of file GHOST_SystemWayland.cc.

References server_mutex.

◆ ghost_timer_manager()

GHOST_TimerManager * GHOST_SystemWayland::ghost_timer_manager ( )

Return a separate WAYLAND local timer manager to GHOST_System::getTimerManager Manipulation & access must lock with #GHOST_WaylandSystem::server_mutex.

See GWL_Display::ghost_timer_manager doc-string for details on why this is needed.

Definition at line 9391 of file GHOST_SystemWayland.cc.

Referenced by gwl_seat_key_repeat_timer_add(), gwl_seat_key_repeat_timer_remove(), and processEvents().

◆ hasClipboardImage()

◆ ime_begin()

void GHOST_SystemWayland::ime_begin ( const GHOST_WindowWayland * win,
int32_t x,
int32_t y,
int32_t w,
int32_t h,
bool completed ) const

References w(), x, and y.

◆ ime_end()

void GHOST_SystemWayland::ime_end ( const GHOST_WindowWayland * win) const

References output, and wl_surface.

◆ init()

GHOST_TSuccess GHOST_SystemWayland::init ( )
overridevirtual

Initialize the system.

Returns
Indication of success.

Reimplemented from GHOST_System.

Definition at line 7764 of file GHOST_SystemWayland.cc.

References GHOST_kFailure, GHOST_kSuccess, and GHOST_System::init().

◆ ms_from_input_time()

uint64_t GHOST_SystemWayland::ms_from_input_time ( const uint32_t timestamp_as_uint)

◆ output_scale_update()

◆ output_unref()

bool GHOST_SystemWayland::output_unref ( struct wl_output * wl_output)

Clear all references to this output.

Note
The compositor should have already called the wl_surface_listener.leave callback, however some compositors may not (see #103586). So remove references to the output before it's destroyed to avoid crashing.
Returns
true when any references were removed.

Definition at line 9648 of file GHOST_SystemWayland.cc.

References GHOST_System::getWindowManager(), GHOST_WindowManager::getWindows(), ghost_wl_output_own(), ghost_wl_output_user_data(), output, GWL_SeatStatePointer::outputs, GHOST_WindowWayland::outputs_changed_update_scale_tag(), GHOST_WindowWayland::outputs_leave(), GWL_Seat::pointer, and GWL_Seat::tablet.

◆ outputs_get()

const std::vector< GWL_Output * > & GHOST_SystemWayland::outputs_get ( ) const

Definition at line 9380 of file GHOST_SystemWayland.cc.

◆ processEvents()

◆ pushEvent_maybe_pending()

◆ putClipboard()

void GHOST_SystemWayland::putClipboard ( const char * buffer,
bool selection ) const
overridevirtual

Put data to the Clipboard

Parameters
bufferThe buffer to copy to the clipboard.
selectionThe clipboard to copy too only used on X11.

Implements GHOST_System.

Definition at line 8217 of file GHOST_SystemWayland.cc.

References server_mutex, system_clipboard_put(), and system_clipboard_put_primary_selection().

◆ putClipboardImage()

◆ seat_active_set()

void GHOST_SystemWayland::seat_active_set ( const struct GWL_Seat * seat)

◆ setConsoleWindowState()

bool GHOST_SystemWayland::setConsoleWindowState ( GHOST_TConsoleWindowState action)
overridevirtual

Set the Console State

Parameters
actionconsole state
Returns
current status (true: visible, 0: hidden)

Implements GHOST_ISystem.

Definition at line 7881 of file GHOST_SystemWayland.cc.

◆ setCursorPosition()

GHOST_TSuccess GHOST_SystemWayland::setCursorPosition ( int32_t x,
int32_t y )
overridevirtual

Updates the location of the cursor (location in screen coordinates). Not all operating systems allow the cursor to be moved (without the input device being moved).

Parameters
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns
Indication of success.

Implements GHOST_ISystem.

Definition at line 8549 of file GHOST_SystemWayland.cc.

References GHOST_kFailure, ghost_wl_surface_user_data(), gwl_display_seat_active_get(), GWL_Seat::pointer, server_mutex, setCursorPositionClientRelative_impl(), UNLIKELY, wl_surface, x, and y.

◆ setCursorPositionClientRelative()

GHOST_TSuccess GHOST_SystemWayland::setCursorPositionClientRelative ( GHOST_IWindow * window,
int32_t x,
int32_t y )
overridevirtual

Updates the location of the cursor (location in window coordinates).

Parameters
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns
Indication of success.

Reimplemented from GHOST_System.

Definition at line 8511 of file GHOST_SystemWayland.cc.

References GHOST_kFailure, gwl_display_seat_active_get(), server_mutex, setCursorPositionClientRelative_impl(), UNLIKELY, x, and y.

◆ setMultitouchGestures()

void GHOST_SystemWayland::setMultitouchGestures ( const bool use)
overridevirtual

Enable multi-touch gestures if supported.

Parameters
useEnable or disable.

Reimplemented from GHOST_System.

Definition at line 9208 of file GHOST_SystemWayland.cc.

References gwl_seat_capability_pointer_multitouch_check(), gwl_seat_capability_pointer_multitouch_disable(), gwl_seat_capability_pointer_multitouch_enable(), GHOST_System::multitouch_gestures_, and server_mutex.

◆ use_window_frame_get()

bool GHOST_SystemWayland::use_window_frame_get ( )

Definition at line 9397 of file GHOST_SystemWayland.cc.

◆ window_cursor_grab_set()

◆ window_surface_unref()

bool GHOST_SystemWayland::window_surface_unref ( const wl_surface * wl_surface)

Clear all references to this surface to prevent accessing nullptr pointers.

Returns
true when any references were removed.

Definition at line 9623 of file GHOST_SystemWayland.cc.

References GWL_Seat::keyboard, GWL_Seat::pointer, SURFACE_CLEAR_PTR, GWL_SeatStatePointer::surface_window, GWL_Seat::surface_window_focus_dnd, GWL_Seat::tablet, GWL_Seat::wl, GWL_SeatStatePointer::wl, and wl_surface.

◆ wl_compositor_get()

wl_compositor * GHOST_SystemWayland::wl_compositor_get ( )

◆ wl_display_get()

wl_display * GHOST_SystemWayland::wl_display_get ( )

◆ wl_seat_active_get_with_input_serial()

wl_seat * GHOST_SystemWayland::wl_seat_active_get_with_input_serial ( uint32_t & serial)

◆ wl_shm_get()

wl_shm * GHOST_SystemWayland::wl_shm_get ( ) const

Definition at line 9385 of file GHOST_SystemWayland.cc.

◆ wp_fractional_scale_manager_get()

wp_fractional_scale_manager_v1 * GHOST_SystemWayland::wp_fractional_scale_manager_get ( )

Definition at line 9325 of file GHOST_SystemWayland.cc.

Referenced by GHOST_WindowWayland::GHOST_WindowWayland().

◆ wp_pointer_gestures_get()

zwp_pointer_gestures_v1 * GHOST_SystemWayland::wp_pointer_gestures_get ( )

◆ wp_primary_selection_manager_get()

zwp_primary_selection_device_manager_v1 * GHOST_SystemWayland::wp_primary_selection_manager_get ( )

Definition at line 9315 of file GHOST_SystemWayland.cc.

◆ wp_viewporter_get()

wp_viewporter * GHOST_SystemWayland::wp_viewporter_get ( )

Definition at line 9329 of file GHOST_SystemWayland.cc.

Referenced by gwl_window_viewport_set().

◆ xdg_activation_manager_get()

xdg_activation_v1 * GHOST_SystemWayland::xdg_activation_manager_get ( )

Definition at line 9320 of file GHOST_SystemWayland.cc.

Referenced by gwl_window_activate(), and xdg_activation_handle_done().

◆ xdg_app_id_get()

const char * GHOST_SystemWayland::xdg_app_id_get ( )
static

◆ xdg_decor_manager_get()

zxdg_decoration_manager_v1 * GHOST_SystemWayland::xdg_decor_manager_get ( )

Definition at line 9373 of file GHOST_SystemWayland.cc.

◆ xdg_decor_shell_get()

xdg_wm_base * GHOST_SystemWayland::xdg_decor_shell_get ( )

Definition at line 9368 of file GHOST_SystemWayland.cc.

References GWL_XDG_Decor_System::shell, and GWL_Display::xdg_decor.

Member Data Documentation

◆ has_pending_actions_for_window

std::atomic<bool> GHOST_SystemWayland::has_pending_actions_for_window = false

Definition at line 358 of file GHOST_SystemWayland.hh.

Referenced by gwl_window_pending_actions_tag(), and processEvents().

◆ main_thread_id

◆ server_mutex

◆ timer_mutex

std::mutex* GHOST_SystemWayland::timer_mutex = nullptr

Threads must lock this before manipulating GWL_Display::ghost_timer_manager.

Note
Using a separate lock to server_mutex is necessary because the server lock is already held when calling ghost_wl_display_event_pump. If manipulating the timer used the server_mutex, event pump can indirectly handle key up/down events which would lock server_mutex causing a dead-lock.

Definition at line 354 of file GHOST_SystemWayland.hh.

Referenced by GHOST_SystemWayland(), gwl_seat_capability_keyboard_disable(), keyboard_handle_enter(), keyboard_handle_key(), keyboard_handle_leave(), keyboard_handle_modifiers(), and keyboard_handle_repeat_info().


The documentation for this class was generated from the following files: