Commit graph

15 commits

Author SHA1 Message Date
alexei-zebra
1e689e88b1
add native Wayland window backend
Wayland support was missing a proper windowing layer: the GLFW backend
leaves the known platform gaps (cursor themes, window icon, window
position, fullscreen output selection).

The new backend talks to the compositor directly:
- xdg-shell, EGL, xkbcommon (keyboard, repeat, layout) instead of GLFW;
- cursors through wp_cursor_shape_manager_v1, so no cursor theme lookup
  is required and no "standard cursor shape unavailable" errors appear;
- window icon and title are drawn by the engine itself, since Wayland
  has no window icon protocol and GNOME provides no server-side
  decorations;
- fullscreen requests the current output (set_fullscreen with NULL), so
  the window no longer jumps to another monitor;
- interactive resize presents a cached frame scaled to the new size
  while the pointer is down and refreshes the real frame when the drag
  pauses, keeping the window glued to the cursor.

libdecor is not used: libdecor_frame_commit() redraws the whole
decoration and acks the configure in the same call, and mutter sends
200-330 configures per second during an interactive resize, so the
decoration was redrawn hundreds of times per second (measured: 2 s of
work per second, loop stalls up to 6 s). The decorations are drawn by
the engine instead, which measured 2.3 ms average configure-to-present
latency during a real drag.

GLFW stays the backend for X11 and Windows; VOXEL_WINDOW_BACKEND=x11
forces it on Wayland sessions.
2026-10-10 12:23:18 +03:00
MihailRis
ee9b2ab266 add quit signal check to the client mainloop 2026-07-31 18:57:43 +03:00
MihailRis
b1311fd03c fix test mode 2026-06-04 23:21:58 +03:00
MihailRis
dd62393eb6 use real delta in client-side tests 2026-06-04 23:02:06 +03:00
MihailRis
b2ed4b472f feat: client-side '--script' and '--test' basic support 2026-06-01 01:14:30 +03:00
MihailRis
630e75c7d9 make adaptive menu fps optional ('display.adaptive-menu-fps' flag) 2025-11-10 00:25:38 +03:00
MihailRis
7fc3703ad2 feat: refresh on demand in menu (adaptive framerate) 2025-11-09 22:22:24 +03:00
MihailRis
87ff77a73f add project start application script 2025-11-09 18:26:36 +03:00
MihailRis
0a02d3fbec add on_screen_change project script event & fix UIDocument::rebuildIndices & move menu background to project script 2025-08-07 22:14:52 +03:00
MihailRis
7749da4a85 feat: project scripts 2025-08-05 23:28:52 +03:00
MihailRis
7262119f5b refactor GLFWWindow 2025-04-02 15:01:24 +03:00
MihailRis
0b8d56afe1 cleanup 2025-04-02 14:59:53 +03:00
MihailRis
9694a59649 refactor: add Window interface 2025-04-02 14:59:53 +03:00
MihailRis
65fec4f4a9 introduce local player 2025-01-16 05:59:43 +03:00
MihailRis
5e76cdfadc rename engine.hpp/cpp to Engine.hpp/cpp & move Engine, Time and mainloop classes to 'engine' folder 2024-12-25 12:13:03 +03:00
Renamed from src/Mainloop.cpp (Browse further)