Changeset View
Changeset View
Standalone View
Standalone View
libinput/connection.cpp
Show First 20 Lines • Show All 454 Lines • ▼ Show 20 Line(s) | 454 | case LIBINPUT_EVENT_GESTURE_SWIPE_END: { | |||
---|---|---|---|---|---|
455 | SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data()); | 455 | SwipeGestureEvent *se = static_cast<SwipeGestureEvent*>(event.data()); | ||
456 | if (se->isCancelled()) { | 456 | if (se->isCancelled()) { | ||
457 | emit swipeGestureCancelled(se->time(), se->device()); | 457 | emit swipeGestureCancelled(se->time(), se->device()); | ||
458 | } else { | 458 | } else { | ||
459 | emit swipeGestureEnd(se->time(), se->device()); | 459 | emit swipeGestureEnd(se->time(), se->device()); | ||
460 | } | 460 | } | ||
461 | break; | 461 | break; | ||
462 | } | 462 | } | ||
463 | #if HAVE_INPUT_1_9 | | |||
464 | case LIBINPUT_EVENT_SWITCH_TOGGLE: { | 463 | case LIBINPUT_EVENT_SWITCH_TOGGLE: { | ||
465 | SwitchEvent *se = static_cast<SwitchEvent*>(event.data()); | 464 | SwitchEvent *se = static_cast<SwitchEvent*>(event.data()); | ||
466 | switch (se->state()) { | 465 | switch (se->state()) { | ||
467 | case SwitchEvent::State::Off: | 466 | case SwitchEvent::State::Off: | ||
468 | emit switchToggledOff(se->time(), se->timeMicroseconds(), se->device()); | 467 | emit switchToggledOff(se->time(), se->timeMicroseconds(), se->device()); | ||
469 | break; | 468 | break; | ||
470 | case SwitchEvent::State::On: | 469 | case SwitchEvent::State::On: | ||
471 | emit switchToggledOn(se->time(), se->timeMicroseconds(), se->device()); | 470 | emit switchToggledOn(se->time(), se->timeMicroseconds(), se->device()); | ||
472 | break; | 471 | break; | ||
473 | default: | 472 | default: | ||
474 | Q_UNREACHABLE(); | 473 | Q_UNREACHABLE(); | ||
475 | } | 474 | } | ||
476 | break; | 475 | break; | ||
477 | } | 476 | } | ||
478 | #endif | | |||
479 | default: | 477 | default: | ||
480 | // nothing | 478 | // nothing | ||
481 | break; | 479 | break; | ||
482 | } | 480 | } | ||
483 | } | 481 | } | ||
484 | if (wasSuspended) { | 482 | if (wasSuspended) { | ||
485 | if (m_keyboardBeforeSuspend && !m_keyboard) { | 483 | if (m_keyboardBeforeSuspend && !m_keyboard) { | ||
486 | emit hasKeyboardChanged(false); | 484 | emit hasKeyboardChanged(false); | ||
▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines |