Fix the issues found while reviewing the Wayland backend

Report the errors the display read loop can fail with instead of
dispatching events on a dead connection, and release exactly the keys the
user really holds: BaseInput::pressedKeys is never erased, so the previous
list sent key releases for keys that were never pressed.

The bar is the only owner of the pointer edges now, the fullscreen state
comes from the compositor, and the decorations are enabled once, with the
window geometry published again. The initialization failure paths destroy
their resources exactly once, the screen state is reset on teardown, the
clipboard write does not block the frame loop on a slow reader, and the
gsettings fallback is not retried after it failed.

The stretch blit of the last frame is gone: composeFrame() already paints
the cached content.
This commit is contained in:
alexei-zebra 2026-10-11 20:06:03 +03:00
parent 4d1b4a1638
commit c635549892
No known key found for this signature in database
GPG key ID: D19D450AC3D9A80E
9 changed files with 206 additions and 137 deletions

View file

@ -26,17 +26,16 @@
#include <memory>
#include <optional>
#include <poll.h>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
struct GlStateGuard {
GLint values[16] {};
GLint attribs[3][7] {};
GLint attribs[3][6] {};
GLint viewport[4] {};
GLint colorMask[4] {};
GLboolean flags[6] {};
GLboolean flags[4] {};
GLboolean attribFlags[3] {};
GlStateGuard();
~GlStateGuard();
@ -100,8 +99,6 @@ void ignore_event(Args...) {
void dispatch_events(int timeoutMs);
int keycode_from_keysym(xkb_keysym_t sym);
extern bool serverDecorations;
void zxdg_decoration_configure(
void*, zxdg_toplevel_decoration_v1*, uint32_t mode
);