Commit 65ad7ffb authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

inputmethod: do not cover panels with the input method (e.g. virtual keyboard)

This way we can adapt the panels themselves to show useful UX like
hiding the keyboard or switching.
parent 220a1e04
......@@ -69,9 +69,9 @@ void KWin::InputPanelV1Client::reposition()
return;
}
const auto outputGeometry = m_output->geometry();
QRect geo(outputGeometry.topLeft(), panelSize);
geo.translate((outputGeometry.width() - panelSize.width())/2, outputGeometry.height() - panelSize.height());
const QRect availableArea = workspace()->clientArea(MaximizeArea, m_output, desktop());
QRect geo(availableArea.topLeft(), panelSize);
geo.translate((availableArea.width() - panelSize.width())/2, availableArea.height() - panelSize.height());
updateGeometry(geo);
}
} break;
......
......@@ -2299,6 +2299,10 @@ QRect Workspace::clientArea(clientAreaOption opt, int screen, int desktop) const
abort();
}
QRect Workspace::clientArea(clientAreaOption opt, const AbstractOutput *output, int desktop) const
{
return clientArea(opt, kwinApp()->platform()->enabledOutputs().indexOf(output), desktop);
}
QRect Workspace::clientArea(clientAreaOption opt, const QPoint& p, int desktop) const
{
......
......@@ -41,6 +41,7 @@ class Window;
}
class AbstractClient;
class AbstractOutput;
class ColorMapper;
class Compositor;
class Deleted;
......@@ -154,6 +155,7 @@ public:
QRect clientArea(clientAreaOption, const QPoint& p, int desktop) const;
QRect clientArea(clientAreaOption, const AbstractClient* c) const;
QRect clientArea(clientAreaOption, int screen, int desktop) const;
QRect clientArea(clientAreaOption, const AbstractOutput *output, int desktop) const;
QRegion restrictedMoveArea(int desktop, StrutAreas areas = StrutAreaAll) const;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment