From ace742d143a0156691ec79a747acced1a37e56c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Thu, 3 Sep 2015 20:45:36 +0200 Subject: [PATCH] initialize pseudo_max with desired maximization the pseudo maximization sanitizes huge windows and was/is the way kdelibs KMainWindow indicates maximization It must however build up on the hinted maximization and not MaximizeRestore, or it may falsely destroy the maximization hint from the client (which now works in KF5 ;-) BUG: 352185 REVIEW: 125037 FIXED-IN: 5.5 --- manage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manage.cpp b/manage.cpp index 02b846db55..6644d586d5 100644 --- a/manage.cpp +++ b/manage.cpp @@ -418,7 +418,8 @@ bool Client::manage(xcb_window_t w, bool isMapped) const QSize ss = workspace()->clientArea(ScreenArea, area.center(), desktop()).size(); const QRect fsa = workspace()->clientArea(FullArea, geom.center(), desktop()); const QSize cs = clientSize(); - int pseudo_max = MaximizeRestore; + int pseudo_max = ((info->state() & NET::MaxVert) ? MaximizeVertical : 0) | + ((info->state() & NET::MaxHoriz) ? MaximizeHorizontal : 0); if (width() >= area.width()) pseudo_max |= MaximizeHorizontal; if (height() >= area.height())