Skip to content

Commit 4ae0eae

Browse files
committed
wayland/toplevel: add close() request
Closes #37
1 parent e0cff67 commit 4ae0eae

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/wayland/toplevel_management/qml.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ void Toplevel::onClosed() {
3232
}
3333

3434
void Toplevel::activate() { this->handle->activate(); }
35+
void Toplevel::close() { this->handle->close(); }
3536

3637
QString Toplevel::appId() const { return this->handle->appId(); }
3738
QString Toplevel::title() const { return this->handle->title(); }

src/wayland/toplevel_management/qml.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ class Toplevel: public QObject {
5656
/// The request may be ignored by the compositor.
5757
Q_INVOKABLE void activate();
5858

59+
/// Request that this toplevel is closed.
60+
/// The request may be ignored by the compositor or the application.
61+
Q_INVOKABLE void close();
62+
5963
/// Request that this toplevel is fullscreened on a specific screen.
6064
/// The request may be ignored by the compositor.
6165
Q_INVOKABLE void fullscreenOn(QuickshellScreenInfo* screen);

0 commit comments

Comments
 (0)