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
This commit is contained in:
Thomas Lübking 2015-09-03 20:45:36 +02:00
parent 0302b97aea
commit ace742d143

View file

@ -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())