summaryrefslogtreecommitdiffstats
path: root/unix/xserver/hw/vnc/XserverDesktop.cc
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2009-04-02 14:46:54 +0000
committerPierre Ossman <ossman@cendio.se>2009-04-02 14:46:54 +0000
commitf7705c1c8c1c4797b6f55f7aaa648e77a0db4311 (patch)
treec5fe030d57ea6e4b307ceb2714227aa96588fca2 /unix/xserver/hw/vnc/XserverDesktop.cc
parentdf453200b7a00e54512792273c0d9acb9838d626 (diff)
downloadtigervnc-f7705c1c8c1c4797b6f55f7aaa648e77a0db4311.tar.gz
tigervnc-f7705c1c8c1c4797b6f55f7aaa648e77a0db4311.zip
Improve logging in setScreenLayout().
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3739 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix/xserver/hw/vnc/XserverDesktop.cc')
-rw-r--r--unix/xserver/hw/vnc/XserverDesktop.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index f192b8a7..d18ea270 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -853,11 +853,15 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height,
// Register a new size, or get a reference to the existing one
pSize = RRRegisterSize(pScreen, fb_width, fb_height,
pScreen->mmWidth, pScreen->mmHeight);
- if (!pSize)
+ if (!pSize) {
+ vlog.error("setScreenLayout: Could not get register new resolution");
return resultNoResources;
+ }
ret = RRRegisterRate(pScreen, pSize, 60);
- if (!ret)
+ if (!ret) {
+ vlog.error("setScreenLayout: Could not register a rate for the resolution");
return resultNoResources;
+ }
// Go via RandR to set the resolution in order for X11 notifications
// to be sent out properly. We currently only do RandR 1.0, but Xorg
@@ -883,19 +887,25 @@ unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height,
break;
}
}
- if (!mode)
+ if (!mode) {
+ vlog.error("setScreenLayout: Could not find a matching mode");
return resultNoResources;
+ }
// Adjust screen size
ret = RRScreenSizeSet(pScreen, fb_width, fb_height,
pScreen->mmWidth, pScreen->mmHeight);
- if (!ret)
+ if (!ret) {
+ vlog.error("setScreenLayout: Could not adjust screen size");
return resultNoResources;
+ }
// And then the CRTC
ret = RRCrtcSet(output->crtc, mode, 0, 0, RR_Rotate_0, 1, &output);
- if (!ret)
+ if (!ret) {
+ vlog.error("setScreenLayout: Could not adjust CRTC");
return resultNoResources;
+ }
// RandR 1.0 doesn't carry any screen layout information, so we need
// to update that manually. This results in another unnecessary