[Dialog] Add CriticalNotification type
Allows to flag a dialog window as critical notification that should be shown even on top of fullscreen windows Differential Revision: https://phabricator.kde.org/D20630
This commit is contained in:
parent
d82a27d395
commit
91024027b0
@ -308,7 +308,7 @@ void DialogPrivate::updateVisibility(bool visible)
|
||||
}
|
||||
}
|
||||
|
||||
if (!q->flags().testFlag(Qt::ToolTip) && type != Dialog::Notification) {
|
||||
if (!q->flags().testFlag(Qt::ToolTip) && type != Dialog::Notification && type != Dialog::CriticalNotification) {
|
||||
KWindowEffects::SlideFromLocation slideLocation = KWindowEffects::NoEdge;
|
||||
|
||||
switch (location) {
|
||||
@ -341,7 +341,7 @@ void DialogPrivate::updateVisibility(bool visible)
|
||||
q->setFlags(Qt::FramelessWindowHint | q->flags());
|
||||
}
|
||||
|
||||
if (type == Dialog::Dock || type == Dialog::Notification || type == Dialog::OnScreenDisplay) {
|
||||
if (type == Dialog::Dock || type == Dialog::Notification || type == Dialog::OnScreenDisplay || type == Dialog::CriticalNotification) {
|
||||
KWindowSystem::setOnAllDesktops(q->winId(), true);
|
||||
} else {
|
||||
KWindowSystem::setOnAllDesktops(q->winId(), false);
|
||||
@ -1091,7 +1091,7 @@ void Dialog::setType(WindowType type)
|
||||
}
|
||||
}
|
||||
|
||||
if (type == Dock || type == Notification || type == OnScreenDisplay) {
|
||||
if (type == Dock || type == Notification || type == OnScreenDisplay || type == CriticalNotification) {
|
||||
KWindowSystem::setOnAllDesktops(winId(), true);
|
||||
} else {
|
||||
KWindowSystem::setOnAllDesktops(winId(), false);
|
||||
|
@ -157,7 +157,8 @@ public:
|
||||
PopupMenu = NET::PopupMenu,
|
||||
Tooltip = NET::Tooltip,
|
||||
Notification = NET::Notification,
|
||||
OnScreenDisplay = NET::OnScreenDisplay
|
||||
OnScreenDisplay = NET::OnScreenDisplay,
|
||||
CriticalNotification = NET::CriticalNotification
|
||||
};
|
||||
Q_ENUM(WindowType)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user