xwm: use last focused window for guessing transient parent
authorTiago Vignatti <tiago.vignatti@intel.com>
Fri, 20 Jul 2012 20:09:55 +0000 (23:09 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Sun, 22 Jul 2012 18:35:25 +0000 (14:35 -0400)
commitce1baa80977c9c5cad4226a7cee0fa5129686e89
tree4cffaf3d2ca384b76d8324cbc0b49019e64f8485
parente66fcee4359a5f60bdcf6a79c119ac114dc607d1
xwm: use last focused window for guessing transient parent

On X the global absolute coordinates are sent in ConfigureNotify and transient
windows are mapped exactly on that position. On Wayland we don't have the
concept of global coordinates, and that's a problem for transient surfaces
without transient_for set because they rely on such hint for setting their
positioning.

So this solution is a workaround. It guesses a parent based on the last
focused window to determine the relative position of the transient surface.
This put transient windows of Chrome browser back to work.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
src/xwayland/window-manager.c
src/xwayland/xwayland.h