MCPcopy Create free account
hub / github.com/KDE/kwin / applyWindowRules

Method applyWindowRules

src/window.cpp:4388–4437  ·  view source on GitHub ↗

Applies Force, ForceTemporarily and ApplyNow rules Used e.g. after the rules have been modified using the kcm.

Source from the content-addressed store, hash-verified

4386// Applies Force, ForceTemporarily and ApplyNow rules
4387// Used e.g. after the rules have been modified using the kcm.
4388void Window::applyWindowRules()
4389{
4390 Q_ASSERT(!isDeleted());
4391 // apply force rules
4392 // Placement - does need explicit update, just like some others below
4393 // Geometry : setGeometry() doesn't check rules
4394 auto client_rules = rules();
4395 const RectF oldGeometry = moveResizeGeometry();
4396 const RectF geometry = client_rules->checkGeometrySafe(oldGeometry);
4397 if (geometry != oldGeometry) {
4398 moveResize(geometry);
4399 }
4400 // MinSize, MaxSize handled by Geometry
4401 // IgnoreGeometry
4402 setDesktops(desktops());
4403 sendToOutput(moveResizeOutput());
4404 setOnActivities(activities());
4405 // Type
4406 maximize(requestedMaximizeMode());
4407 setMinimized(isMinimized());
4408 setOriginalSkipTaskbar(skipTaskbar());
4409 setSkipPager(skipPager());
4410 setSkipSwitcher(skipSwitcher());
4411 setKeepAbove(keepAbove());
4412 setKeepBelow(keepBelow());
4413 setFullScreen(isRequestedFullScreen());
4414 setDecorationPolicy(decorationPolicy());
4415 updateColorScheme();
4416 updateLayer();
4417 // FSP
4418 // AcceptFocus :
4419 if (workspace()->activeWindow() == this
4420 && !client_rules->checkAcceptFocus(true)) {
4421 workspace()->activateNextWindow(this);
4422 }
4423 // Autogrouping : Only checked on window manage
4424 // AutogroupInForeground : Only checked on window manage
4425 // AutogroupById : Only checked on window manage
4426 // StrictGeometry
4427 setShortcut(rules()->checkShortcut(shortcut().toString()));
4428 // see also X11Window::setActive()
4429 if (isActive()) {
4430 setOpacity(rules()->checkOpacityActive(opacity()));
4431 workspace()->disableGlobalShortcutsForClient(rules()->checkDisableGlobalShortcuts(false));
4432 } else {
4433 setOpacity(rules()->checkOpacityInactive(opacity()));
4434 }
4435 setDesktopFileName(rules()->checkDesktopFile(desktopFileName()));
4436 setExcludeFromCapture(rules()->checkExcludeFromCapture(excludeFromCapture()));
4437}
4438
4439void Window::setLastUsageSerial(quint32 serial)
4440{

Callers

nothing calls this directly

Calls 15

rulesFunction · 0.85
desktopsFunction · 0.85
isMinimizedFunction · 0.85
skipTaskbarFunction · 0.85
skipPagerFunction · 0.85
skipSwitcherFunction · 0.85
keepAboveFunction · 0.85
keepBelowFunction · 0.85
workspaceFunction · 0.85
shortcutFunction · 0.85
isActiveFunction · 0.85
desktopFileNameFunction · 0.85

Tested by

no test coverage detected