diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-09-11 14:22:04 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2018-09-11 14:22:04 +0200 |
commit | 44a1d71f33ad312991a201fc2c9ca4949edd7d54 (patch) | |
tree | 6a29529623d2c3f930973c566e72ccc9fbfc3204 /unix/xserver | |
parent | c86ce3eeef5521134e8d30e6009dafc6b7c1759f (diff) | |
download | tigervnc-44a1d71f33ad312991a201fc2c9ca4949edd7d54.tar.gz tigervnc-44a1d71f33ad312991a201fc2c9ca4949edd7d54.zip |
Explicitly check screen layout after change
There are some cases where the server state will not automatically
be updated on a change. A prominent one is when only RFB attributes
were changes (e.g. the screen ID) but nothing else. In that case
there is no actual change in the X server, so it never sends any
notification about change back to us.
Diffstat (limited to 'unix/xserver')
-rw-r--r-- | unix/xserver/hw/vnc/XserverDesktop.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc index 4aac7655..7eaf3f91 100644 --- a/unix/xserver/hw/vnc/XserverDesktop.cc +++ b/unix/xserver/hw/vnc/XserverDesktop.cc @@ -557,6 +557,8 @@ void XserverDesktop::clientCutText(const char* str, int len) unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height, const rfb::ScreenSet& layout) { + unsigned int result; + char buffer[2048]; vlog.debug("Got request for framebuffer resize to %dx%d", fb_width, fb_height); @@ -564,7 +566,13 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height, vlog.debug("%s", buffer); vncSetGlueContext(screenIndex); - return ::setScreenLayout(fb_width, fb_height, layout, &outputIdMap); + result = ::setScreenLayout(fb_width, fb_height, layout, &outputIdMap); + + // Explicitly update the server state with the result as there + // can be corner cases where we don't get feedback from the X core + refreshScreenLayout(); + + return result; } void XserverDesktop::grabRegion(const rfb::Region& region) |