Changeset View
Changeset View
Standalone View
Standalone View
src/server/keyboard_interface.cpp
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Line(s) | 115 | { | |||
---|---|---|---|---|---|
116 | Q_D(); | 116 | Q_D(); | ||
117 | d->sendLeave(d->focusedChildSurface, serial); | 117 | d->sendLeave(d->focusedChildSurface, serial); | ||
118 | disconnect(d->destroyConnection); | 118 | disconnect(d->destroyConnection); | ||
119 | d->focusedChildSurface.clear(); | 119 | d->focusedChildSurface.clear(); | ||
120 | d->focusedSurface = surface; | 120 | d->focusedSurface = surface; | ||
121 | if (!d->focusedSurface) { | 121 | if (!d->focusedSurface) { | ||
122 | return; | 122 | return; | ||
123 | } | 123 | } | ||
124 | d->destroyConnection = connect(d->focusedSurface, &QObject::destroyed, this, | 124 | d->destroyConnection = connect(d->focusedSurface, &Resource::aboutToBeUnbound, this, | ||
125 | [this] { | 125 | [this] { | ||
126 | Q_D(); | 126 | Q_D(); | ||
127 | if (d->resource) { | ||||
128 | wl_keyboard_send_leave(d->resource, d->global->display()->nextSerial(), d->focusedSurface->resource()); | ||||
129 | } | ||||
127 | d->focusedSurface = nullptr; | 130 | d->focusedSurface = nullptr; | ||
128 | d->focusedChildSurface.clear(); | 131 | d->focusedChildSurface.clear(); | ||
129 | } | 132 | } | ||
130 | ); | 133 | ); | ||
131 | d->focusedChildSurface = QPointer<SurfaceInterface>(surface); | 134 | d->focusedChildSurface = QPointer<SurfaceInterface>(surface); | ||
132 | 135 | | |||
133 | d->sendEnter(d->focusedSurface, serial); | 136 | d->sendEnter(d->focusedSurface, serial); | ||
134 | d->client->flush(); | 137 | d->client->flush(); | ||
▲ Show 20 Lines • Show All 55 Lines • Show Last 20 Lines |