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

The damaged region for window decorations is incorrect

    XMLWordPrintable

    Details

    • Platform/s:
      Linux/Wayland
    • Commits:
      3200e86cefd9a83cea45c7cab589bfbf1ff63f4f (qt/qtwayland/5.12)

      Description

      // \a size is without margins
      static QRegion marginsRegion(const QSize &size, const QMargins &margins)
      {
          QRegion r;
          r += QRect(0, 0, size.width(), margins.top()); // top
          r += QRect(0, size.height()+margins.top(), size.width(), margins.bottom()); //bottom
          r += QRect(0, 0, margins.left(), size.height()); //left
          r += QRect(size.width()+margins.left(), 0, margins.right(), size.height()); // right
          return r;
      }
      

      Change to:( See the attachment for specific principles! )

      static QRegion marginsRegion(const QSize &size, const QMargins &margins)
      {
          QRegion r;
          r += QRect(0, 0, size.width() + margins.left(), margins.top()); // top
          r += QRect(size.width() + margins.left(), 0, margins.right(), size.height() + margins.top()); // right
          r += QRect(margins.left(), size.height() + margins.top(), size.width() + margins.right(), margins.bottom()); //bottom
          r += QRect(0, margins.top(), margins.left(), size.height() + margins.bottom()); //left
          return r;
      }
      

      This code is at: qt5/qtwayland/src/client/qwaylandabstractdecoration.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