Changeset View
Changeset View
Standalone View
Standalone View
pointer_input.cpp
Show First 20 Lines • Show All 577 Lines • ▼ Show 20 Line(s) | 538 | { | |||
---|---|---|---|---|---|
578 | 578 | | |||
579 | m_focusGeometryConnection = connect(focusNow, &Toplevel::geometryChanged, this, | 579 | m_focusGeometryConnection = connect(focusNow, &Toplevel::geometryChanged, this, | ||
580 | [this] { | 580 | [this] { | ||
581 | // TODO: why no assert possible? | 581 | // TODO: why no assert possible? | ||
582 | if (!focus()) { | 582 | if (!focus()) { | ||
583 | return; | 583 | return; | ||
584 | } | 584 | } | ||
585 | // TODO: can we check on the client instead? | 585 | // TODO: can we check on the client instead? | ||
586 | if (workspace()->getMovingClient()) { | 586 | if (workspace()->moveResizeClient()) { | ||
587 | // don't update while moving | 587 | // don't update while moving | ||
588 | return; | 588 | return; | ||
589 | } | 589 | } | ||
590 | auto seat = waylandServer()->seat(); | 590 | auto seat = waylandServer()->seat(); | ||
591 | if (focus()->surface() != seat->focusedPointerSurface()) { | 591 | if (focus()->surface() != seat->focusedPointerSurface()) { | ||
592 | return; | 592 | return; | ||
593 | } | 593 | } | ||
594 | seat->setFocusedPointerSurfaceTransformation(focus()->inputTransformation()); | 594 | seat->setFocusedPointerSurfaceTransformation(focus()->inputTransformation()); | ||
▲ Show 20 Lines • Show All 508 Lines • ▼ Show 20 Line(s) | 1093 | { | |||
1103 | } | 1103 | } | ||
1104 | reevaluteSource(); | 1104 | reevaluteSource(); | ||
1105 | } | 1105 | } | ||
1106 | 1106 | | |||
1107 | void CursorImage::updateMoveResize() | 1107 | void CursorImage::updateMoveResize() | ||
1108 | { | 1108 | { | ||
1109 | m_moveResizeCursor.image = QImage(); | 1109 | m_moveResizeCursor.image = QImage(); | ||
1110 | m_moveResizeCursor.hotSpot = QPoint(); | 1110 | m_moveResizeCursor.hotSpot = QPoint(); | ||
1111 | if (AbstractClient *c = workspace()->getMovingClient()) { | 1111 | if (AbstractClient *c = workspace()->moveResizeClient()) { | ||
1112 | loadThemeCursor(c->cursor(), &m_moveResizeCursor); | 1112 | loadThemeCursor(c->cursor(), &m_moveResizeCursor); | ||
1113 | if (m_currentSource == CursorSource::MoveResize) { | 1113 | if (m_currentSource == CursorSource::MoveResize) { | ||
1114 | emit changed(); | 1114 | emit changed(); | ||
1115 | } | 1115 | } | ||
1116 | } | 1116 | } | ||
1117 | reevaluteSource(); | 1117 | reevaluteSource(); | ||
1118 | } | 1118 | } | ||
1119 | 1119 | | |||
▲ Show 20 Lines • Show All 212 Lines • ▼ Show 20 Line(s) | 1322 | { | |||
1332 | if (input()->isSelectingWindow()) { | 1332 | if (input()->isSelectingWindow()) { | ||
1333 | setSource(CursorSource::WindowSelector); | 1333 | setSource(CursorSource::WindowSelector); | ||
1334 | return; | 1334 | return; | ||
1335 | } | 1335 | } | ||
1336 | if (effects && static_cast<EffectsHandlerImpl*>(effects)->isMouseInterception()) { | 1336 | if (effects && static_cast<EffectsHandlerImpl*>(effects)->isMouseInterception()) { | ||
1337 | setSource(CursorSource::EffectsOverride); | 1337 | setSource(CursorSource::EffectsOverride); | ||
1338 | return; | 1338 | return; | ||
1339 | } | 1339 | } | ||
1340 | if (workspace() && workspace()->getMovingClient()) { | 1340 | if (workspace() && workspace()->moveResizeClient()) { | ||
1341 | setSource(CursorSource::MoveResize); | 1341 | setSource(CursorSource::MoveResize); | ||
1342 | return; | 1342 | return; | ||
1343 | } | 1343 | } | ||
1344 | if (!m_pointer->decoration().isNull()) { | 1344 | if (!m_pointer->decoration().isNull()) { | ||
1345 | setSource(CursorSource::Decoration); | 1345 | setSource(CursorSource::Decoration); | ||
1346 | return; | 1346 | return; | ||
1347 | } | 1347 | } | ||
1348 | if (!m_pointer->focus().isNull() && waylandServer()->seat()->focusedPointer()) { | 1348 | if (!m_pointer->focus().isNull() && waylandServer()->seat()->focusedPointer()) { | ||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |