Changeset View
Changeset View
Standalone View
Standalone View
touch_input.cpp
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Line(s) | 111 | if (!focusNow || !focusNow->surface() || decoration()) { | |||
---|---|---|---|---|---|
113 | seat->setFocusedTouchSurface(nullptr); | 113 | seat->setFocusedTouchSurface(nullptr); | ||
114 | return; | 114 | return; | ||
115 | } | 115 | } | ||
116 | 116 | | |||
117 | // TODO: invalidate pointer focus? | 117 | // TODO: invalidate pointer focus? | ||
118 | 118 | | |||
119 | // FIXME: add input transformation API to KWayland::Server::SeatInterface for touch input | 119 | // FIXME: add input transformation API to KWayland::Server::SeatInterface for touch input | ||
120 | seat->setFocusedTouchSurface(focusNow->surface(), -1 * focusNow->inputTransformation().map(focusNow->pos()) + focusNow->pos()); | 120 | seat->setFocusedTouchSurface(focusNow->surface(), -1 * focusNow->inputTransformation().map(focusNow->pos()) + focusNow->pos()); | ||
121 | m_focusGeometryConnection = connect(focusNow, &Toplevel::geometryChanged, this, | 121 | m_focusGeometryConnection = connect(focusNow, &Toplevel::frameGeometryChanged, this, | ||
122 | [this] { | 122 | [this] { | ||
123 | if (focus().isNull()) { | 123 | if (focus().isNull()) { | ||
124 | return; | 124 | return; | ||
125 | } | 125 | } | ||
126 | auto seat = waylandServer()->seat(); | 126 | auto seat = waylandServer()->seat(); | ||
127 | if (focus().data()->surface() != seat->focusedTouchSurface()) { | 127 | if (focus().data()->surface() != seat->focusedTouchSurface()) { | ||
128 | return; | 128 | return; | ||
129 | } | 129 | } | ||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |