diff --git a/autotests/integration/kwin_wayland_test.h b/autotests/integration/kwin_wayland_test.h index 1699bbdd5e..8420a9dce8 100644 --- a/autotests/integration/kwin_wayland_test.h +++ b/autotests/integration/kwin_wayland_test.h @@ -391,6 +391,9 @@ bool unlockScreen(); void initWaylandWorkspace(); +AbstractClient *inputPanelClient(); +KWayland::Client::Surface *inputPanelSurface(); + } } diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index c7e289f647..4ca96119f2 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -257,16 +257,29 @@ public: MockInputMethod(struct wl_registry *registry, int id, int version); ~MockInputMethod(); + AbstractClient *client() const { return m_client; } + Surface *inputPanelSurface() const { return m_inputSurface; } + protected: void zwp_input_method_v1_activate(struct ::zwp_input_method_context_v1 *context) override; void zwp_input_method_v1_deactivate(struct ::zwp_input_method_context_v1 *context) override; private: - Surface *m_inputSurface = nullptr; + QPointer m_inputSurface; QtWayland::zwp_input_panel_surface_v1 *m_inputMethodSurface = nullptr; - AbstractClient *m_client = nullptr; + QPointer m_client; }; +AbstractClient *inputPanelClient() +{ + return s_waylandConnection.inputMethodV1->client(); +} + +Surface *inputPanelSurface() +{ + return s_waylandConnection.inputMethodV1->inputPanelSurface(); +} + MockInputMethod::MockInputMethod(struct wl_registry *registry, int id, int version) : QtWayland::zwp_input_method_v1(registry, id, version) {