From 16730fe02dae66c8f2782d07a48338fd6624d6a2 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 3 Jan 2023 11:02:36 +0100 Subject: [PATCH] Don't adjust manually sized window It's unclear why this code was ever added, and it can be very confusing that the window partially adjusts itself. The code is also in conflict with the earlier comment that states we'll leave the window size alone if it didn't perfectly match before the resize. --- vncviewer/DesktopWindow.cxx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index b0f79933a9..2d3637815c 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -359,13 +359,6 @@ void DesktopWindow::resizeFramebuffer(int new_w, int new_h) if (!fullscreen_active() && !maximized) { if ((w() == viewport->w()) && (h() == viewport->h())) size(new_w, new_h); - else { - // Make sure the window isn't too big. We do this manually because - // we have to disable the window size restriction (and it isn't - // entirely trustworthy to begin with). - if ((w() > new_w) || (h() > new_h)) - size(__rfbmin(w(), new_w), __rfbmin(h(), new_h)); - } } viewport->size(new_w, new_h);