mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 15:11:31 +00:00
[client] wayland: marshal resize requests to the event-loop thread
setWindowSize is called from the render, frame and transport threads, but shellResize issues shell requests and, with the libdecor GTK plugin, renders the window decorations through pango, none of which is thread safe. A frame thread exiting after such a call crashed in the pango fontmap destructor during thread teardown. Publish the requested size atomically and wake the event loop through an eventfd registered in the epoll; the poll callback applies the size on the event-loop thread. Concurrent requests coalesce into the most recent one.
This commit is contained in:
committed by
Geoffrey McRae
parent
574e8edbae
commit
c66a974f1d
@@ -148,6 +148,9 @@ struct WaylandDSState
|
||||
bool warpSupport;
|
||||
struct WlMotion motion;
|
||||
|
||||
_Atomic(uint64_t) pendingResize; // 0 = none, else (width << 32) | height
|
||||
int resizeEventFd; // wakes the event loop to apply it
|
||||
|
||||
#if defined(ENABLE_EGL) || defined(ENABLE_OPENGL)
|
||||
struct wl_egl_window * eglWindow;
|
||||
struct SwapWithDamageData swapWithDamage;
|
||||
|
||||
Reference in New Issue
Block a user