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.
This commit is contained in:
parent
220a1e0441
commit
65ad7ffb27
3 changed files with 9 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue