[server] Send text input leave if focused surface gets unbound
Summary: As 9266a94400
just for text input.
Test Plan: Adjusted test passes, fails without adjustment
Reviewers: #plasma, #frameworks
Subscribers: plasma-devel
Tags: #plasma_on_wayland, #frameworks
Differential Revision: https://phabricator.kde.org/D6786
This commit is contained in:
parent
1b989a0464
commit
dd873cb980
2 changed files with 3 additions and 1 deletions
|
@ -321,6 +321,8 @@ void TextInputTest::testEnterLeave()
|
|||
QSignalSpy unboundSpy(serverSurface, &QObject::destroyed);
|
||||
surface.reset();
|
||||
QVERIFY(unboundSpy.wait());
|
||||
QVERIFY(leftSpy.wait());
|
||||
QVERIFY(!textInput->enteredSurface());
|
||||
}
|
||||
|
||||
void TextInputTest::testShowHidePanel_data()
|
||||
|
|
|
@ -1437,7 +1437,7 @@ void SeatInterface::setFocusedTextInputSurface(SurfaceInterface *surface)
|
|||
}
|
||||
d->textInput.focus.textInput = t;
|
||||
if (d->textInput.focus.surface) {
|
||||
d->textInput.focus.destroyConnection = connect(surface, &QObject::destroyed, this,
|
||||
d->textInput.focus.destroyConnection = connect(surface, &Resource::aboutToBeUnbound, this,
|
||||
[this] {
|
||||
setFocusedTextInputSurface(nullptr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue