Blender V4.3
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)
 
GHOST_TSuccess removeTimer (GHOST_ITimerTask *timerTask)
 
GHOST_TSuccess disposeWindow (GHOST_IWindow *window)
 
bool validWindow (GHOST_IWindow *window)
 
GHOST_TSuccess beginFullScreen (const GHOST_DisplaySetting &setting, GHOST_IWindow **window, const bool stereoVisual)
 
GHOST_TSuccess updateFullScreen (const GHOST_DisplaySetting &setting, GHOST_IWindow **window)
 
GHOST_TSuccess endFullScreen ()
 
bool getFullScreen ()
 
bool useNativePixel ()
 
void useWindowFocus (const bool use_focus)
 
void setAutoFocus (const bool auto_focus)
 
GHOST_IWindowgetWindowUnderCursor (int32_t x, int32_t y)
 
void dispatchEvents ()
 
GHOST_TSuccess addEventConsumer (GHOST_IEventConsumer *consumer)
 
GHOST_TSuccess removeEventConsumer (GHOST_IEventConsumer *consumer)
 
GHOST_TSuccess getModifierKeyState (GHOST_TModifierKey mask, bool &isDown) const
 
GHOST_TSuccess getButtonState (GHOST_TButton mask, bool &isDown) const
 
virtual void setTabletAPI (GHOST_TTabletAPI api)
 
GHOST_TTabletAPI getTabletAPI ()
 
GHOST_TSuccess getPixelAtCursor (float r_color[3]) const
 
GHOST_TSuccess pushEvent (const GHOST_IEvent *event)
 
GHOST_TimerManagergetTimerManager () const
 
GHOST_EventManagergetEventManager () const
 
GHOST_WindowManagergetWindowManager () const
 
virtual GHOST_TSuccess showMessageBox (const char *, const char *, const char *, const char *, const char *, GHOST_DialogOptions) const
 
virtual void initDebug (GHOST_Debug debug)
 
virtual bool isDebugEnabled ()
 

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
 
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 ()
 
virtual ~GHOST_System ()
 
virtual GHOST_TSuccess exit ()
 
GHOST_TSuccess createFullScreenWindow (GHOST_Window **window, const GHOST_DisplaySetting &settings, const bool stereoVisual)
 
- Protected Member Functions inherited from GHOST_ISystem
 GHOST_ISystem ()
 
virtual ~GHOST_ISystem ()
 
- Protected Attributes inherited from GHOST_System
GHOST_DisplayManagerm_displayManager
 
GHOST_TimerManagerm_timerManager
 
GHOST_WindowManagerm_windowManager
 
GHOST_EventManagerm_eventManager
 
GHOST_DisplaySetting m_preFullScreenSetting
 
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 143 of file GHOST_SystemWayland.hh.

Constructor & Destructor Documentation

◆ GHOST_SystemWayland() [1/2]

◆ GHOST_SystemWayland() [2/2]

GHOST_SystemWayland::GHOST_SystemWayland ( )
inline

Definition at line 146 of file GHOST_SystemWayland.hh.

◆ ~GHOST_SystemWayland()

GHOST_SystemWayland::~GHOST_SystemWayland ( )
override

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

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

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

◆ cursor_shape_custom_set()

GHOST_TSuccess GHOST_SystemWayland::cursor_shape_custom_set ( const uint8_t * bitmap,
const uint8_t * mask,
int sizex,
int sizey,
int hotX,
int hotY,
bool canInvertColor )

◆ 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 8367 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 8251 of file GHOST_SystemWayland.cc.

References ELEM, INT32_MAX, INT32_MIN, GWL_Display::outputs, 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 7697 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()

GHOST_TCapabilityFlag GHOST_SystemWayland::getCapabilities ( ) const
overridevirtual

◆ 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 7831 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 7952 of file GHOST_SystemWayland.cc.

References ImBuf::byte_buffer, ImBufByteBuffer::data, GWL_Seat::data_offer_copy_paste, GWL_Seat::data_offer_copy_paste_mutex, GWL_Display::display, free(), ghost_wl_mime_img_png, gwl_display_seat_active_get(), IB_rect, IMB_freeImBuf(), IMB_ibImageFromMemory(), mutex, read_buffer_from_data_offer(), server_mutex, GWL_DataOffer::types, UNLIKELY, GWL_Display::wl, wl_display_roundtrip, 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 8191 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, and wl_surface.

◆ 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 8155 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, and GWL_SeatStatePointer::wl.

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

References ELEM, GWL_Display::outputs, server_mutex, and UNPACK2.

◆ getMilliSeconds()

uint64_t GHOST_SystemWayland::getMilliSeconds ( ) const
overridevirtual

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

References GWL_Display::outputs, and 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 8907 of file GHOST_SystemWayland.cc.

References GWL_Display::ghost_timer_manager.

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

◆ hasClipboardImage()

GHOST_TSuccess GHOST_SystemWayland::hasClipboardImage ( void ) const
overridevirtual

Returns GHOST_kSuccess if the clipboard contains an image.

Reimplemented from GHOST_System.

Definition at line 7931 of file GHOST_SystemWayland.cc.

References GWL_Seat::data_offer_copy_paste, GHOST_kFailure, GHOST_kSuccess, ghost_wl_mime_img_png, gwl_display_seat_active_get(), server_mutex, GWL_DataOffer::types, and UNLIKELY.

◆ 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

◆ ime_end()

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

◆ init()

GHOST_TSuccess GHOST_SystemWayland::init ( )
overridevirtual

Initialize the system.

Returns
Indication of success.

Reimplemented from GHOST_System.

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

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

◆ outputs_get()

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

Definition at line 8896 of file GHOST_SystemWayland.cc.

References GWL_Display::outputs.

Referenced by GHOST_WindowWayland::GHOST_WindowWayland().

◆ 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 7915 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 7605 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 8213 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, and wl_surface.

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

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

◆ setMultitouchGestures()

void GHOST_SystemWayland::setMultitouchGestures ( const bool use)
overridevirtual

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

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

Referenced by GHOST_WindowWayland::~GHOST_WindowWayland().

◆ wl_compositor_get()

wl_compositor * GHOST_SystemWayland::wl_compositor_get ( )

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

◆ wp_fractional_scale_manager_get()

wp_fractional_scale_manager_v1 * GHOST_SystemWayland::wp_fractional_scale_manager_get ( )

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

◆ wp_viewporter_get()

wp_viewporter * GHOST_SystemWayland::wp_viewporter_get ( )

Definition at line 8845 of file GHOST_SystemWayland.cc.

References GWL_Display::viewporter, and GWL_Display::wp.

Referenced by gwl_window_viewport_set().

◆ xdg_activation_manager_get()

xdg_activation_v1 * GHOST_SystemWayland::xdg_activation_manager_get ( )

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

◆ xdg_decor_shell_get()

xdg_wm_base * GHOST_SystemWayland::xdg_decor_shell_get ( )

Member Data Documentation

◆ has_pending_actions_for_window

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

Definition at line 354 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 350 of file GHOST_SystemWayland.hh.

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


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