[wayland] Broadcast application menu events
Summary: Broadcasts application menu events to clients listening to the PlasmaWindow interface. Needs D27464. Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D27818
This commit is contained in:
parent
4ae6c99c6b
commit
394b5082c2
2 changed files with 8 additions and 0 deletions
|
@ -1421,6 +1421,11 @@ void AbstractClient::setupWindowManagementInterface()
|
|||
w->setGeometry(frameGeometry());
|
||||
}
|
||||
);
|
||||
connect(this, &AbstractClient::applicationMenuChanged, w,
|
||||
[w, this] {
|
||||
w->setApplicationMenuPaths(applicationMenuServiceName(), applicationMenuObjectPath());
|
||||
}
|
||||
);
|
||||
connect(w, &PlasmaWindowInterface::closeRequested, this, [this] { closeWindow(); });
|
||||
connect(w, &PlasmaWindowInterface::moveRequested, this,
|
||||
[this] {
|
||||
|
@ -2465,6 +2470,7 @@ void AbstractClient::updateApplicationMenuServiceName(const QString &serviceName
|
|||
|
||||
const bool new_hasApplicationMenu = hasApplicationMenu();
|
||||
|
||||
emit applicationMenuChanged();
|
||||
if (old_hasApplicationMenu != new_hasApplicationMenu) {
|
||||
emit hasApplicationMenuChanged(new_hasApplicationMenu);
|
||||
}
|
||||
|
@ -2478,6 +2484,7 @@ void AbstractClient::updateApplicationMenuObjectPath(const QString &objectPath)
|
|||
|
||||
const bool new_hasApplicationMenu = hasApplicationMenu();
|
||||
|
||||
emit applicationMenuChanged();
|
||||
if (old_hasApplicationMenu != new_hasApplicationMenu) {
|
||||
emit hasApplicationMenuChanged(new_hasApplicationMenu);
|
||||
}
|
||||
|
|
|
@ -907,6 +907,7 @@ Q_SIGNALS:
|
|||
void shadeableChanged(bool);
|
||||
void maximizeableChanged(bool);
|
||||
void desktopFileNameChanged();
|
||||
void applicationMenuChanged();
|
||||
void hasApplicationMenuChanged(bool);
|
||||
void applicationMenuActiveChanged(bool);
|
||||
void unresponsiveChanged(bool);
|
||||
|
|
Loading…
Reference in a new issue