Created attachment 8515 Patch to make zooming refresh at 60 FPS The compositor zoom refresh rate is currently hardcoded to 30 FPS. Attached patch increases it to 60 FPS. According to Moore's law, the average computer should be at least 4x faster than when I wrote this code, so it should be okay. ;) There used to be some code to determine the refresh rate from XRandR (and divide it by 2) but it seems to have been removed. Is there another way to get that information?
It's not the zoom refresh per se, it's just to recenter the zoom location. The current value of 1000÷30 is already 33 (whereas G_PRIORITY_HIGH_IDLE is 100), I don't like having to poll the Xserver with a rountrip (XQueryPointer() implies an Xserver roundtrip) with this such a high priority... Unfortunately, we cannot avoid the poll/rountrip because clients may issue a grab on the pointer, so we cannot rely on motion notifications alone. But for me, the current value is already too high and I'd rather use throttled raw motion events to trigger the roundtrip. So it's a NAK from me.
Sorry, copy/paste failed. G_PRIORITY_HIGH_IDLE is 200, G_PRIORITY_HIGH_IDLE is 100 (3× the current value)
As for using raw events and throttled recenter, XI2 is only optional so we cannot even rely on those being available... Meh. Previously, your original patch was using the XRandr refresh rate ÷ 2, or 30 by default if not available. But that XRandr code was removed along with the removal of the unreliable and fake "vblank sync" in favor of XPresent or GLX.
Olivier Fourdan referenced this bugreport in commit 0f29217475698540f4ea2dbfdae4e603f158afa5 common: Add API to get the refresh rate. https://git.xfce.org/xfce/xfwm4/commit?id=0f29217475698540f4ea2dbfdae4e603f158afa5
Olivier Fourdan referenced this bugreport in commit 9bba554180e230a928422e682aa840ad0c8db793 compositor: Base zoom update or refresh rate https://git.xfce.org/xfce/xfwm4/commit?id=9bba554180e230a928422e682aa840ad0c8db793
Those two commits should give the same as with 4.12 (i.e. half the refresh rate of the primary monitor)
Alistair Buxton referenced this bugreport in commit 0a8f00c74dffc93900e7aae545c56a4eaa023f4b compositor: Refresh the zoom at refresh rate https://git.xfce.org/xfce/xfwm4/commit?id=0a8f00c74dffc93900e7aae545c56a4eaa023f4b
Patch rebased and pushed.
Okay I'm a little bit confused about what just happened. :) But panning is smoother now, so that's good...