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

Qt::ImCursorRectangle is inaccurate

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.13.2, 5.14.0 Alpha
    • 5.12.4, 5.13.0
    • QPA: Wayland
    • None
    • All
    • 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

        For Gerrit Dashboard: QTBUG-77987
        # Subject Branch Project Status CR V

        Activity

          People

            johanhelsing Johan Helsing
            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