[client] wayland: move libdecor and xdg into seperate backends

This allows us to build with libdecor enabled as the selection to use it
is decided upon at runtime if the compositor `gnome-shell` is detected.
If the libdecor development headers are installed, by default it will
now be compiled in unless overridden by the user at compile time.
This commit is contained in:
Geoffrey McRae
2023-11-09 16:30:27 +11:00
parent d592f13f88
commit aa9dbe654d
19 changed files with 923 additions and 551 deletions

View File

@@ -590,10 +590,13 @@ void waylandWarpPointer(int x, int y, bool exiting)
return;
}
int width, height;
wlWm.desktop->getSize(&width, &height);
if (x < 0) x = 0;
else if (x >= wlWm.width) x = wlWm.width - 1;
else if (x >= width) x = width - 1;
if (y < 0) y = 0;
else if (y >= wlWm.height) y = wlWm.height - 1;
else if (y >= height) y = height - 1;
struct wl_region * region = wl_compositor_create_region(wlWm.compositor);
wl_region_add(region, x, y, 1, 1);