Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-77987

Qt::ImCursorRectangle is inaccurate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.12.4, 5.13.0
    • Fix Version/s: 5.13.2, 5.14.0 Alpha
    • Component/s: QPA: Wayland
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      9de5e8fc4bd5db73531d1590978006d3bcaa4cc4 (qt/qtwayland/5.13)

      Description

      Qt::ImCursorRectangle is inaccurate,should consider frameMargins.

          if (queries & Qt::ImCursorRectangle) {
      #ifdef Q_OS_SYLIXOS
              // Here should be added to the offset of the margins
              auto m = static_cast<QWaylandWindow *>(QGuiApplication::focusWindow()->handle())->frameMargins();
              const QRect &cRect = event.value(Qt::ImCursorRectangle).toRect().translated(m.left(), m.top());
      #else
              const QRect &cRect = event.value(Qt::ImCursorRectangle).toRect();
      #endif
              const QRect &tRect = QGuiApplication::inputMethod()->inputItemTransform().mapRect(cRect);
              set_cursor_rectangle(tRect.x(), tRect.y(), tRect.width(), tRect.height());
          }
      

      Code in: qt5\qtwayland\src\client\qwaylandinputcontext.cpp

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            • Assignee:
              johanhelsing Johan Helsing
              Reporter:
              xiaoyan xiao yan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes