Changeset View
Changeset View
Standalone View
Standalone View
geometry.cpp
Show First 20 Lines • Show All 2477 Lines • ▼ Show 20 Line(s) | 2231 | { | |||
---|---|---|---|---|---|
2478 | 2478 | | |||
2479 | syncer.syncNow(); // important because of window rule updates! | 2479 | syncer.syncNow(); // important because of window rule updates! | ||
2480 | 2480 | | |||
2481 | updateAllowedActions(); | 2481 | updateAllowedActions(); | ||
2482 | updateWindowRules(Rules::MaximizeVert|Rules::MaximizeHoriz|Rules::Position|Rules::Size); | 2482 | updateWindowRules(Rules::MaximizeVert|Rules::MaximizeHoriz|Rules::Position|Rules::Size); | ||
2483 | emit quickTileModeChanged(); | 2483 | emit quickTileModeChanged(); | ||
2484 | } | 2484 | } | ||
2485 | 2485 | | |||
2486 | bool AbstractClient::isFullScreenable() const | | |||
2487 | { | | |||
2488 | return isFullScreenable(false); | | |||
2489 | } | | |||
2490 | | ||||
2491 | bool AbstractClient::isFullScreenable(bool fullscreen_hack) const | | |||
2492 | { | | |||
2493 | if (!rules()->checkFullScreen(true)) | | |||
2494 | return false; | | |||
2495 | if (fullscreen_hack) | | |||
2496 | return isNormalWindow(); | | |||
2497 | if (rules()->checkStrictGeometry(true)) { // allow rule to ignore geometry constraints | | |||
2498 | QRect fsarea = workspace()->clientArea(FullScreenArea, this); | | |||
2499 | if (sizeForClientSize(fsarea.size(), SizemodeAny, true) != fsarea.size()) | | |||
2500 | return false; // the app wouldn't fit exactly fullscreen geometry due to its strict geometry requirements | | |||
2501 | } | | |||
2502 | // don't check size constrains - some apps request fullscreen despite requesting fixed size | | |||
2503 | return !isSpecialWindow(); // also better disallow only weird types to go fullscreen | | |||
2504 | } | | |||
2505 | | ||||
2506 | bool Client::userCanSetFullScreen() const | 2486 | bool Client::userCanSetFullScreen() const | ||
2507 | { | 2487 | { | ||
2508 | if (fullscreen_mode == FullScreenHack) | 2488 | if (fullscreen_mode == FullScreenHack) | ||
2509 | return false; | 2489 | return false; | ||
2510 | if (!isFullScreenable(false)) | 2490 | if (!isFullScreenable(false)) | ||
2511 | return false; | 2491 | return false; | ||
2512 | return isNormalWindow() || isDialog(); | 2492 | return isNormalWindow() || isDialog(); | ||
2513 | } | 2493 | } | ||
▲ Show 20 Lines • Show All 1026 Lines • Show Last 20 Lines |