|
Blender V4.3
|
#include <GHOST_SystemWayland.hh>
Inherits GHOST_System.
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 |
Public WAYLAND Direct Data Access | |
Expose some members via methods. | |
| GHOST_TimerManager * | ghost_timer_manager () |
| struct wl_display * | wl_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 () |
Definition at line 143 of file GHOST_SystemWayland.hh.
| GHOST_SystemWayland::GHOST_SystemWayland | ( | bool | background | ) |
Definition at line 7351 of file GHOST_SystemWayland.cc.
References GWL_Display::display, GWL_Display::ghost_timer_manager, ghost_wayland_log_handler(), ghost_wayland_log_handler_is_background, gwl_display_event_thread_create(), gwl_registry_entry_update_all(), gwl_xdg_decor_system_destroy(), libdecor_new, GWL_Display::registry, registry_listener, GWL_Display::registry_skip_update_all, GWL_XDG_Decor_System::shell, GWL_Display::system, GWL_Display::wl, wl_display_connect, wl_display_roundtrip, wl_log_set_handler_client, and GWL_Display::xdg_decor.
|
inline |
Definition at line 146 of file GHOST_SystemWayland.hh.
|
override |
Definition at line 7483 of file GHOST_SystemWayland.cc.
|
overridevirtual |
Create a new off-screen context. Never explicitly delete the context, use disposeContext() instead.
Implements GHOST_System.
Definition at line 8281 of file GHOST_SystemWayland.cc.
References GHOST_GPUSettings::context_type, GWL_Display::display, GHOST_GPUSettings::flags, GHOST_gpuDebugContext, GHOST_OPENGL_EGL_CONTEXT_FLAGS, GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY, GHOST_PRINT, GHOST_GPUSettings::preferred_device, server_mutex, GWL_Display::wl, wl_compositor_get(), wl_egl_window_create, wl_egl_window_destroy, and wl_surface.
|
overridevirtual |
Create a new window. The new window is added to the list of windows managed. Never explicitly delete the window, use disposeWindow() instead.
| title | The name of the window (displayed in the title bar of the window if the OS supports it). |
| left | The coordinate of the left edge of the window. |
| top | The coordinate of the top edge of the window. |
| width | The width the window. |
| height | The height the window. |
| state | The state of the window when opened. |
| gpuSettings | Misc GPU settings. |
| exclusive | Use to show the window on top and ignore others (used full-screen). |
| is_dialog | Stay on top of parent window, no icon in taskbar, can't be minimized. |
| parentWindow | Parent (embedder) window |
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.
| GHOST_TSuccess GHOST_SystemWayland::cursor_bitmap_get | ( | GHOST_CursorBitmapRef * | bitmap | ) |
Definition at line 8596 of file GHOST_SystemWayland.cc.
References GWL_Seat::cursor, GHOST_CursorBitmapRef::data, GHOST_CursorBitmapRef::data_size, GHOST_kFailure, GHOST_kSuccess, gwl_display_seat_active_get(), GHOST_CursorBitmapRef::hot_spot, and UNLIKELY.
Referenced by GHOST_WindowWayland::getCursorBitmap().
| bool GHOST_SystemWayland::cursor_grab_use_software_display_get | ( | const GHOST_TGrabCursorMode | mode | ) |
Definition at line 8670 of file GHOST_SystemWayland.cc.
References cursor_is_software(), gwl_display_seat_active_get(), UNLIKELY, and GWL_Seat::use_pointer_software_confine.
Referenced by GHOST_WindowWayland::getCursorGrabUseSoftwareDisplay().
| GHOST_TSuccess GHOST_SystemWayland::cursor_shape_check | ( | GHOST_TStandardCursor | cursorShape | ) |
Definition at line 8503 of file GHOST_SystemWayland.cc.
References GHOST_kFailure, GHOST_kSuccess, gwl_display_seat_active_get(), gwl_seat_cursor_find_from_shape(), and UNLIKELY.
Referenced by GHOST_WindowWayland::hasCursorShape(), and GHOST_WindowWayland::setWindowCursorShape().
| 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 ) |
Definition at line 8518 of file GHOST_SystemWayland.cc.
References GWL_Seat::cursor, cursor_buffer_listener, GHOST_kFailure, GHOST_kSuccess, ghost_wl_buffer_create_for_image(), gwl_display_seat_active_get(), gwl_seat_cursor_buffer_set_current(), GWL_Display::shm, UNLIKELY, GWL_Display::wl, x, and y.
Referenced by gwl_window_cursor_custom_load().
| GHOST_TSuccess GHOST_SystemWayland::cursor_shape_set | ( | GHOST_TStandardCursor | shape | ) |
Definition at line 8469 of file GHOST_SystemWayland.cc.
References GWL_Seat::cursor, GHOST_kFailure, GHOST_kSuccess, gwl_display_seat_active_get(), gwl_seat_cursor_buffer_set_current(), gwl_seat_cursor_find_from_shape(), image(), UNLIKELY, and wl_cursor_image_get_buffer.
Referenced by gwl_window_cursor_shape_refresh(), GHOST_WindowWayland::setWindowCursorShape(), and GHOST_WindowWayland::setWindowCustomCursorShape().
| GHOST_TSuccess GHOST_SystemWayland::cursor_visibility_set | ( | bool | visible | ) |
Definition at line 8623 of file GHOST_SystemWayland.cc.
References GWL_Seat::cursor, CURSOR_VISIBLE_ALWAYS_SET, GHOST_kFailure, GHOST_kSuccess, gwl_display_seat_active_get(), gwl_seat_cursor_visible_set(), GWL_Cursor::is_hardware, and UNLIKELY.
Referenced by GHOST_WindowWayland::setWindowCursorVisibility().
|
overridevirtual |
Dispose of a context.
| context | Pointer to the context to be disposed. |
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.
|
overridevirtual |
Returns the combine dimensions of all monitors.
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.
|
overridevirtual |
Returns the state of the mouse buttons (outside the message queue).
| buttons | The state of the buttons. |
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.
|
overridevirtual |
Return features supported by the system back-end.
The resulting value doesn't change at run-time.
Implements GHOST_ISystem.
Definition at line 8635 of file GHOST_SystemWayland.cc.
References GHOST_ASSERT, GHOST_CAPABILITY_FLAG_ALL, GHOST_kCapabilityCursorWarp, GHOST_kCapabilityDesktopSample, GHOST_kCapabilityGPUReadFrontBuffer, GHOST_kCapabilityTrackpadPhysicalDirection, GHOST_kCapabilityWindowPosition, gwl_display_seat_active_get(), and has_wl_trackpad_physical_direction.
|
overridevirtual |
Returns the selection buffer
| selection | Only used on X11. |
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().
|
overridevirtual |
Get image data from the Clipboard
| r_width | the returned image width in pixels. |
| r_height | the returned image height in pixels. |
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.
|
overridevirtual |
Returns the current location of the cursor (location in screen coordinates)
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
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.
|
overridevirtual |
Returns the current location of the cursor (location in window coordinates)
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
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.
|
overridevirtual |
Returns the dimensions of the main display on this system.
Implements GHOST_ISystem.
Definition at line 8233 of file GHOST_SystemWayland.cc.
References ELEM, GWL_Display::outputs, server_mutex, and UNPACK2.
|
overridevirtual |
Returns the system time. Returns the number of milliseconds since the start of the system.
Implements GHOST_ISystem.
Definition at line 8086 of file GHOST_SystemWayland.cc.
Referenced by GHOST_WindowWayland::activate(), GHOST_WindowWayland::close(), createWindow(), data_device_handle_drop(), data_device_handle_enter(), data_device_handle_leave(), GHOST_WindowWayland::deactivate(), gwl_seat_key_repeat_timer_add(), gwl_window_frame_update_from_pending_no_lock(), keyboard_handle_enter(), ms_from_input_time(), GHOST_WindowWayland::notify_decor_redraw(), GHOST_WindowWayland::notify_size(), pointer_handle_enter(), pointer_handle_frame(), processEvents(), setCursorPositionClientRelative_impl(), and window_cursor_grab_set().
|
overridevirtual |
Returns the state of all modifier keys.
| keys | The state of all modifier keys (true == pressed). |
Implements GHOST_System.
Definition at line 7610 of file GHOST_SystemWayland.cc.
References CLOG_WARN, GWL_ModifierInfo::display_name, g_modifier_info_table, GHOST_KEY_MODIFIER_TO_INDEX, GHOST_kFailure, GHOST_kSuccess, gwl_display_seat_active_get(), GWL_Seat::key_depressed, GWL_ModifierInfo::key_l, GWL_ModifierInfo::key_r, GWL_Seat::keyboard, LOG_WL_KEYBOARD_DEPRESSED_STATE, MOD_INDEX_NUM, GWL_ModifierInfo::mod_l, GWL_ModifierInfo::mod_r, GWL_KeyboardDepressedState::mods, server_mutex, GHOST_ModifierKeys::set(), GWL_Seat::state, state, UNLIKELY, GWL_Seat::xkb, and GWL_Seat::xkb_keymap_mod_index.
|
overridevirtual |
Returns the number of displays on this system.
Implements GHOST_ISystem.
Definition at line 8077 of file GHOST_SystemWayland.cc.
References GWL_Display::outputs, and server_mutex.
| 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().
|
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.
| void GHOST_SystemWayland::ime_begin | ( | const GHOST_WindowWayland * | win, |
| int32_t | x, | ||
| int32_t | y, | ||
| int32_t | w, | ||
| int32_t | h, | ||
| bool | completed ) const |
| void GHOST_SystemWayland::ime_end | ( | const GHOST_WindowWayland * | win | ) | const |
|
overridevirtual |
Initialize the system.
Reimplemented from GHOST_System.
Definition at line 7488 of file GHOST_SystemWayland.cc.
References GHOST_kFailure, GHOST_kSuccess, and GHOST_System::init().
Use this function instead of GHOST_System::getMilliSeconds, passing in the time-stamp from WAYLAND input to get the event time-stamp with an offset applied to make it compatible with getMilliSeconds.
Definition at line 9046 of file GHOST_SystemWayland.cc.
References GWL_DisplayTimeStamp::exact_match, getMilliSeconds(), GWL_Display::input_timestamp, GWL_DisplayTimeStamp::last, GWL_DisplayTimeStamp::offset, sub_abs_u64(), and UNLIKELY.
Referenced by data_device_handle_motion(), keyboard_handle_key(), pointer_handle_axis(), pointer_handle_axis_stop(), pointer_handle_button(), pointer_handle_motion(), relative_pointer_handle_relative_motion(), and tablet_tool_handle_frame().
| void GHOST_SystemWayland::output_scale_update | ( | GWL_Output * | output | ) |
Definition at line 9192 of file GHOST_SystemWayland.cc.
References GWL_Seat::cursor, GHOST_System::getWindowManager(), GHOST_WindowManager::getWindows(), GWL_SeatStatePointer::outputs, GHOST_WindowWayland::outputs_changed_update_scale_tag(), GHOST_WindowWayland::outputs_get(), GWL_Seat::pointer, GWL_Display::seats, GWL_Cursor::surface_cursor, GWL_TabletTool::surface_cursor, GWL_Seat::system, GWL_Seat::tablet, GWL_Seat::tablet_tools, update_cursor_scale(), GWL_Cursor::wl, GWL_TabletTool::wl, wl_shm_get(), and GWL_Seat::wp.
| bool GHOST_SystemWayland::output_unref | ( | struct wl_output * | wl_output | ) |
Clear all references to this output.
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.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.
| 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().
|
overridevirtual |
Retrieves events from the system and stores them in the queue.
| waitForEvent | Flag to wait for an event (or return immediately). |
Implements GHOST_ISystem.
Definition at line 7504 of file GHOST_SystemWayland.cc.
References GWL_Display::display, GWL_Display::events_pending, events_pending_default_size, GWL_Display::events_pending_mutex, GHOST_System::getEventManager(), getMilliSeconds(), GHOST_System::getTimerManager(), GHOST_System::getWindowManager(), GHOST_WindowManager::getWindows(), GHOST_kEventWindowActivate, GHOST_kEventWindowDeactivate, ghost_timer_manager(), ghost_wl_display_event_pump(), ghost_wl_display_report_error(), has_pending_actions_for_window, lock, GHOST_WindowWayland::pending_actions_handle(), processEvents(), pushEvent, server_mutex, GHOST_WindowManager::setActiveWindow(), GHOST_WindowManager::setWindowInactive(), GWL_Display::system, timer_mutex, UNLIKELY, GWL_Display::wl, and wl_display_dispatch.
Referenced by processEvents().
| GHOST_TSuccess GHOST_SystemWayland::pushEvent_maybe_pending | ( | const GHOST_IEvent * | event | ) |
Push an event, with support for calling from a thread. NOTE: only needed for USE_EVENT_BACKGROUND_THREAD.
Definition at line 9109 of file GHOST_SystemWayland.cc.
References GWL_Display::events_pending, GWL_Display::events_pending_mutex, GHOST_kSuccess, lock, main_thread_id, and pushEvent.
Referenced by GHOST_WindowWayland::activate(), GHOST_WindowWayland::close(), data_device_handle_drop(), GHOST_WindowWayland::deactivate(), dnd_events(), gwl_seat_key_repeat_timer_fn(), keyboard_depressed_state_push_events_from_change(), keyboard_handle_key(), GHOST_WindowWayland::notify_decor_redraw(), GHOST_WindowWayland::notify_size(), pointer_handle_enter(), pointer_handle_frame(), relative_pointer_handle_relative_motion_impl(), tablet_tool_handle_frame(), and window_cursor_grab_set().
|
overridevirtual |
Put data to the Clipboard
| buffer | The buffer to copy to the clipboard. |
| selection | The 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().
|
overridevirtual |
Put image data to the Clipboard
| rgba | uint array in RGBA byte order. |
| width | the image width in pixels. |
| height | the image height in pixels. |
Reimplemented from GHOST_System.
Definition at line 8029 of file GHOST_SystemWayland.cc.
References GWL_DataSource::buffer_out, data, GWL_SimpleBuffer::data, ImBufByteBuffer::data, GWL_Seat::data_device, GWL_Display::data_device_manager, GWL_SimpleBuffer::data_size, GWL_Seat::data_source, data_source_listener, GWL_Seat::data_source_mutex, GWL_Seat::data_source_serial, ImBuf::encoded_buffer, ImBuf::encoded_buffer_size, ImBuf::foptions, ImBuf::ftype, GHOST_kFailure, GHOST_kSuccess, ghost_wl_mime_img_png, gwl_display_seat_active_get(), gwl_simple_buffer_free_data(), IB_mem, IB_rect, IMB_allocFromBuffer(), IMB_freeImBuf(), IMB_FTYPE_PNG, IMB_saveiff(), lock, ImbFormatOptions::quality, server_mutex, GWL_DataSource::source, UNLIKELY, GWL_DataSource::wl, GWL_Display::wl, and GWL_Seat::wl.
| void GHOST_SystemWayland::seat_active_set | ( | const struct GWL_Seat * | seat | ) |
Set this seat to be active.
Definition at line 9121 of file GHOST_SystemWayland.cc.
References gwl_display_seat_active_set().
Referenced by data_device_handle_enter(), keyboard_handle_enter(), pointer_handle_enter(), and tablet_tool_handle_proximity_in().
|
overridevirtual |
Set the Console State
| action | console state |
Implements GHOST_ISystem.
Definition at line 7605 of file GHOST_SystemWayland.cc.
|
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).
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
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.
|
overridevirtual |
Updates the location of the cursor (location in window coordinates).
| x | The x-coordinate of the cursor. |
| y | The y-coordinate of the cursor. |
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.
|
overridevirtual |
Enable multi-touch gestures if supported.
| use | Enable or disable. |
Reimplemented from GHOST_System.
Definition at line 8724 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, GWL_Display::seats, and server_mutex.
| bool GHOST_SystemWayland::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 ) |
Definition at line 9227 of file GHOST_SystemWayland.cc.
References GWL_Seat::confined_pointer, cursor_is_software(), CURSOR_VISIBLE_ONLY_HIDE, CURSOR_VISIBLE_ONLY_SHOW, ELEM, getMilliSeconds(), GHOST_kEventCursorMove, GHOST_kGrabDisable, GHOST_kGrabHide, GHOST_kGrabNormal, GHOST_kGrabWrap, GHOST_TABLET_DATA_NONE, ghost_wl_surface_user_data(), GWL_Seat::grab_lock_xy, gwl_display_seat_active_get(), gwl_seat_cursor_visible_set(), gwl_window_scale_wl_fixed_from(), gwl_window_scale_wl_fixed_to(), GWL_Seat::locked_pointer, GHOST_Rect::m_b, GHOST_Rect::m_l, GHOST_Rect::m_r, GHOST_Rect::m_t, GWL_Seat::pointer, GWL_Display::pointer_constraints, pushEvent_maybe_pending(), GWL_Seat::relative_pointer, relative_pointer_listener, GWL_Display::relative_pointer_manager, seat_grab_state_from_mode(), setCursorGrab_use_software_confine(), GWL_Seat::system, UNLIKELY, UNPACK2, GWL_SeatStateGrab::use_confine, GWL_SeatStateGrab::use_lock, GWL_Seat::use_pointer_software_confine, GWL_Seat::wl, wl_surface, GWL_Display::wp, GWL_Seat::wp, and GHOST_Rect::wrapPoint().
Referenced by GHOST_WindowWayland::setWindowCursorGrab().
| bool GHOST_SystemWayland::window_surface_unref | ( | const wl_surface * | wl_surface | ) |
Clear all references to this surface to prevent accessing nullptr pointers.
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 * GHOST_SystemWayland::wl_compositor_get | ( | ) |
Definition at line 8826 of file GHOST_SystemWayland.cc.
References GWL_Display::compositor, and GWL_Display::wl.
Referenced by createOffscreenContext(), GHOST_WindowWayland::GHOST_WindowWayland(), gwl_seat_capability_pointer_enable(), and tablet_seat_handle_tool_added().
| wl_display * GHOST_SystemWayland::wl_display_get | ( | ) |
Definition at line 8821 of file GHOST_SystemWayland.cc.
References GWL_Display::display, and GWL_Display::wl.
Referenced by data_device_handle_drop(), GHOST_WindowWayland::GHOST_WindowWayland(), gwl_seat_cursor_anim_begin(), GHOST_WindowWayland::setWindowCursorShape(), GHOST_WindowWayland::setWindowCursorVisibility(), GHOST_WindowWayland::setWindowCustomCursorShape(), and GHOST_WindowWayland::~GHOST_WindowWayland().
| wl_seat * GHOST_SystemWayland::wl_seat_active_get_with_input_serial | ( | uint32_t & | serial | ) |
Definition at line 9126 of file GHOST_SystemWayland.cc.
References GWL_Seat::data_source_serial, gwl_display_seat_active_get(), GWL_Seat::seat, UNLIKELY, and GWL_Seat::wl.
Referenced by gwl_window_activate().
| wl_shm * GHOST_SystemWayland::wl_shm_get | ( | ) | const |
Definition at line 8901 of file GHOST_SystemWayland.cc.
References GWL_Display::shm, and GWL_Display::wl.
Referenced by cursor_surface_handle_enter(), cursor_surface_handle_leave(), GHOST_WindowWayland::GHOST_WindowWayland(), gwl_seat_cursor_find_from_shape(), and output_scale_update().
| wp_fractional_scale_manager_v1 * GHOST_SystemWayland::wp_fractional_scale_manager_get | ( | ) |
Definition at line 8841 of file GHOST_SystemWayland.cc.
References GWL_Display::fractional_scale_manager, and GWL_Display::wp.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
| zwp_pointer_gestures_v1 * GHOST_SystemWayland::wp_pointer_gestures_get | ( | ) |
Definition at line 8850 of file GHOST_SystemWayland.cc.
References GWL_Display::pointer_gestures, and GWL_Display::wp.
Referenced by gwl_seat_capability_pointer_multitouch_check(), gwl_seat_capability_pointer_multitouch_disable(), and gwl_seat_capability_pointer_multitouch_enable().
| zwp_primary_selection_device_manager_v1 * GHOST_SystemWayland::wp_primary_selection_manager_get | ( | ) |
Definition at line 8831 of file GHOST_SystemWayland.cc.
References GWL_Display::primary_selection_device_manager, and GWL_Display::wp.
| 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_v1 * GHOST_SystemWayland::xdg_activation_manager_get | ( | ) |
Definition at line 8836 of file GHOST_SystemWayland.cc.
References GWL_Display::activation_manager, and GWL_Display::xdg.
Referenced by gwl_window_activate(), and xdg_activation_handle_done().
|
static |
Definition at line 8870 of file GHOST_SystemWayland.cc.
References ghost_wl_app_id.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland(), and gwl_window_activate().
| zxdg_decoration_manager_v1 * GHOST_SystemWayland::xdg_decor_manager_get | ( | ) |
Definition at line 8889 of file GHOST_SystemWayland.cc.
References GWL_XDG_Decor_System::manager, and GWL_Display::xdg_decor.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
| xdg_wm_base * GHOST_SystemWayland::xdg_decor_shell_get | ( | ) |
Definition at line 8884 of file GHOST_SystemWayland.cc.
References GWL_XDG_Decor_System::shell, and GWL_Display::xdg_decor.
Referenced by GHOST_WindowWayland::GHOST_WindowWayland().
| 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().
| std::thread::id GHOST_SystemWayland::main_thread_id |
Definition at line 352 of file GHOST_SystemWayland.hh.
Referenced by GHOST_WindowWayland::activate(), GHOST_WindowWayland::cursor_shape_refresh(), GHOST_WindowWayland::deactivate(), gwl_window_cursor_shape_refresh(), gwl_window_frame_update_from_pending_no_lock(), GHOST_WindowWayland::outputs_changed_update_scale(), GHOST_WindowWayland::pending_actions_handle(), pushEvent_maybe_pending(), GHOST_WindowWayland::swapBuffers(), and xdg_surface_handle_configure().
| std::mutex* GHOST_SystemWayland::server_mutex = nullptr |
Lock to prevent wl_display_dispatch / wl_display_roundtrip / wl_display_flush from running at the same time.
Definition at line 340 of file GHOST_SystemWayland.hh.
Referenced by GHOST_WindowWayland::beginFullScreen(), createOffscreenContext(), disposeContext(), GHOST_WindowWayland::endFullScreen(), getAllDisplayDimensions(), getButtons(), getClipboard(), getClipboardImage(), GHOST_WindowWayland::getCursorBitmap(), GHOST_WindowWayland::getCursorGrabUseSoftwareDisplay(), getCursorPosition(), getCursorPositionClientRelative(), getMainDisplayDimensions(), getModifierKeys(), getNumDisplays(), GHOST_WindowWayland::getState(), GHOST_WindowWayland::GHOST_WindowWayland(), gwl_seat_cursor_anim_begin(), hasClipboardImage(), processEvents(), putClipboard(), putClipboardImage(), GHOST_WindowWayland::setClientSize(), setCursorPosition(), setCursorPositionClientRelative(), setMultitouchGestures(), GHOST_WindowWayland::setState(), GHOST_WindowWayland::setTitle(), GHOST_WindowWayland::setWindowCursorGrab(), GHOST_WindowWayland::setWindowCursorShape(), GHOST_WindowWayland::setWindowCursorVisibility(), GHOST_WindowWayland::setWindowCustomCursorShape(), and GHOST_WindowWayland::~GHOST_WindowWayland().
| std::mutex* GHOST_SystemWayland::timer_mutex = nullptr |
Threads must lock this before manipulating GWL_Display::ghost_timer_manager.
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().