Changeset View
Changeset View
Standalone View
Standalone View
manage.cpp
Show First 20 Lines • Show All 370 Lines • ▼ Show 20 Line(s) | 308 | #endif | |||
---|---|---|---|---|---|
371 | // Maximization for oversized windows must happen NOW. | 371 | // Maximization for oversized windows must happen NOW. | ||
372 | // If we effectively pass keepInArea(), the window will resizeWithChecks() - i.e. constrained | 372 | // If we effectively pass keepInArea(), the window will resizeWithChecks() - i.e. constrained | ||
373 | // to the combo of all screen MINUS all struts on the edges | 373 | // to the combo of all screen MINUS all struts on the edges | ||
374 | // If only one screen struts, this will affect screens as a side-effect, the window is artificailly shrinked | 374 | // If only one screen struts, this will affect screens as a side-effect, the window is artificailly shrinked | ||
375 | // below the screen size and as result no more maximized what breaks KMainWindow's stupid width+1, height+1 hack | 375 | // below the screen size and as result no more maximized what breaks KMainWindow's stupid width+1, height+1 hack | ||
376 | // TODO: get KMainWindow a correct state storage what will allow to store the restore size as well. | 376 | // TODO: get KMainWindow a correct state storage what will allow to store the restore size as well. | ||
377 | 377 | | |||
378 | if (!session) { // has a better handling of this | 378 | if (!session) { // has a better handling of this | ||
379 | geom_restore = geometry(); // Remember restore geometry | 379 | geom_restore = frameGeometry(); // Remember restore geometry | ||
380 | if (isMaximizable() && (width() >= area.width() || height() >= area.height())) { | 380 | if (isMaximizable() && (width() >= area.width() || height() >= area.height())) { | ||
381 | // Window is too large for the screen, maximize in the | 381 | // Window is too large for the screen, maximize in the | ||
382 | // directions necessary | 382 | // directions necessary | ||
383 | const QSize ss = workspace()->clientArea(ScreenArea, area.center(), desktop()).size(); | 383 | const QSize ss = workspace()->clientArea(ScreenArea, area.center(), desktop()).size(); | ||
384 | const QRect fsa = workspace()->clientArea(FullArea, geom.center(), desktop()); | 384 | const QRect fsa = workspace()->clientArea(FullArea, geom.center(), desktop()); | ||
385 | const QSize cs = clientSize(); | 385 | const QSize cs = clientSize(); | ||
386 | int pseudo_max = ((info->state() & NET::MaxVert) ? MaximizeVertical : 0) | | 386 | int pseudo_max = ((info->state() & NET::MaxVert) ? MaximizeVertical : 0) | | ||
387 | ((info->state() & NET::MaxHoriz) ? MaximizeHorizontal : 0); | 387 | ((info->state() & NET::MaxHoriz) ? MaximizeHorizontal : 0); | ||
▲ Show 20 Lines • Show All 307 Lines • Show Last 20 Lines |