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/D5528icc-effect-5.14.5
parent
ac08c5ac9d
commit
eec6afe6f5
|
@ -77,6 +77,9 @@ void WindowBasedEdge::createWindow()
|
||||||
|
|
||||||
void WindowBasedEdge::createApproachWindow()
|
void WindowBasedEdge::createApproachWindow()
|
||||||
{
|
{
|
||||||
|
if (!activatesForPointer()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (m_approachWindow.isValid()) {
|
if (m_approachWindow.isValid()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -95,11 +98,16 @@ void WindowBasedEdge::createApproachWindow()
|
||||||
void WindowBasedEdge::doGeometryUpdate()
|
void WindowBasedEdge::doGeometryUpdate()
|
||||||
{
|
{
|
||||||
m_window.setGeometry(geometry());
|
m_window.setGeometry(geometry());
|
||||||
|
if (m_approachWindow.isValid()) {
|
||||||
m_approachWindow.setGeometry(approachGeometry());
|
m_approachWindow.setGeometry(approachGeometry());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowBasedEdge::doStartApproaching()
|
void WindowBasedEdge::doStartApproaching()
|
||||||
{
|
{
|
||||||
|
if (!activatesForPointer()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
m_approachWindow.unmap();
|
m_approachWindow.unmap();
|
||||||
Cursor *cursor = Cursor::self();
|
Cursor *cursor = Cursor::self();
|
||||||
connect(cursor, SIGNAL(posChanged(QPoint)), SLOT(updateApproaching(QPoint)));
|
connect(cursor, SIGNAL(posChanged(QPoint)), SLOT(updateApproaching(QPoint)));
|
||||||
|
@ -108,6 +116,9 @@ void WindowBasedEdge::doStartApproaching()
|
||||||
|
|
||||||
void WindowBasedEdge::doStopApproaching()
|
void WindowBasedEdge::doStopApproaching()
|
||||||
{
|
{
|
||||||
|
if (!activatesForPointer()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Cursor *cursor = Cursor::self();
|
Cursor *cursor = Cursor::self();
|
||||||
disconnect(cursor, SIGNAL(posChanged(QPoint)), this, SLOT(updateApproaching(QPoint)));
|
disconnect(cursor, SIGNAL(posChanged(QPoint)), this, SLOT(updateApproaching(QPoint)));
|
||||||
cursor->stopMousePolling();
|
cursor->stopMousePolling();
|
||||||
|
@ -119,6 +130,9 @@ void WindowBasedEdge::doUpdateBlocking()
|
||||||
if (!isReserved()) {
|
if (!isReserved()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!activatesForPointer()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (isBlocked()) {
|
if (isBlocked()) {
|
||||||
m_window.unmap();
|
m_window.unmap();
|
||||||
m_approachWindow.unmap();
|
m_approachWindow.unmap();
|
||||||
|
|
Loading…
Reference in New Issue