Fixed #6801: Delay sending of resolution change
authorakallabeth <akallabeth@posteo.net>
Wed, 10 Feb 2021 14:32:07 +0000 (15:32 +0100)
committerakallabeth <akallabeth@users.noreply.github.com>
Thu, 25 Feb 2021 08:51:41 +0000 (09:51 +0100)
commit97327cbf333924a82bb6734f6e052908523fde00
tree68717caeb9a53af797d9a7bb3d4262c18c87cec9
parentee658151289780f79feefaee34ab973683564751
Fixed #6801: Delay sending of resolution change

Changed the logic of the disp channel to wait for 800ms after a
ConfigureNotify before sending the new resolution.
The problem fixed with this patch is the following:
1.  Resize the window with the mouse
2.  ConfigureNotify triggers a resize notification
3.  The server resizes to the desired resolution
3a. More ConfigureNotify events are generated
4.  The local window resize to the new resolution triggers another
    ConfigureNotify

a. Depending on the timing (sending is already rate limited) the
   events from 3a and 4 will make the size of the window jump
b. Very fast resizing will pick a random resolution from the
   sequence of ConfigureNotify events as the final resolution

(cherry picked from commit d3ed42a7994975098973c5f29f1ab98f7bdac2bf)
client/X11/xf_disp.c