Don't map screenedge approach window if edge is only used for touch
Summary: Another regression from enabling touch support on X11. The approach window for pointer input gets unmapped as soon as the mouse enters the window. This ensures that mouse motion events are not stolen from other applications. But with the touch events we did not even react on the enter event if it's not activated for pointer. The result was an area around the screenedge being blocked for pointer input. This change only creates and maps the approach window if the edge is activated for pointer input. BUG: 378951 Test Plan: Activated edges through pointer and touch, reconfigured and tested motion events Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D5528
This commit is contained in:
parent
ac08c5ac9d
commit
eec6afe6f5
1 changed files with 15 additions and 1 deletions
|
@ -77,6 +77,9 @@ void WindowBasedEdge::createWindow()
|
|||
|
||||
void WindowBasedEdge::createApproachWindow()
|
||||
{
|
||||
if (!activatesForPointer()) {
|
||||
return;
|
||||
}
|
||||
if (m_approachWindow.isValid()) {
|
||||
return;
|
||||
}
|
||||
|
@ -95,11 +98,16 @@ void WindowBasedEdge::createApproachWindow()
|
|||
void WindowBasedEdge::doGeometryUpdate()
|
||||
{
|
||||
m_window.setGeometry(geometry());
|
||||
m_approachWindow.setGeometry(approachGeometry());
|
||||
if (m_approachWindow.isValid()) {
|
||||
m_approachWindow.setGeometry(approachGeometry());
|
||||
}
|
||||
}
|
||||
|
||||
void WindowBasedEdge::doStartApproaching()
|
||||
{
|
||||
if (!activatesForPointer()) {
|
||||
return;
|
||||
}
|
||||
m_approachWindow.unmap();
|
||||
Cursor *cursor = Cursor::self();
|
||||
connect(cursor, SIGNAL(posChanged(QPoint)), SLOT(updateApproaching(QPoint)));
|
||||
|
@ -108,6 +116,9 @@ void WindowBasedEdge::doStartApproaching()
|
|||
|
||||
void WindowBasedEdge::doStopApproaching()
|
||||
{
|
||||
if (!activatesForPointer()) {
|
||||
return;
|
||||
}
|
||||
Cursor *cursor = Cursor::self();
|
||||
disconnect(cursor, SIGNAL(posChanged(QPoint)), this, SLOT(updateApproaching(QPoint)));
|
||||
cursor->stopMousePolling();
|
||||
|
@ -119,6 +130,9 @@ void WindowBasedEdge::doUpdateBlocking()
|
|||
if (!isReserved()) {
|
||||
return;
|
||||
}
|
||||
if (!activatesForPointer()) {
|
||||
return;
|
||||
}
|
||||
if (isBlocked()) {
|
||||
m_window.unmap();
|
||||
m_approachWindow.unmap();
|
||||
|
|
Loading…
Reference in a new issue