Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I1f9418f4f5783291286417f6faf6277e0679007c
This commit is contained in:
commit
1f54136d65
@ -426,7 +426,6 @@ void QWaylandWindow::setVisible(bool visible)
|
|||||||
// QWaylandShmBackingStore::beginPaint().
|
// QWaylandShmBackingStore::beginPaint().
|
||||||
} else {
|
} else {
|
||||||
sendExposeEvent(QRect());
|
sendExposeEvent(QRect());
|
||||||
if (window()->type() == Qt::Popup)
|
|
||||||
closePopups(this);
|
closePopups(this);
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
@ -46,6 +46,7 @@ private slots:
|
|||||||
void popup();
|
void popup();
|
||||||
void tooltipOnPopup();
|
void tooltipOnPopup();
|
||||||
void switchPopups();
|
void switchPopups();
|
||||||
|
void hidePopupParent();
|
||||||
void pongs();
|
void pongs();
|
||||||
void minMaxSize();
|
void minMaxSize();
|
||||||
void windowGeometry();
|
void windowGeometry();
|
||||||
@ -219,8 +220,8 @@ void tst_xdgshell::popup()
|
|||||||
p->sendFrame(c);
|
p->sendFrame(c);
|
||||||
uint serial = p->sendButton(client(), BTN_LEFT, Pointer::button_state_pressed);
|
uint serial = p->sendButton(client(), BTN_LEFT, Pointer::button_state_pressed);
|
||||||
p->sendButton(c, BTN_LEFT, Pointer::button_state_released);
|
p->sendButton(c, BTN_LEFT, Pointer::button_state_released);
|
||||||
return serial;
|
|
||||||
p->sendFrame(c);
|
p->sendFrame(c);
|
||||||
|
return serial;
|
||||||
});
|
});
|
||||||
|
|
||||||
QTRY_VERIFY(window.m_popup);
|
QTRY_VERIFY(window.m_popup);
|
||||||
@ -429,6 +430,50 @@ void tst_xdgshell::switchPopups()
|
|||||||
QCOMPOSITOR_TRY_VERIFY(xdgPopup()->m_xdgSurface->m_committedConfigureSerial);
|
QCOMPOSITOR_TRY_VERIFY(xdgPopup()->m_xdgSurface->m_committedConfigureSerial);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_xdgshell::hidePopupParent()
|
||||||
|
{
|
||||||
|
class Window : public QRasterWindow {
|
||||||
|
public:
|
||||||
|
void mousePressEvent(QMouseEvent *event) override
|
||||||
|
{
|
||||||
|
QRasterWindow::mousePressEvent(event);
|
||||||
|
m_popup.reset(new QRasterWindow);
|
||||||
|
m_popup->setTransientParent(this);
|
||||||
|
m_popup->setFlags(Qt::Popup);
|
||||||
|
m_popup->resize(100, 100);
|
||||||
|
m_popup->show();
|
||||||
|
}
|
||||||
|
QScopedPointer<QRasterWindow> m_popup;
|
||||||
|
};
|
||||||
|
Window window;
|
||||||
|
window.resize(200, 200);
|
||||||
|
window.show();
|
||||||
|
|
||||||
|
QCOMPOSITOR_TRY_VERIFY(xdgToplevel());
|
||||||
|
exec([=] { xdgToplevel()->sendCompleteConfigure(); });
|
||||||
|
QCOMPOSITOR_TRY_VERIFY(xdgToplevel()->m_xdgSurface->m_committedConfigureSerial);
|
||||||
|
|
||||||
|
exec([=] {
|
||||||
|
auto *surface = xdgToplevel()->surface();
|
||||||
|
auto *p = pointer();
|
||||||
|
auto *c = client();
|
||||||
|
p->sendEnter(surface, {100, 100});
|
||||||
|
p->sendFrame(c);
|
||||||
|
p->sendButton(c, BTN_LEFT, Pointer::button_state_pressed);
|
||||||
|
p->sendButton(c, BTN_LEFT, Pointer::button_state_released);
|
||||||
|
p->sendFrame(c);
|
||||||
|
});
|
||||||
|
QCOMPOSITOR_TRY_VERIFY(xdgPopup());
|
||||||
|
exec([=] {
|
||||||
|
xdgPopup()->sendConfigure(QRect(100, 100, 100, 100));
|
||||||
|
xdgPopup()->m_xdgSurface->sendConfigure();
|
||||||
|
});
|
||||||
|
QCOMPOSITOR_TRY_VERIFY(xdgPopup()->m_xdgSurface->m_committedConfigureSerial);
|
||||||
|
|
||||||
|
window.hide();
|
||||||
|
QCOMPOSITOR_TRY_VERIFY(!xdgToplevel());
|
||||||
|
}
|
||||||
|
|
||||||
void tst_xdgshell::pongs()
|
void tst_xdgshell::pongs()
|
||||||
{
|
{
|
||||||
// Create and show a window to trigger shell integration initialzation,
|
// Create and show a window to trigger shell integration initialzation,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user