Add notifications for Window goes to/fro Fullscreen

FEATURE: 124612
FIXED-IN: 4.9.0
REVIEW: 104457
This commit is contained in:
Martin Gräßlin 2012-04-01 17:05:30 +02:00
parent 8ced79739f
commit 84a6891d79
4 changed files with 21 additions and 0 deletions

View file

@ -2353,6 +2353,11 @@ void Client::setFullScreen(bool set, bool user)
if (was_fs != isFullScreen()) {
emit clientFullScreenSet(this, set, user);
emit fullScreenChanged();
if (isFullScreen()) {
Notify::raise(Notify::FullScreen);
} else {
Notify::raise(Notify::UnFullScreen);
}
}
}

View file

@ -7424,3 +7424,11 @@ Comment[x-test]=xxTiling Layout has been changedxx
Comment[zh_CN]=已更改平铺布局
Comment[zh_TW]=鋪排佈局已變更
Action=Popup
[Event/fullscreen]
Name=Window Fullscreen Set
Comment=A window has been set to fullscreen
[Event/unfullscreen]
Name=Window Fullscreen Restored
Comment=A window has been restored from fullscreen

View file

@ -104,6 +104,12 @@ bool Notify::raise(Event e, const QString& message, Client* c)
case TilingLayoutChanged:
event = "tilinglayoutchanged";
break;
case FullScreen:
event = "fullscreen";
break;
case UnFullScreen:
event = "unfullscreen";
break;
default:
if ((e > DesktopChange) && (e <= DesktopChange + 20)) {
event = QString("desktop%1").arg(e - DesktopChange);

View file

@ -59,6 +59,8 @@ public:
DemandAttentionOther,
CompositingSuspendedDbus,
TilingLayoutChanged,
FullScreen,
UnFullScreen,
DesktopChange = 100
};