From ba6eece7addd75acebf3a799c18b2a69cd79c1e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 9 Apr 2012 23:01:04 +0200 Subject: [PATCH] Wrap QDesktopWidget::resized() signal in KWin scripting Requested by mgottschlag. --- scripting/workspace_wrapper.cpp | 1 + scripting/workspace_wrapper.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/scripting/workspace_wrapper.cpp b/scripting/workspace_wrapper.cpp index 35ef346d8d..c5b684a01b 100644 --- a/scripting/workspace_wrapper.cpp +++ b/scripting/workspace_wrapper.cpp @@ -38,6 +38,7 @@ WorkspaceWrapper::WorkspaceWrapper(QObject* parent) : QObject(parent) connect(ws, SIGNAL(numberDesktopsChanged(int)), SIGNAL(numberDesktopsChanged(int))); connect(ws, SIGNAL(clientDemandsAttentionChanged(KWin::Client*,bool)), SIGNAL(clientDemandsAttentionChanged(KWin::Client*,bool))); connect(QApplication::desktop(), SIGNAL(screenCountChanged(int)), SIGNAL(numberScreensChanged(int))); + connect(QApplication::desktop(), SIGNAL(resized(int)), SIGNAL(screenResized(int))); foreach (KWin::Client *client, ws->clientList()) { setupClientConnections(client); } diff --git a/scripting/workspace_wrapper.h b/scripting/workspace_wrapper.h index d2752210dc..76d60bf5c4 100644 --- a/scripting/workspace_wrapper.h +++ b/scripting/workspace_wrapper.h @@ -97,6 +97,11 @@ signals: * @param count The new number of screens **/ void numberScreensChanged(int count); + /** + * This signal is emitted when the size of @p screen changes. + * Don't forget to fetch an updated client area. + **/ + void screenResized(int screen); public: //------------------------------------------------------------------