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.
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);