diff options
Diffstat (limited to 'src/extensions/applicationextension/mextensionhandle.cpp')
-rw-r--r-- | src/extensions/applicationextension/mextensionhandle.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/extensions/applicationextension/mextensionhandle.cpp b/src/extensions/applicationextension/mextensionhandle.cpp index 69140db0..1d1fe690 100644 --- a/src/extensions/applicationextension/mextensionhandle.cpp +++ b/src/extensions/applicationextension/mextensionhandle.cpp @@ -71,7 +71,6 @@ MExtensionHandlePrivate::MExtensionHandlePrivate() : aliveResponseTimeout(3000), runnerConnectionTimeout(20000), applicationVisible(true), - widgetVisible(true), remoteActions(), q_ptr(NULL) { @@ -88,7 +87,8 @@ MExtensionHandlePrivate::~MExtensionHandlePrivate() void MExtensionHandlePrivate::visibilityChanged() { - communicator.sendMessage(MAppletVisibilityMessage(applicationVisible && widgetVisible)); + Q_Q(MExtensionHandle); + communicator.sendMessage(MAppletVisibilityMessage(q->isVisible() && applicationVisible)); } void MExtensionHandlePrivate::operationComplete(const QString &operation, const QString &pkg, const QString &error) @@ -127,7 +127,7 @@ MExtensionHandle::MExtensionHandle(QGraphicsItem *parent) : SIGNAL(orientationChanged(M::Orientation)), this, SLOT(orientationEvent(M::Orientation))); - connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(visibilityEvent(bool))); + connect(this, SIGNAL(visibleChanged()), this, SLOT(visibilityChanged())); // Configure the timers connect(&d->aliveTimer, SIGNAL(timeout()), this, SLOT(sendAliveMessageRequest())); @@ -148,7 +148,7 @@ MExtensionHandle::MExtensionHandle(MExtensionHandlePrivate *dd, MExtensionHandle SIGNAL(orientationChanged(M::Orientation)), this, SLOT(orientationEvent(M::Orientation))); - connect(this, SIGNAL(visibilityChanged(bool)), this, SLOT(visibilityEvent(bool))); + connect(this, SIGNAL(visibleChanged()), this, SLOT(visibilityChanged())); // Configure the timers connect(&d->aliveTimer, SIGNAL(timeout()), this, SLOT(sendAliveMessageRequest())); @@ -281,6 +281,9 @@ void MExtensionHandle::connectionEstablished() d->aliveTimer.start(5000); sendAliveMessageRequest(); + // Send the visibility changed message to the runner + d->visibilityChanged(); + if (d->oldGeometry.isValid()) { // Restore the old geometry setGeometry(d->oldGeometry); @@ -437,14 +440,18 @@ void MExtensionHandle::sendAliveMessageRequest() d->communicationTimer.start(d->aliveResponseTimeout); } -void MExtensionHandle::visibilityEvent(bool visible) +void MExtensionHandle::visibilityChanged() { Q_D(MExtensionHandle); - - d->widgetVisible = visible; d->visibilityChanged(); } +//TODO: Remove this redundant signal in next API/ABI break window. +void MExtensionHandle::visibilityEvent(bool visible) +{ + Q_UNUSED(visible); +} + void MExtensionHandle::enterDisplayEvent() { Q_D(MExtensionHandle); |