[wayland] Provide correct input geometry for client-side decorated clients
Summary: Currently, the input geometry for client-side decorated clients matches the frame geometry, which makes it impossible for a user to resize such clients by just dragging invisible area near window borders. BUG: 416346 Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: cblack, ngraham, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D26716
This commit is contained in:
parent
7b910c51b1
commit
72ca9268ce
3 changed files with 13 additions and 1 deletions
|
@ -2207,7 +2207,9 @@ static bool acceptsInput(Toplevel *t, const QPoint &pos)
|
|||
if (input.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
return input.translated(t->pos()).contains(pos);
|
||||
// TODO: What about sub-surfaces sticking outside the main surface?
|
||||
const QPoint localPoint = pos - t->bufferGeometry().topLeft();
|
||||
return input.contains(localPoint);
|
||||
}
|
||||
|
||||
Toplevel *InputRedirection::findToplevel(const QPoint &pos)
|
||||
|
|
|
@ -295,6 +295,15 @@ void XdgShellClient::deleteClient(XdgShellClient *c)
|
|||
delete c;
|
||||
}
|
||||
|
||||
QRect XdgShellClient::inputGeometry() const
|
||||
{
|
||||
if (isDecorated()) {
|
||||
return AbstractClient::inputGeometry();
|
||||
}
|
||||
// TODO: What about sub-surfaces sticking outside the main surface?
|
||||
return m_bufferGeometry;
|
||||
}
|
||||
|
||||
QRect XdgShellClient::bufferGeometry() const
|
||||
{
|
||||
return m_bufferGeometry;
|
||||
|
|
|
@ -58,6 +58,7 @@ public:
|
|||
XdgShellClient(KWayland::Server::XdgShellPopupInterface *surface);
|
||||
~XdgShellClient() override;
|
||||
|
||||
QRect inputGeometry() const override;
|
||||
QRect bufferGeometry() const override;
|
||||
QStringList activities() const override;
|
||||
QPoint clientContentPos() const override;
|
||||
|
|
Loading…
Reference in a new issue