Commit graph

29 commits

Author SHA1 Message Date
alexei-zebra
14fa7e5fd2
fix building without the Wayland backend
The backend sources live in window/wayland and were picked up by the
global source glob, so a build with VOXELENGINE_WAYLAND=OFF (and any
non-Linux build, where the option is skipped entirely) tried to compile
them and failed on the generated protocol headers.

They are now collected separately and added to the target only when the
backend is enabled.

Also restores the CRLF line endings of Engine.cpp, GUI.hpp and
input.cpp, which were rewritten with LF and made their diffs look like
whole-file rewrites.
2026-10-10 12:23:31 +03:00
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
df67236adb fix missing keys support 2026-08-09 16:07:08 +03:00
ChancellorIkseew
a16c4fcf8b input minor refactoring 2025-04-09 02:48:09 +10:00
MihailRis
881edb7b28 rename keycode, mousecode enumerations 2025-04-02 17:39:31 +03:00
MihailRis
611c6fa444 fix input 2025-04-02 14:55:53 +03:00
MihailRis
b202d1455b refactor: replace references to Events with Input 2025-04-02 14:55:53 +03:00
@clasher113
2105d56b3b add side mouse buttons definitions 2025-02-04 10:34:28 +02:00
MihailRis
5fbc05d21d
Fix windows workflow (#322) 2024-10-21 21:16:12 +03:00
Vyacheslav Ivanov
7c8f04aa75
fix: Do not use NULL in arithmetic
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 21:03:52 +03:00
Vyacheslav Ivanov
bbf33e8e4d
format: reformat project
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 19:53:48 +03:00
MihailRis
ad62b759fb fix: input F1..F25 key codes & add binding 'chunks.reload' 2024-06-05 19:29:35 +03:00
MihailRis
4e2ba865f3 controls.json -> controls.toml 2024-06-02 22:10:39 +03:00
MihailRis
66476ee642 bindings.toml, config/bindings.toml file 2024-05-20 04:06:49 +03:00
MihailRis
7fdacffe53 json-related refactor 2024-05-20 03:06:26 +03:00
MihailRis
c94d40ab02 toml parser update + 'toml' module is built-in now 2024-05-20 01:28:42 +03:00
MihailRis
7f8a86b740 minor refactor 2024-05-05 20:08:25 +03:00
MihailRis
f02edcf15a scripting.h fix + input library 2024-05-05 00:28:30 +03:00
MihailRis
1b1f11e0b8 minor refactor 2024-03-20 09:10:35 +03:00
A-lex-Ra
a0b6ddccf8 fix linux compilation of previous commit 2024-02-23 19:09:46 +06:00
A-lex-Ra
8bb1045e34 refactor input.h and related 2024-02-23 18:49:15 +06:00
MihailRis
9629135791 small fix 2023-11-20 22:32:01 +03:00
@clasher113
69139c162a Win32 keyname implementation 2023-11-20 12:32:06 +02:00
MihailRis
c712c2239f Added missing keycodes 2023-11-20 06:48:30 +03:00
MihailRis
3eb6e82631 Added missing key names 2023-11-20 06:35:23 +03:00
MihailRis
4ea7bda249 PagesControl, refactor 2023-11-20 03:31:18 +03:00
MihailRis
5c2ff83e7d Added more keycodes to window/input 2023-11-09 23:50:13 +03:00
MihailRis
b0ccc5fd68 Removed GLFW references from player_control.cpp 2023-11-09 01:52:10 +03:00
MihailRis
82ee2e9d2f Added missing files 2023-11-09 01:21:19 +03:00