mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-17 04:48:15 +00:00
[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:
@@ -112,7 +112,8 @@ bool waylandWindowInit(const char * title, bool fullscreen, bool maximize, bool
|
||||
|
||||
wl_surface_add_listener(wlWm.surface, &wlSurfaceListener, NULL);
|
||||
|
||||
if (!waylandShellInit(title, fullscreen, maximize, borderless, resizable))
|
||||
if (!wlWm.desktop->shellInit(wlWm.display, wlWm.surface,
|
||||
title, fullscreen, maximize, borderless, resizable))
|
||||
return false;
|
||||
|
||||
wl_surface_commit(wlWm.surface);
|
||||
@@ -127,12 +128,14 @@ void waylandWindowFree(void)
|
||||
|
||||
void waylandSetWindowSize(int x, int y)
|
||||
{
|
||||
waylandShellResize(x, y);
|
||||
wlWm.desktop->shellResize(x, y);
|
||||
}
|
||||
|
||||
bool waylandIsValidPointerPos(int x, int y)
|
||||
{
|
||||
return x >= 0 && x < wlWm.width && y >= 0 && y < wlWm.height;
|
||||
int width, height;
|
||||
wlWm.desktop->getSize(&width, &height);
|
||||
return x >= 0 && x < width && y >= 0 && y < height;
|
||||
}
|
||||
|
||||
static void frameHandler(void * opaque, struct wl_callback * callback, unsigned int data)
|
||||
|
Reference in New Issue
Block a user