Changeset View
Changeset View
Standalone View
Standalone View
input.cpp
Show First 20 Lines • Show All 1189 Lines • ▼ Show 20 Line(s) | 1189 | if (!TabBox::TabBox::self() || !TabBox::TabBox::self()->isGrabbed()) { | |||
---|---|---|---|---|---|
1190 | return false; | 1190 | return false; | ||
1191 | } | 1191 | } | ||
1192 | return TabBox::TabBox::self()->handleMouseEvent(event); | 1192 | return TabBox::TabBox::self()->handleMouseEvent(event); | ||
1193 | } | 1193 | } | ||
1194 | bool keyEvent(QKeyEvent *event) override { | 1194 | bool keyEvent(QKeyEvent *event) override { | ||
1195 | if (!TabBox::TabBox::self() || !TabBox::TabBox::self()->isGrabbed()) { | 1195 | if (!TabBox::TabBox::self() || !TabBox::TabBox::self()->isGrabbed()) { | ||
1196 | return false; | 1196 | return false; | ||
1197 | } | 1197 | } | ||
1198 | workspace()->activateClient(nullptr); | ||||
1198 | auto seat = waylandServer()->seat(); | 1199 | auto seat = waylandServer()->seat(); | ||
1199 | seat->setFocusedKeyboardSurface(nullptr); | 1200 | seat->setFocusedKeyboardSurface(nullptr); | ||
1200 | // pass the key event to the seat, so that it has a proper model of the currently hold keys | 1201 | // pass the key event to the seat, so that it has a proper model of the currently hold keys | ||
1201 | // this is important for combinations like alt+shift to ensure that shift is not considered pressed | 1202 | // this is important for combinations like alt+shift to ensure that shift is not considered pressed | ||
1202 | passToWaylandServer(event); | 1203 | passToWaylandServer(event); | ||
1203 | 1204 | | |||
1204 | if (event->type() == QEvent::KeyPress) { | 1205 | if (event->type() == QEvent::KeyPress) { | ||
1205 | TabBox::TabBox::self()->keyPress(event->modifiers() | event->key()); | 1206 | TabBox::TabBox::self()->keyPress(event->modifiers() | event->key()); | ||
▲ Show 20 Lines • Show All 1056 Lines • Show Last 20 Lines |