Changeset View
Changeset View
Standalone View
Standalone View
geometry.cpp
Show First 20 Lines • Show All 2443 Lines • ▼ Show 20 Line(s) | 2197 | { | |||
---|---|---|---|---|---|
2444 | 2444 | | |||
2445 | syncer.syncNow(); // important because of window rule updates! | 2445 | syncer.syncNow(); // important because of window rule updates! | ||
2446 | 2446 | | |||
2447 | updateAllowedActions(); | 2447 | updateAllowedActions(); | ||
2448 | updateWindowRules(Rules::MaximizeVert|Rules::MaximizeHoriz|Rules::Position|Rules::Size); | 2448 | updateWindowRules(Rules::MaximizeVert|Rules::MaximizeHoriz|Rules::Position|Rules::Size); | ||
2449 | emit quickTileModeChanged(); | 2449 | emit quickTileModeChanged(); | ||
2450 | } | 2450 | } | ||
2451 | 2451 | | |||
2452 | bool AbstractClient::isFullScreenable() const | | |||
2453 | { | | |||
2454 | return isFullScreenable(false); | | |||
2455 | } | | |||
2456 | | ||||
2457 | bool AbstractClient::isFullScreenable(bool fullscreen_hack) const | | |||
2458 | { | | |||
2459 | if (!rules()->checkFullScreen(true)) | | |||
2460 | return false; | | |||
2461 | if (fullscreen_hack) | | |||
2462 | return isNormalWindow(); | | |||
2463 | if (rules()->checkStrictGeometry(true)) { // allow rule to ignore geometry constraints | | |||
2464 | QRect fsarea = workspace()->clientArea(FullScreenArea, this); | | |||
2465 | if (sizeForClientSize(fsarea.size(), SizemodeAny, true) != fsarea.size()) | | |||
2466 | return false; // the app wouldn't fit exactly fullscreen geometry due to its strict geometry requirements | | |||
2467 | } | | |||
2468 | // don't check size constrains - some apps request fullscreen despite requesting fixed size | | |||
2469 | return !isSpecialWindow(); // also better disallow only weird types to go fullscreen | | |||
2470 | } | | |||
2471 | | ||||
2472 | bool Client::userCanSetFullScreen() const | 2452 | bool Client::userCanSetFullScreen() const | ||
2473 | { | 2453 | { | ||
2474 | if (fullscreen_mode == FullScreenHack) | 2454 | if (fullscreen_mode == FullScreenHack) | ||
2475 | return false; | 2455 | return false; | ||
2476 | if (!isFullScreenable(false)) | 2456 | if (!isFullScreenable(false)) | ||
2477 | return false; | 2457 | return false; | ||
2478 | return isNormalWindow() || isDialog(); | 2458 | return isNormalWindow() || isDialog(); | ||
2479 | } | 2459 | } | ||
▲ Show 20 Lines • Show All 1025 Lines • Show Last 20 Lines |