Use actual x position of dock when saving state
commitf6165d6e80c1017e2cf20ace7303d627b8da647a
authorTorrance, Douglas <dtorrance@piedmont.edu>
Fri, 20 Jan 2023 02:45:56 +0000 (20 02:45 +0000)
committerCarlos R. Mafra <crmafra@gmail.com>
Fri, 20 Jan 2023 10:34:36 +0000 (20 10:34 +0000)
treeb00a3dd41ab5834b022a1295fbeb120d72bd883a
parent10c36d244e7a9a080c2a5f1c082742619694163f
Use actual x position of dock when saving state

Previously, we either saved it as 0 or -ICON_SIZE, and then adjusted
it depending on the screen width when restoring the state.

But since the introduction of the "KeepDockOnPrimaryHead" option, the
state-restoring code has changed so that the dock will go on the left if the
x-coordinate of the position in WMState is to the left of the midpoint
of the screen and on the right otherwise.  But previously (unless the
user manually set the value in WMState) this would always send the
dock to the left, even if it had been on the right, since the x-coordinate
automatically saved to WMState in this case was negative.

We simplify things by saving the actual x position of the dock to WMState.
src/dock.c