Emit windowShown and windowHidden from Client::internalKeep and ::internalHide
Summary: With this change auto-hiding panels are animated again by SlidingPopups effect. Test Plan: Test case adjusted, and tested in VM Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D2157 BUG: 354407 FIXED-IN: 5.8.0
This commit is contained in:
parent
5e1e2be5e8
commit
a1afeded6a
2 changed files with 16 additions and 2 deletions
|
@ -136,18 +136,30 @@ void ScreenEdgeClientShowTest::testScreenEdgeShowHideX11()
|
|||
QVERIFY(!client->hasStrut());
|
||||
QVERIFY(!client->isHiddenInternal());
|
||||
|
||||
QSignalSpy effectsWindowAdded(effects, &EffectsHandler::windowAdded);
|
||||
QVERIFY(effectsWindowAdded.isValid());
|
||||
QVERIFY(effectsWindowAdded.wait());
|
||||
|
||||
// now try to hide
|
||||
QFETCH(quint32, location);
|
||||
xcb_change_property(c.data(), XCB_PROP_MODE_REPLACE, w, atom, XCB_ATOM_CARDINAL, 32, 1, &location);
|
||||
xcb_flush(c.data());
|
||||
|
||||
// we don't have a signal yet, so QTRY_VERIFY it is
|
||||
QTRY_VERIFY(client->isHiddenInternal());
|
||||
QSignalSpy effectsWindowHiddenSpy(effects, &EffectsHandler::windowHidden);
|
||||
QVERIFY(effectsWindowHiddenSpy.isValid());
|
||||
QSignalSpy clientHiddenSpy(client, &Client::windowHidden);
|
||||
QVERIFY(clientHiddenSpy.isValid());
|
||||
QVERIFY(clientHiddenSpy.wait());
|
||||
QVERIFY(client->isHiddenInternal());
|
||||
QCOMPARE(effectsWindowHiddenSpy.count(), 1);
|
||||
|
||||
// now trigger the edge
|
||||
QSignalSpy effectsWindowShownSpy(effects, &EffectsHandler::windowShown);
|
||||
QVERIFY(effectsWindowShownSpy.isValid());
|
||||
QFETCH(QPoint, triggerPos);
|
||||
Cursor::setPos(triggerPos);
|
||||
QVERIFY(!client->isHiddenInternal());
|
||||
QCOMPARE(effectsWindowShownSpy.count(), 1);
|
||||
|
||||
// destroy window again
|
||||
QSignalSpy windowClosedSpy(client, &Client::windowClosed);
|
||||
|
|
|
@ -947,6 +947,7 @@ void Client::internalShow()
|
|||
if (Compositor::isCreated()) {
|
||||
Compositor::self()->checkUnredirect();
|
||||
}
|
||||
emit windowShown(this);
|
||||
}
|
||||
|
||||
void Client::internalHide()
|
||||
|
@ -961,6 +962,7 @@ void Client::internalHide()
|
|||
updateHiddenPreview();
|
||||
addWorkspaceRepaint(visibleRect());
|
||||
workspace()->clientHidden(this);
|
||||
emit windowHidden(this);
|
||||
if (Compositor::isCreated()) {
|
||||
Compositor::self()->checkUnredirect();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue