Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
d4e8c7e1
Commit
d4e8c7e1
authored
Feb 01, 2021
by
Vlad Zahorodnii
Browse files
autotests: Fix TestXdgShellClient
(cherry picked from commit
230b560f
)
parent
535cce70
Changes
3
Hide whitespace changes
Inline
Side-by-side
autotests/integration/xdgshellclient_test.cpp
View file @
d4e8c7e1
...
...
@@ -125,13 +125,13 @@ void TestXdgShellClient::testXdgWindowReactive()
QVERIFY
(
rootClient
);
QVERIFY
(
childClient
);
QSignalSpy
frameGeometryChangedSpy
(
childClient
,
&
AbstractClient
::
frameGeometryChang
ed
);
QVERIFY
(
frameGeometryChangedSpy
.
isValid
());
QSignalSpy
popupConfigureRequested
(
popup
.
data
(),
&
Test
::
XdgPopup
::
configureRequest
ed
);
QVERIFY
(
popupConfigureRequested
.
isValid
());
rootClient
->
move
(
rootClient
->
x
()
+
20
,
rootClient
->
y
()
+
20
);
QVERIFY
(
frameGeometryChangedSpy
.
wait
());
QCOMPARE
(
frameGeometryChangedSpy
.
count
(),
1
);
QVERIFY
(
popupConfigureRequested
.
wait
());
QCOMPARE
(
popupConfigureRequested
.
count
(),
1
);
}
void
TestXdgShellClient
::
testXdgWindowRepositioning
()
...
...
xdgshellclient.cpp
View file @
d4e8c7e1
...
...
@@ -1707,7 +1707,7 @@ XdgPopupClient::XdgPopupClient(XdgPopupInterface *shellSurface)
this
,
&
XdgPopupClient
::
destroyClient
);
}
void
XdgPopupClient
::
handlePositionerBindings
()
void
XdgPopupClient
::
updateReactive
()
{
if
(
m_shellSurface
->
positioner
().
isReactive
())
{
connect
(
transientFor
(),
&
AbstractClient
::
frameGeometryChanged
,
...
...
@@ -1720,7 +1720,7 @@ void XdgPopupClient::handlePositionerBindings()
void
XdgPopupClient
::
handleRepositionRequested
(
quint32
token
)
{
handlePositionerBindings
();
updateReactive
();
m_shellSurface
->
sendRepositioned
(
token
);
relayout
();
}
...
...
@@ -2012,6 +2012,8 @@ void XdgPopupClient::initialize()
parentClient
->
addTransient
(
this
);
setTransientFor
(
parentClient
);
updateReactive
();
blockGeometryUpdates
(
true
);
const
QRect
area
=
workspace
()
->
clientArea
(
PlacementArea
,
Screens
::
self
()
->
current
(),
desktop
());
placeIn
(
area
);
...
...
xdgshellclient.h
View file @
d4e8c7e1
...
...
@@ -248,10 +248,10 @@ protected:
private:
void
handleGrabRequested
(
KWaylandServer
::
SeatInterface
*
seat
,
quint32
serial
);
void
handlePositionerBindings
();
void
handleRepositionRequested
(
quint32
token
);
void
initialize
();
void
relayout
();
void
updateReactive
();
KWaylandServer
::
XdgPopupInterface
*
m_shellSurface
;
bool
m_haveExplicitGrab
=
false
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment