Changeset View
Changeset View
Standalone View
Standalone View
virtualkeyboard.cpp
Show All 20 Lines | |||||
21 | #include "virtualkeyboard_dbus.h" | 21 | #include "virtualkeyboard_dbus.h" | ||
22 | #include "input.h" | 22 | #include "input.h" | ||
23 | #include "keyboard_input.h" | 23 | #include "keyboard_input.h" | ||
24 | #include "utils.h" | 24 | #include "utils.h" | ||
25 | #include "screens.h" | 25 | #include "screens.h" | ||
26 | #include "wayland_server.h" | 26 | #include "wayland_server.h" | ||
27 | #include "workspace.h" | 27 | #include "workspace.h" | ||
28 | #include "xkb.h" | 28 | #include "xkb.h" | ||
29 | #include "xdgshellclient.h" | | |||
30 | #include "screenlockerwatcher.h" | 29 | #include "screenlockerwatcher.h" | ||
31 | 30 | | |||
32 | #include <KWayland/Server/display.h> | 31 | #include <KWayland/Server/display.h> | ||
33 | #include <KWayland/Server/seat_interface.h> | 32 | #include <KWayland/Server/seat_interface.h> | ||
34 | #include <KWayland/Server/textinput_interface.h> | 33 | #include <KWayland/Server/textinput_interface.h> | ||
35 | #include <KWayland/Server/surface_interface.h> | 34 | #include <KWayland/Server/surface_interface.h> | ||
36 | 35 | | |||
37 | #include <KStatusNotifierItem> | 36 | #include <KStatusNotifierItem> | ||
▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | 138 | if (auto t = waylandServer()->seat()->focusedTextInput()) { | |||
151 | ); | 150 | ); | ||
152 | m_waylandResetConnection = connect(t, &TextInputInterface::requestReset, qApp->inputMethod(), &QInputMethod::reset); | 151 | m_waylandResetConnection = connect(t, &TextInputInterface::requestReset, qApp->inputMethod(), &QInputMethod::reset); | ||
153 | m_waylandEnabledConnection = connect(t, &TextInputInterface::enabledChanged, this, | 152 | m_waylandEnabledConnection = connect(t, &TextInputInterface::enabledChanged, this, | ||
154 | [] { | 153 | [] { | ||
155 | qApp->inputMethod()->update(Qt::ImQueryAll); | 154 | qApp->inputMethod()->update(Qt::ImQueryAll); | ||
156 | } | 155 | } | ||
157 | ); | 156 | ); | ||
158 | 157 | | |||
159 | auto newClient = waylandServer()->findAbstractClient(waylandServer()->seat()->focusedTextInputSurface()); | 158 | auto newClient = waylandServer()->findClient(waylandServer()->seat()->focusedTextInputSurface()); | ||
160 | // Reset the old client virtual keybaord geom if necessary | 159 | // Reset the old client virtual keybaord geom if necessary | ||
161 | // Old and new clients could be the same if focus moves between subsurfaces | 160 | // Old and new clients could be the same if focus moves between subsurfaces | ||
162 | if (newClient != m_trackedClient) { | 161 | if (newClient != m_trackedClient) { | ||
163 | if (m_trackedClient) { | 162 | if (m_trackedClient) { | ||
164 | m_trackedClient->setVirtualKeyboardGeometry(QRect()); | 163 | m_trackedClient->setVirtualKeyboardGeometry(QRect()); | ||
165 | } | 164 | } | ||
166 | m_trackedClient = newClient; | 165 | m_trackedClient = newClient; | ||
167 | } | 166 | } | ||
168 | 167 | | |||
169 | m_trackedClient = waylandServer()->findAbstractClient(waylandServer()->seat()->focusedTextInputSurface()); | 168 | m_trackedClient = waylandServer()->findClient(waylandServer()->seat()->focusedTextInputSurface()); | ||
170 | 169 | | |||
171 | updateInputPanelState(); | 170 | updateInputPanelState(); | ||
172 | } else { | 171 | } else { | ||
173 | m_waylandShowConnection = QMetaObject::Connection(); | 172 | m_waylandShowConnection = QMetaObject::Connection(); | ||
174 | m_waylandHideConnection = QMetaObject::Connection(); | 173 | m_waylandHideConnection = QMetaObject::Connection(); | ||
175 | m_waylandHintsConnection = QMetaObject::Connection(); | 174 | m_waylandHintsConnection = QMetaObject::Connection(); | ||
176 | m_waylandSurroundingTextConnection = QMetaObject::Connection(); | 175 | m_waylandSurroundingTextConnection = QMetaObject::Connection(); | ||
177 | m_waylandResetConnection = QMetaObject::Connection(); | 176 | m_waylandResetConnection = QMetaObject::Connection(); | ||
▲ Show 20 Lines • Show All 325 Lines • Show Last 20 Lines |