Commit graph

3 commits

Author SHA1 Message Date
alexei-zebra
4731ac0706
keep the window framebuffer opaque
Both backends asked for an alpha channel (GLFW defaults to 8 alpha
bits, the Wayland EGL config requested 8), so everything the engine
draws with alpha - the UI panels, the water post effect - lowered the
window's own alpha and the compositor blended the desktop through it.
Visible on wine/Proton, where the whole window is composited.

Both now ask for an opaque framebuffer: GLFW_ALPHA_BITS 0, and
EGL_ALPHA_SIZE 0 with a fallback to an alpha config if the driver
provides none. Checked the result through the back buffer attachment:
alpha size is 0 on Wayland and on X11.
2026-10-10 12:23:31 +03:00
alexei-zebra
d9794afa67
read the clipboard asynchronously
getClipboardText() used to open a pipe, ask the selection owner for
the text and poll it with a 500 ms deadline, so every paste blocked the
UI thread (TextBox calls it directly) and a slow owner meant a visible
hang.

The selection is now fetched in the background: when the selection
changes, the backend requests the text into a non-blocking pipe and
getClipboardText() only returns the buffer, which the event loop fills
in as the data arrives. Pasting no longer blocks, and a source that
never answers simply leaves the previous buffer in place.

Also clears the advertised MIME list when a new selection offer
arrives, so a request is never made with MIME types of a previous
owner.
2026-10-10 12:23:31 +03:00
alexei-zebra
b934e033b3
split the rest of the Wayland backend
WaylandWindow.cpp kept the window class with all methods defined in
place, the decorations, the free event listeners and the initialization
in one file. Now:

- WaylandWindow.hpp: the class declaration;
- WaylandWindow.cpp: surface, EGL, resize and frame pacing;
- WaylandBar.cpp: the window decorations (bar, font, buttons, dragging,
  edge resizing);
- WaylandListeners.cpp/.hpp: the free Wayland event handlers;
- WaylandInit.cpp: wayland_window_initialize.

No functional change.
2026-10-10 12:23:18 +03:00