shell: implement set_xwayland_position
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 16 Nov 2016 13:17:14 +0000 (15:17 +0200)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Wed, 18 Jan 2017 11:21:02 +0000 (13:21 +0200)
commit77a6d95a0f31a0a51ac2fd85a67c45a624aa34bc
tree12cbf36fa45eca43b540b2c04d63af8803555df2
parent882aff09324ba72d1d9136d6ad9f3c99dab1631b
shell: implement set_xwayland_position

Store the initial xwayland position explicitly in struct shell_surface.
New variables are needed, because e.g. saved_x, saved_y are the view
position, and to compute that we need the window geometry, which is not
available before the first commit, so it's not available at
set_xwayland_position() time.

Regression: kcachegrind (Qt 4, X11), the first menu invocation will
slightly misplace the menu if the window has not been manually moved.

Problem: geometry is not taken into account due to a race between XWM
drawing decorations and Xwayland committing the first buffer.

Use the same debugging guard as XWM.

v3: merged with "desktop-shell: debug set_position_from_xwayland"

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Daniel Stone <daniels@collabora.com>
desktop-shell/shell.c