Improve compatibility of XWayland modeset emulation with reparenting window manager
The modeset emulation introduced in !270 (merged) is a great feature but does not yet work with KWin (see KWin patch at https://phabricator.kde.org/D26173) and potentially other reparenting window managers. There are three reasons for that:
- KWin does not create a single decoration window which it reparents the client window to, but creates a second wrapper window such that the client window is the third in the line.
- When a window is resized only on the client window resize the resolution emulation should be checked and not when the compositor window is, because at this point the client window might not have yet the updated size.
- When looking for an emulation mode we must check against the size of the client window and not the size of the compositor window, which is different in case an emulated mode is set.