]> git.mdlowis.com Git - proto/labwc.git/commit
view: make view_move_resize always work
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 12 Feb 2023 06:38:48 +0000 (07:38 +0100)
committerJohn Lindgren <john@jlindgren.net>
Mon, 13 Feb 2023 13:58:31 +0000 (08:58 -0500)
commit06e077134163b3768c64a7e40c75fed523e6b011
tree31ea54f4410b07cc86cd22d4f2e780081c119e05
parent231d88706ab101ae3865e8b39ab1a8179de3a399
view: make view_move_resize always work

It was not working before because in the case of wayland
we are only dealing with sizes as wayland has no notion
of a global position. A wayland client would thus not
necessarily respond to a configure request which sets
the same size again. This causes us to also not apply
a new position set in view->pending because there may
be no commit from the client in those cases.

We previously worked around this issue in some parts
of the code to check our new sizes against the pending
ones and if they were the same we would call view_move
instead. That had two issues:

- Not all parts of the code did that which could end up
  delaying the positioning either to the next completely
  unrelated xdg commit event or to the next view_move call

- The code started to repeat itself, e.g. the same condition
  with calls to either view_move or view_move_resize based
  on the result

This patch fixes it by doing the check in the xdg configure
handler instead. Xwayland is unaffected by this issue as we
are always configuring a xwayland client with both, position
and size.
src/view.c
src/xdg.c