forked from AuroraMiddleware/gtk
992f092968
In pointer_surface_update_scale(), only rescale the cursor surface when the scale has actually changed and the cursor is on at least one output. fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3350 Right now, this issue is not completely understood, so it might also involve some questionable handling of cursor surface by sway/wlroots. However, irrespective of that issue, this patch avoids unnecessary calls to the compositor, and there should be no drawback: Whenever the pointer enters a new output, pointer_surface_update_scale() will be called again, such that correct scaling of the cursor is still ensured. There is a slight difference: When the cursor leaves the last output, previously the image was reset to scale factor 1. Now, it keeps whatever was last. That might be more sensible than the previous behaviour, assuming that it's likely that when the cursor enter an output again, it has the same scaling. Alternatively, if one cares about resource usage at this level, it might make more sense to destroy the surface than rescaling to 1. |
||
---|---|---|
.. | ||
cursor | ||
protocol | ||
gdkapplaunchcontext-wayland.c | ||
gdkcairocontext-wayland.c | ||
gdkcairocontext-wayland.h | ||
gdkclipboard-wayland.c | ||
gdkclipboard-wayland.h | ||
gdkcursor-wayland.c | ||
gdkdevice-wayland-private.h | ||
gdkdevice-wayland.c | ||
gdkdisplay-wayland.c | ||
gdkdisplay-wayland.h | ||
gdkdrag-wayland.c | ||
gdkdrop-wayland.c | ||
gdkeventsource.c | ||
gdkglcontext-wayland.c | ||
gdkglcontext-wayland.h | ||
gdkkeys-wayland.c | ||
gdkmonitor-wayland.c | ||
gdkmonitor-wayland.h | ||
gdkprimary-wayland.c | ||
gdkprimary-wayland.h | ||
gdkprivate-wayland.h | ||
gdkseat-wayland.h | ||
gdksurface-wayland.c | ||
gdksurface-wayland.h | ||
gdkvulkancontext-wayland.c | ||
gdkvulkancontext-wayland.h | ||
gdkwayland.h | ||
gdkwaylanddevice.h | ||
gdkwaylanddisplay.h | ||
gdkwaylandglcontext.h | ||
gdkwaylandmonitor.h | ||
gdkwaylandseat.h | ||
gdkwaylandsurface.h | ||
meson.build | ||
wm-button-layout-translation.c | ||
wm-button-layout-translation.h |