|
Blender V5.3
|
Go to the source code of this file.
Classes | |
| struct | GHOST_CSD_EventState_ButtonAction |
| struct | GHOST_CSD_EventState_Button |
| struct | GHOST_CSD_EventState |
| struct | GWL_XDG_WindowIcon |
| class | GHOST_WindowWayland |
Macros | |
| #define | USE_EVENT_BACKGROUND_THREAD |
Functions | |
| void | gwl_xdg_window_icon_free (GWL_XDG_WindowIcon &icon) |
Declaration of GHOST_WindowWayland class.
Definition in file GHOST_WindowWayland.hh.
| #define USE_EVENT_BACKGROUND_THREAD |
Define to workaround for a bug/limitation in WAYLAND, see: #100855 & upstream report: https://gitlab.freedesktop.org/wayland/wayland/-/issues/159
Consume events from WAYLAND in a thread, this is needed because overflowing the event queue causes a fatal error (more than sizeof(wl_buffer.data) at the time of writing).
Solve this using a thread that handles events, locking must be performed as follows:
Lock #GWL_Display.server_mutex to prevent wl_display_dispatch / wl_display_roundtrip running from multiple threads at once.
Even though WAYLAND functions that communicate with wl_display_* have their own locks, GHOST functions that communicate with WAYLAND must use this lock to be thread safe.
Without this reading/writing values such as changing the cursor or setting the window size could conflict with WAYLAND callbacks running in a separate thread. So the server_mutex ensures either GHOST or WAYLAND is manipulating this data, having two WAYLAND callbacks accessing the data at once isn't a problem.
Definition at line 59 of file GHOST_WindowWayland.hh.
Referenced by GHOST_SystemWayland::GHOST_SystemWayland().
| void gwl_xdg_window_icon_free | ( | GWL_XDG_WindowIcon & | icon | ) |
Definition at line 2650 of file GHOST_WindowWayland.cc.
References GWL_XDG_WindowIcon::buffer, GWL_XDG_WindowIcon::buffer_data, GWL_XDG_WindowIcon::buffer_size, and gwl_xdg_window_icon_free().
Referenced by gwl_xdg_window_icon_free(), GHOST_SystemWayland::xdg_toplevel_icon_update(), and GHOST_WindowWayland::~GHOST_WindowWayland().