소스 검색

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.
tags/v1.9.90
Pierre Ossman 5 년 전
부모
커밋
44a1d71f33
2개의 변경된 파일16개의 추가작업 그리고 5개의 파일을 삭제
  1. 7
    4
      unix/x0vncserver/XDesktop.cxx
  2. 9
    1
      unix/xserver/hw/vnc/XserverDesktop.cc

+ 7
- 4
unix/x0vncserver/XDesktop.cxx 파일 보기

@@ -567,11 +567,14 @@ unsigned int XDesktop::setScreenLayout(int fb_width, int fb_height,
VNCSConnectionST::setDesktopSize. Another ExtendedDesktopSize
with reason=0 will be sent in response to the changes seen by the
event handler. */
if (adjustedLayout != layout) {
if (adjustedLayout != layout)
return rfb::resultInvalid;
} else {
return ret;
}

// Explicitly update the server state with the result as there
// can be corner cases where we don't get feedback from the X server
server->setScreenLayout(computeScreenLayout());

return ret;

#else
return rfb::resultProhibited;

+ 9
- 1
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)

Loading…
취소
저장