Changeset View
Changeset View
Standalone View
Standalone View
src/server/seat_interface.cpp
Show First 20 Lines • Show All 923 Lines • ▼ Show 20 Line(s) | 923 | [this] { | |||
---|---|---|---|---|---|
924 | Q_D(); | 924 | Q_D(); | ||
925 | d->keys.focus = Private::Keyboard::Focus(); | 925 | d->keys.focus = Private::Keyboard::Focus(); | ||
926 | } | 926 | } | ||
927 | ); | 927 | ); | ||
928 | d->keys.focus.serial = serial; | 928 | d->keys.focus.serial = serial; | ||
929 | // selection? | 929 | // selection? | ||
930 | d->keys.focus.selection = d->dataDeviceForSurface(surface); | 930 | d->keys.focus.selection = d->dataDeviceForSurface(surface); | ||
931 | if (d->keys.focus.selection) { | 931 | if (d->keys.focus.selection) { | ||
932 | if (d->currentSelection) { | 932 | if (d->currentSelection && d->currentSelection->selection()) { | ||
933 | d->keys.focus.selection->sendSelection(d->currentSelection); | 933 | d->keys.focus.selection->sendSelection(d->currentSelection); | ||
934 | } else { | 934 | } else { | ||
935 | d->keys.focus.selection->sendClearSelection(); | 935 | d->keys.focus.selection->sendClearSelection(); | ||
936 | } | 936 | } | ||
937 | } | 937 | } | ||
938 | } | 938 | } | ||
939 | for (auto it = d->keys.focus.keyboards.constBegin(), end = d->keys.focus.keyboards.constEnd(); it != end; ++it) { | 939 | for (auto it = d->keys.focus.keyboards.constBegin(), end = d->keys.focus.keyboards.constEnd(); it != end; ++it) { | ||
940 | (*it)->setFocusedSurface(surface, serial); | 940 | (*it)->setFocusedSurface(surface, serial); | ||
▲ Show 20 Lines • Show All 416 Lines • Show Last 20 Lines |