]> source.dussan.org Git - tigervnc.git/commitdiff
Don't adjust manually sized window
authorPierre Ossman <ossman@cendio.se>
Tue, 3 Jan 2023 10:02:36 +0000 (11:02 +0100)
committerPierre Ossman <ossman@cendio.se>
Mon, 12 Aug 2024 14:55:15 +0000 (16:55 +0200)
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

index b0f79933a92e639b6d7bc3542f8fd3061f4435df..2d3637815cc90c7657c5f49aea7f3c4c3c097044 100644 (file)
@@ -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);