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

Can't change geometry after going from fullscreen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.0
    • QPA: Wayland
    • None
    • Linux/Wayland

    Description

      The following code works ok on X11 and Windows but fails to apply the last resize on Wayland:

      #include <QApplication>
      #include <QScreen>
      #include <QWidget>
      #include <QTimer>
      
      int main(int argc, char *argv[]) {
      	QApplication app(argc, argv);
      	QWidget widget;
      	widget.setScreen(QGuiApplication::primaryScreen());
      	widget.setGeometry(QGuiApplication::primaryScreen()->geometry());
      	widget.showFullScreen();
      	QTimer::singleShot(1000, [&] {
      		widget.showNormal();
      		widget.resize(100, 100);
      	});
      	return app.exec();
      }
      

      If I remove the timer, it fails to even exit from fullscreen. If I swap showNormal and resize calls (without removing the timer), it changes the geometry but doesn't exit fullscreen.

      Attachments

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

        Activity

          People

            inho Inho Lee
            ilya-fedin Ilya Fedin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change