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)
|
void InputPanelV1Window::showTopLevel(OutputInterface *output, InputPanelSurfaceV1Interface::Position position)
|
||||||
{
|
{
|
||||||
Q_UNUSED(position);
|
Q_UNUSED(position);
|
||||||
m_mode = Mode::Toplevel;
|
m_mode = Mode::VirtualKeyboard;
|
||||||
setOutput(output);
|
setOutput(output);
|
||||||
maybeShow();
|
maybeShow();
|
||||||
}
|
}
|
||||||
|
@ -66,14 +66,14 @@ void InputPanelV1Window::allow()
|
||||||
|
|
||||||
void InputPanelV1Window::show()
|
void InputPanelV1Window::show()
|
||||||
{
|
{
|
||||||
m_shouldBeShown = true;
|
m_virtualKeyboardShouldBeShown = true;
|
||||||
maybeShow();
|
maybeShow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputPanelV1Window::hide()
|
void InputPanelV1Window::hide()
|
||||||
{
|
{
|
||||||
m_shouldBeShown = false;
|
m_virtualKeyboardShouldBeShown = false;
|
||||||
if (readyForPainting()) {
|
if (readyForPainting() && m_mode != Mode::Overlay) {
|
||||||
hideClient();
|
hideClient();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ void KWin::InputPanelV1Window::reposition()
|
||||||
case Mode::None: {
|
case Mode::None: {
|
||||||
// should never happen
|
// should never happen
|
||||||
}; break;
|
}; break;
|
||||||
case Mode::Toplevel: {
|
case Mode::VirtualKeyboard: {
|
||||||
QSizeF panelSize = surface()->size();
|
QSizeF panelSize = surface()->size();
|
||||||
if (!panelSize.isValid() || panelSize.isEmpty()) {
|
if (!panelSize.isValid() || panelSize.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
|
@ -203,7 +203,7 @@ void InputPanelV1Window::handleMapped()
|
||||||
|
|
||||||
void InputPanelV1Window::maybeShow()
|
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()) {
|
if (shouldShow && !isZombie() && surface()->isMapped()) {
|
||||||
setReadyForPainting();
|
setReadyForPainting();
|
||||||
reposition();
|
reposition();
|
||||||
|
|
|
@ -25,7 +25,7 @@ public:
|
||||||
|
|
||||||
enum class Mode {
|
enum class Mode {
|
||||||
None,
|
None,
|
||||||
Toplevel,
|
VirtualKeyboard,
|
||||||
Overlay,
|
Overlay,
|
||||||
};
|
};
|
||||||
Q_ENUM(Mode)
|
Q_ENUM(Mode)
|
||||||
|
@ -95,7 +95,7 @@ private:
|
||||||
QPointer<Output> m_output;
|
QPointer<Output> m_output;
|
||||||
Mode m_mode = Mode::None;
|
Mode m_mode = Mode::None;
|
||||||
bool m_allowed = false;
|
bool m_allowed = false;
|
||||||
bool m_shouldBeShown = false;
|
bool m_virtualKeyboardShouldBeShown = false;
|
||||||
const QPointer<KWaylandServer::InputPanelSurfaceV1Interface> m_panelSurface;
|
const QPointer<KWaylandServer::InputPanelSurfaceV1Interface> m_panelSurface;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue