inputpanelv1window: never hide overlay panels
Hiding them never makes sense, and the protocol specifies that the show and hide requests are about virtual keyboards, not about overlay planels.
This commit is contained in:
parent
f43c39879d
commit
314b5327b6
2 changed files with 8 additions and 8 deletions
|
@ -53,7 +53,7 @@ void InputPanelV1Window::showOverlayPanel()
|
|||
void InputPanelV1Window::showTopLevel(OutputInterface *output, InputPanelSurfaceV1Interface::Position position)
|
||||
{
|
||||
Q_UNUSED(position);
|
||||
m_mode = Mode::Toplevel;
|
||||
m_mode = Mode::VirtualKeyboard;
|
||||
setOutput(output);
|
||||
maybeShow();
|
||||
}
|
||||
|
@ -66,14 +66,14 @@ void InputPanelV1Window::allow()
|
|||
|
||||
void InputPanelV1Window::show()
|
||||
{
|
||||
m_shouldBeShown = true;
|
||||
m_virtualKeyboardShouldBeShown = true;
|
||||
maybeShow();
|
||||
}
|
||||
|
||||
void InputPanelV1Window::hide()
|
||||
{
|
||||
m_shouldBeShown = false;
|
||||
if (readyForPainting()) {
|
||||
m_virtualKeyboardShouldBeShown = false;
|
||||
if (readyForPainting() && m_mode != Mode::Overlay) {
|
||||
hideClient();
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ void KWin::InputPanelV1Window::reposition()
|
|||
case Mode::None: {
|
||||
// should never happen
|
||||
}; break;
|
||||
case Mode::Toplevel: {
|
||||
case Mode::VirtualKeyboard: {
|
||||
QSizeF panelSize = surface()->size();
|
||||
if (!panelSize.isValid() || panelSize.isEmpty()) {
|
||||
return;
|
||||
|
@ -203,7 +203,7 @@ void InputPanelV1Window::handleMapped()
|
|||
|
||||
void InputPanelV1Window::maybeShow()
|
||||
{
|
||||
const bool shouldShow = m_mode == Mode::Overlay || (m_mode == Mode::Toplevel && m_allowed && m_shouldBeShown);
|
||||
const bool shouldShow = m_mode == Mode::Overlay || (m_mode == Mode::VirtualKeyboard && m_allowed && m_virtualKeyboardShouldBeShown);
|
||||
if (shouldShow && !isZombie() && surface()->isMapped()) {
|
||||
setReadyForPainting();
|
||||
reposition();
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
|
||||
enum class Mode {
|
||||
None,
|
||||
Toplevel,
|
||||
VirtualKeyboard,
|
||||
Overlay,
|
||||
};
|
||||
Q_ENUM(Mode)
|
||||
|
@ -95,7 +95,7 @@ private:
|
|||
QPointer<Output> m_output;
|
||||
Mode m_mode = Mode::None;
|
||||
bool m_allowed = false;
|
||||
bool m_shouldBeShown = false;
|
||||
bool m_virtualKeyboardShouldBeShown = false;
|
||||
const QPointer<KWaylandServer::InputPanelSurfaceV1Interface> m_panelSurface;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue