]> git.mdlowis.com Git - proto/labwc.git/commit
xdg: sync pending when applying geometry
authorAndrew J. Hesford <ajh@sideband.org>
Wed, 27 Dec 2023 16:56:48 +0000 (11:56 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 28 Dec 2023 10:13:52 +0000 (10:13 +0000)
commitc59aeb5673f991b5b39342786b45795569ad0353
treee67221f8824f5cd84b2366c0f01bac3a6b60122b
parent7c91f36c13d6a3614a1b7d9d9cf489b716a2eccd
xdg: sync pending when applying geometry

Applications may respond to pending resize requests either by ignoring
them or substituting alternative sizes (for example, when mpv constrains
resizes to keep its aspect ratio fixed). In these cases, view->pending
will fall out of sync with the actual view geometry. This will cause
problems when subsequent operations (e.g., MoveToEdge) use the pending
geometry to decide where to place the window.

To fix this, reset view->pending to be equal view->current when either:

1. The requested size change has been commited, to the scene graph, and
   no subsequent changes are pending; or

2. The requested size change has been ignored by the client.
src/xdg.c