Changeset View
Changeset View
Standalone View
Standalone View
pointer_input.cpp
Show First 20 Lines • Show All 496 Lines • ▼ Show 20 Line(s) | 483 | { | |||
---|---|---|---|---|---|
497 | 497 | | |||
498 | waylandServer()->seat()->setFocusedPointerSurface(nullptr); | 498 | waylandServer()->seat()->setFocusedPointerSurface(nullptr); | ||
499 | 499 | | |||
500 | auto pos = m_pos - now->client()->pos(); | 500 | auto pos = m_pos - now->client()->pos(); | ||
501 | QHoverEvent event(QEvent::HoverEnter, pos, pos); | 501 | QHoverEvent event(QEvent::HoverEnter, pos, pos); | ||
502 | QCoreApplication::instance()->sendEvent(now->decoration(), &event); | 502 | QCoreApplication::instance()->sendEvent(now->decoration(), &event); | ||
503 | now->client()->processDecorationMove(pos.toPoint(), m_pos.toPoint()); | 503 | now->client()->processDecorationMove(pos.toPoint(), m_pos.toPoint()); | ||
504 | 504 | | |||
505 | m_decorationGeometryConnection = connect(decoration()->client(), &AbstractClient::geometryChanged, this, | 505 | m_decorationGeometryConnection = connect(decoration()->client(), &AbstractClient::frameGeometryChanged, this, | ||
506 | [this] { | 506 | [this] { | ||
507 | // ensure maximize button gets the leave event when maximizing/restore a window, see BUG 385140 | 507 | // ensure maximize button gets the leave event when maximizing/restore a window, see BUG 385140 | ||
508 | const auto oldDeco = decoration(); | 508 | const auto oldDeco = decoration(); | ||
509 | update(); | 509 | update(); | ||
510 | if (oldDeco && | 510 | if (oldDeco && | ||
511 | oldDeco == decoration() && | 511 | oldDeco == decoration() && | ||
512 | !decoration()->client()->isMove() && | 512 | !decoration()->client()->isMove() && | ||
513 | !decoration()->client()->isResize() && | 513 | !decoration()->client()->isResize() && | ||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 526 | { | |||
559 | // TODO: why? in order to reset the cursor icon? | 559 | // TODO: why? in order to reset the cursor icon? | ||
560 | s_cursorUpdateBlocking = true; | 560 | s_cursorUpdateBlocking = true; | ||
561 | seat->setFocusedPointerSurface(nullptr); | 561 | seat->setFocusedPointerSurface(nullptr); | ||
562 | s_cursorUpdateBlocking = false; | 562 | s_cursorUpdateBlocking = false; | ||
563 | 563 | | |||
564 | seat->setPointerPos(m_pos.toPoint()); | 564 | seat->setPointerPos(m_pos.toPoint()); | ||
565 | seat->setFocusedPointerSurface(focusNow->surface(), focusNow->inputTransformation()); | 565 | seat->setFocusedPointerSurface(focusNow->surface(), focusNow->inputTransformation()); | ||
566 | 566 | | |||
567 | m_focusGeometryConnection = connect(focusNow, &Toplevel::geometryChanged, this, | 567 | m_focusGeometryConnection = connect(focusNow, &Toplevel::frameGeometryChanged, this, | ||
568 | [this] { | 568 | [this] { | ||
569 | // TODO: why no assert possible? | 569 | // TODO: why no assert possible? | ||
570 | if (!focus()) { | 570 | if (!focus()) { | ||
571 | return; | 571 | return; | ||
572 | } | 572 | } | ||
573 | // TODO: can we check on the client instead? | 573 | // TODO: can we check on the client instead? | ||
574 | if (workspace()->moveResizeClient()) { | 574 | if (workspace()->moveResizeClient()) { | ||
575 | // don't update while moving | 575 | // don't update while moving | ||
▲ Show 20 Lines • Show All 825 Lines • Show Last 20 Lines |