Changeset View
Changeset View
Standalone View
Standalone View
manage.cpp
Show All 22 Lines | |||||
23 | 23 | | |||
24 | #include "client.h" | 24 | #include "client.h" | ||
25 | 25 | | |||
26 | #include <kstartupinfo.h> | 26 | #include <kstartupinfo.h> | ||
27 | 27 | | |||
28 | #ifdef KWIN_BUILD_ACTIVITIES | 28 | #ifdef KWIN_BUILD_ACTIVITIES | ||
29 | #include "activities.h" | 29 | #include "activities.h" | ||
30 | #endif | 30 | #endif | ||
31 | #include "composite.h" | ||||
31 | #include "cursor.h" | 32 | #include "cursor.h" | ||
32 | #include "rules.h" | 33 | #include "rules.h" | ||
33 | #include "group.h" | 34 | #include "group.h" | ||
34 | #include "netinfo.h" | 35 | #include "netinfo.h" | ||
35 | #include "screens.h" | 36 | #include "screens.h" | ||
36 | #include "workspace.h" | 37 | #include "workspace.h" | ||
37 | #include "xcbutils.h" | 38 | #include "xcbutils.h" | ||
38 | 39 | | |||
▲ Show 20 Lines • Show All 608 Lines • ▼ Show 20 Line(s) | 319 | #endif | |||
647 | discardTemporaryRules(); | 648 | discardTemporaryRules(); | ||
648 | applyWindowRules(); // Just in case | 649 | applyWindowRules(); // Just in case | ||
649 | RuleBook::self()->discardUsed(this, false); // Remove ApplyNow rules | 650 | RuleBook::self()->discardUsed(this, false); // Remove ApplyNow rules | ||
650 | updateWindowRules(Rules::All); // Was blocked while !isManaged() | 651 | updateWindowRules(Rules::All); // Was blocked while !isManaged() | ||
651 | 652 | | |||
652 | setBlockingCompositing(info->isBlockingCompositing()); | 653 | setBlockingCompositing(info->isBlockingCompositing()); | ||
653 | readShowOnScreenEdge(showOnScreenEdgeCookie); | 654 | readShowOnScreenEdge(showOnScreenEdgeCookie); | ||
654 | 655 | | |||
656 | // Forward all opacity values to the frame in case there'll be other CM running. | ||||
657 | connect(Compositor::self(), &Compositor::compositingToggled, this, | ||||
658 | [this](bool active) { | ||||
659 | if (active) { | ||||
660 | return; | ||||
661 | } | ||||
662 | if (opacity() == 1.0) { | ||||
663 | return; | ||||
664 | } | ||||
665 | NETWinInfo info(connection(), frameId(), rootWindow(), 0, 0); | ||||
666 | info.setOpacity(static_cast<unsigned long>(opacity() * 0xffffffff)); | ||||
667 | } | ||||
668 | ); | ||||
669 | | ||||
655 | // TODO: there's a small problem here - isManaged() depends on the mapping state, | 670 | // TODO: there's a small problem here - isManaged() depends on the mapping state, | ||
656 | // but this client is not yet in Workspace's client list at this point, will | 671 | // but this client is not yet in Workspace's client list at this point, will | ||
657 | // be only done in addClient() | 672 | // be only done in addClient() | ||
658 | emit clientManaging(this); | 673 | emit clientManaging(this); | ||
659 | return true; | 674 | return true; | ||
660 | } | 675 | } | ||
661 | 676 | | |||
662 | // Called only from manage() | 677 | // Called only from manage() | ||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |