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

Warning spew when reparenting native frameless window with translucent background onto another window

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6.0, 5.9.6, 5.12.0, 5.13.1
    • None
    • Windows 7 x64, MSVC2012

    Description

      A frameless, native widget with translucent background will produce a warning every time it is updated:

      UpdateLayeredWindowIndirect failed for ptDst=(11, 11), size=(196x84), dirty=(196x84 11, 11) (The parameter is incorrect.)
      

      A simple example of the issue. Resize the window to trigger update. The warning floods the output.

      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QWidget* foo = new QWidget();
          foo->setWindowFlags(foo->windowFlags() | Qt::FramelessWindowHint);
          foo->setAttribute(Qt::WA_NativeWindow);
          foo->setAttribute(Qt::WA_TranslucentBackground);
      
          QWidget w;
          w.setLayout(new QVBoxLayout());
          w.layout()->addWidget(foo);
          w.show();
          return a.exec();
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            chrisaverage Krzysztof Kawa
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes