From: William Sjöblom Date: Wed, 19 Jan 2022 10:22:07 +0000 (+0100) Subject: Always log screen layout if validation fails X-Git-Tag: v1.12.90~59 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a1d755a5f833c47d9c6fde4da1ec7e9e8631f1ce;p=tigervnc.git Always log screen layout if validation fails Unconditionally log the erroneous screen layout if it fails to validate to simplify debugging. --- diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index 12904188..9b086f4f 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -1392,15 +1392,17 @@ void DesktopWindow::remoteResize(int width, int height) (layout == cc->server.screenLayout())) return; - char buffer[2048]; vlog.debug("Requesting framebuffer resize from %dx%d to %dx%d", cc->server.width(), cc->server.height(), width, height); - layout.print(buffer, sizeof(buffer)); - vlog.debug("%s", buffer); + char buffer[2048]; + layout.print(buffer, sizeof(buffer)); if (!layout.validate(width, height)) { vlog.error(_("Invalid screen layout computed for resize request!")); + vlog.error("%s", buffer); return; + } else { + vlog.debug("%s", buffer); } cc->writer()->writeSetDesktopSize(width, height, layout);