From 7e8bf8d2a81f37303e0c9ae430f1acbff106da22 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Wed, 14 Oct 2026 14:16:42 +0300 Subject: Wayland: fix GL thread races, reconnect ordering and sizing bugs - GL swaps on a rendering thread no longer touch frame callbacks or presentation feedback. They set a per-surface flag and wake the loop; the owner thread arms both at its next flush and commits, so the frame callback fires without waiting for the application's next swap. - Clear the offline flag only after the reconnect rebuild succeeds, and not when the connection was lost again during it. - make_current fails with ENOTCONN for a window without a context. Detaching is a no-op when nothing is current or the EGL display is gone. - Window move, resize, window menu and drag start need a pointer button or tablet tip that is still held; otherwise they fail with ESTALE and use that press's serial. Popups fail with ESTALE without an input serial and with ENOTCONN while the display is lost. - An oversized device size shrinks to the buffer limits, keeping the aspect ratio, instead of closing the window. - FIXED_SIZE windows pin xdg min and max on every set_size. The 64px minimum applies only to compositor-suggested sizes, not to application sizes. - The keyboard-enter serial becomes the input serial. Clipboard copy with no keyboard focus fails with ESTALE. - Relative-pointer windows relock after a reconnect rebuild. - errno: EBUSY for an active drag, ENOTSUP for place_under_pointer and for GL without EGL, EINVAL for drag carry without a drag. - Default window title and app ID are "YASL". - Pointer motion and button events carry unrounded device-pixel positions in precise_x/precise_y with precise_position set. Co-Authored-By: Claude Haiku 5.5 --- src/platform/wayland/shell.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/platform/wayland/shell.c') diff --git a/src/platform/wayland/shell.c b/src/platform/wayland/shell.c index c2578e7..8e6b67e 100644 --- a/src/platform/wayland/shell.c +++ b/src/platform/wayland/shell.c @@ -399,9 +399,9 @@ int surface_init_shell(struct wayland_surface *w, const char *title) if (!w->toplevel) return -1; xdg_toplevel_add_listener(w->toplevel, &toplevel_listener, w); - wayland_surface_set_title(w, title ? title : "yasl_private_app"); + wayland_surface_set_title(w, title ? title : "YASL"); - const char *app_id = w->conn->app_id ? w->conn->app_id : "yasl_private_app"; + const char *app_id = w->conn->app_id ? w->conn->app_id : "YASL"; xdg_toplevel_set_app_id(w->toplevel, app_id); xdg_toplevel_set_min_size(w->toplevel, YASL_PRIVATE_MIN_LOGICAL_PX, YASL_PRIVATE_MIN_LOGICAL_PX); -- cgit v1.2.3