Blender V4.5
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 timerProc, GHOST_TUserDataPtr userData=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 &isDown) const override
GHOST_TSuccess getButtonState (GHOST_TButton mask, bool &isDown) const override
void setTabletAPI (GHOST_TTabletAPI api) override
GHOST_TTabletAPI getTabletAPI ()
GHOST_TSuccess getPixelAtCursor (float r_color[3]) const override
GHOST_TSuccess pushEvent (const GHOST_IEvent *event)
GHOST_TimerManagergetTimerManager () const
GHOST_EventManagergetEventManager () const
GHOST_WindowManagergetWindowManager () const
GHOST_TSuccess showMessageBox (const char *, const char *, const char *, const char *, const char *, GHOST_DialogOptions) const override
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 m_nativePixel
bool m_windowFocus
bool m_autoFocus

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 gpuSettings) 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 gpuSettings, const bool exclusive, const bool is_dialog, const GHOST_IWindow *parentWindow) 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 cursorShape)
GHOST_TSuccess cursor_shape_custom_set (const uint8_t *bitmap, const uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor)
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
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)
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_TimerManagerm_timerManager
GHOST_WindowManagerm_windowManager
GHOST_EventManagerm_eventManager
bool m_multitouchGestures
GHOST_TTabletAPI m_tabletAPI
bool m_is_debug_enabled
Static Protected Attributes inherited from GHOST_ISystem
static GHOST_ISystemm_system = nullptr
static const char * m_system_backend_id = nullptr
static GHOST_TBacktraceFn m_backtrace_fn = nullptr

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 7572 of file GHOST_SystemWayland.cc.

Member Function Documentation

◆ createOffscreenContext()

GHOST_IContext * GHOST_SystemWayland::createOffscreenContext ( GHOST_GPUSettings gpuSettings)
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 gpuSettings,
const bool exclusive,
const bool is_dialog,
const GHOST_IWindow * parentWindow )
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.
gpuSettingsMisc 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.
parentWindowParent (embedder) window
Returns
The new window (or 0 if creation failed).

Implements GHOST_ISystem.

Definition at line 8544 of file GHOST_SystemWayland.cc.

References GHOST_GPUSettings::context_type, GHOST_GPUSettings::flags, getMilliSeconds(), GHOST_WindowWayland::getValid(), GHOST_gpuDebugContext, GHOST_gpuStereoVisual, GHOST_kEventWindowSize, left, GHOST_System::m_windowManager, GHOST_GPUSettings::preferred_device, pushEvent, state, and top.

◆ 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 cursorShape)

◆ 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 8503 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 8387 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 7786 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

Returns the selection buffer

Parameters
selectionOnly used on X11.
Returns
Returns the clipboard data

Implements GHOST_System.

Definition at line 7944 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 8094 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 8318 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 8282 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 8360 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 8369 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 8213 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 8204 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 9088 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 7577 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 9340 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 9077 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 8030 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 7694 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 8340 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 8302 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 8905 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::m_multitouchGestures, and server_mutex.

◆ 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 9315 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

◆ wp_fractional_scale_manager_get()

wp_fractional_scale_manager_v1 * GHOST_SystemWayland::wp_fractional_scale_manager_get ( )

Definition at line 9022 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 9012 of file GHOST_SystemWayland.cc.

◆ wp_viewporter_get()

wp_viewporter * GHOST_SystemWayland::wp_viewporter_get ( )

Definition at line 9026 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 9017 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 9070 of file GHOST_SystemWayland.cc.

◆ xdg_decor_shell_get()

xdg_wm_base * GHOST_SystemWayland::xdg_decor_shell_get ( )

Definition at line 9065 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 362 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 358 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: