[kwin] Add better support for Notification windows
KWin starts to support the Notification window type and has an own layer for all notification windows. They are kept above the above layer but do not go over active fullscreen windows. REVIEW: 115298
This commit is contained in:
parent
253c2dab5a
commit
1576c55cd2
2 changed files with 10 additions and 5 deletions
12
layers.cpp
12
layers.cpp
|
@ -38,10 +38,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
as those are very special, and are stored in Workspace::desktops), in the order
|
||||
the clients were created.
|
||||
|
||||
Every window has one layer assigned in which it is. There are 6 layers,
|
||||
from bottom : DesktopLayer, BelowLayer, NormalLayer, DockLayer, AboveLayer
|
||||
Every window has one layer assigned in which it is. There are 7 layers,
|
||||
from bottom : DesktopLayer, BelowLayer, NormalLayer, DockLayer, AboveLayer, NotificationLayer
|
||||
and ActiveLayer (see also NETWM sect.7.10.). The layer a window is in depends
|
||||
on the window type, and on other things like whether the window is active.
|
||||
on the window type, and on other things like whether the window is active. We extend the layers
|
||||
provided in NETWM by the NotificationLayer, which contains notification windows. Those are kept
|
||||
above all windows except the active fullscreen window.
|
||||
|
||||
NET::Splash clients belong to the Normal layer. NET::TopMenu clients
|
||||
belong to Dock layer. Clients that are both NET::Dock and NET::KeepBelow
|
||||
|
@ -515,7 +517,7 @@ ToplevelList Workspace::constrainedStackingOrder()
|
|||
// If a window is raised above some other window in the same window group
|
||||
// which is in the ActiveLayer (i.e. it's fulscreened), make sure it stays
|
||||
// above that window (see #95731).
|
||||
if (*mLayer == ActiveLayer && (l == NormalLayer || l == AboveLayer))
|
||||
if (*mLayer == ActiveLayer && (l > BelowLayer))
|
||||
l = ActiveLayer;
|
||||
*mLayer = l;
|
||||
} else if (c) {
|
||||
|
@ -831,6 +833,8 @@ Layer Client::belongsToLayer() const
|
|||
return AboveLayer;
|
||||
return DockLayer;
|
||||
}
|
||||
if (isNotification())
|
||||
return NotificationLayer;
|
||||
if (keepBelow())
|
||||
return BelowLayer;
|
||||
if (isActiveFullScreen())
|
||||
|
|
3
utils.h
3
utils.h
|
@ -44,7 +44,7 @@ namespace KWin
|
|||
// window types that are supported as normal windows (i.e. KWin actually manages them)
|
||||
const int SUPPORTED_MANAGED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask
|
||||
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask /*| NET::OverrideMask*/ | NET::TopMenuMask
|
||||
| NET::UtilityMask | NET::SplashMask;
|
||||
| NET::UtilityMask | NET::SplashMask | NET::NotificationMask;
|
||||
// window types that are supported as unmanaged (mainly for compositing)
|
||||
const int SUPPORTED_UNMANAGED_WINDOW_TYPES_MASK = NET::NormalMask | NET::DesktopMask | NET::DockMask
|
||||
| NET::ToolbarMask | NET::MenuMask | NET::DialogMask /*| NET::OverrideMask*/ | NET::TopMenuMask
|
||||
|
@ -89,6 +89,7 @@ enum Layer {
|
|||
NormalLayer,
|
||||
DockLayer,
|
||||
AboveLayer,
|
||||
NotificationLayer, // layer for windows of type notification
|
||||
ActiveLayer, // active fullscreen, or active dialog
|
||||
UnmanagedLayer, // layer for override redirect windows.
|
||||
NumLayers // number of layers, must be last
|
||||
|
|
Loading…
Reference in a new issue