mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-07 14:21:59 +00:00
[client] wayland: improve fractional scale protocol compatibility
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
There is no reason to call a bunch of stuff before the xdg_surface is configured, so let's not call them and cause early painting to happen should the compositor decide to send the `preferred_scale` message early.
This commit is contained in:
@@ -263,6 +263,11 @@ void libdecor_pollWait(struct wl_display * display, int epollFd,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool libdecor_configured(void)
|
||||||
|
{
|
||||||
|
return state.configured;
|
||||||
|
}
|
||||||
|
|
||||||
WL_DesktopOps WLD_libdecor =
|
WL_DesktopOps WLD_libdecor =
|
||||||
{
|
{
|
||||||
.name = "libdecor",
|
.name = "libdecor",
|
||||||
@@ -277,5 +282,6 @@ WL_DesktopOps WLD_libdecor =
|
|||||||
.getSize = libdecor_getSize,
|
.getSize = libdecor_getSize,
|
||||||
.registryGlobalHandler = libdecor_registryGlobalHandler,
|
.registryGlobalHandler = libdecor_registryGlobalHandler,
|
||||||
.pollInit = libdecor_pollInit,
|
.pollInit = libdecor_pollInit,
|
||||||
.pollWait = libdecor_pollWait
|
.pollWait = libdecor_pollWait,
|
||||||
|
.configured = libdecor_configured
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -304,6 +304,11 @@ void xdg_pollWait(struct wl_display * display, int epollFd,
|
|||||||
wl_display_cancel_read(display);
|
wl_display_cancel_read(display);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool xdg_configured(void)
|
||||||
|
{
|
||||||
|
return state.configured;
|
||||||
|
}
|
||||||
|
|
||||||
WL_DesktopOps WLD_xdg =
|
WL_DesktopOps WLD_xdg =
|
||||||
{
|
{
|
||||||
.name = "xdg",
|
.name = "xdg",
|
||||||
@@ -318,5 +323,6 @@ WL_DesktopOps WLD_xdg =
|
|||||||
.getSize = xdg_getSize,
|
.getSize = xdg_getSize,
|
||||||
.registryGlobalHandler = xdg_registryGlobalHandler,
|
.registryGlobalHandler = xdg_registryGlobalHandler,
|
||||||
.pollInit = xdg_pollInit,
|
.pollInit = xdg_pollInit,
|
||||||
.pollWait = xdg_pollWait
|
.pollWait = xdg_pollWait,
|
||||||
|
.configured = xdg_configured
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ typedef struct WL_DesktopOps
|
|||||||
bool (*pollInit)(struct wl_display * display);
|
bool (*pollInit)(struct wl_display * display);
|
||||||
|
|
||||||
void (*pollWait)(struct wl_display * display, int epollFd, unsigned int time);
|
void (*pollWait)(struct wl_display * display, int epollFd, unsigned int time);
|
||||||
|
|
||||||
|
bool (*configured)(void);
|
||||||
}
|
}
|
||||||
WL_DesktopOps;
|
WL_DesktopOps;
|
||||||
|
|
||||||
|
|||||||
@@ -36,10 +36,14 @@ static void setScale(struct WaylandScale newScale)
|
|||||||
wlWm.scale = newScale;
|
wlWm.scale = newScale;
|
||||||
wlWm.fractionalScale = waylandScaleIsFractional(newScale);
|
wlWm.fractionalScale = waylandScaleIsFractional(newScale);
|
||||||
wlWm.needsResize = true;
|
wlWm.needsResize = true;
|
||||||
|
|
||||||
|
if (wlWm.desktop->configured())
|
||||||
|
{
|
||||||
waylandCursorScaleChange();
|
waylandCursorScaleChange();
|
||||||
app_invalidateWindow(true);
|
app_invalidateWindow(true);
|
||||||
waylandStopWaitFrame();
|
waylandStopWaitFrame();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void waylandWindowUpdateScale(void)
|
void waylandWindowUpdateScale(void)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user