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

Qt program using layer-shell-qt exited after screen turn-off

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8.0
    • GUI: Other
    • None
    • Desktop Linux on Wayland Qt 6.8, happens on various distros (OpenSUSE Tumbleweed, Fedora 41, Kubuntu 24.10 etc.)
    • Linux/Wayland

    Description

      A Qt program using layer-shell-qt would exit itself if the screen is turned off.

      It did not seem to crash, just exited by itself.

      Minimal program below.

      Could you please take a look?

      Thanks,

      Viet

      Minimum program:

      #include <QApplication>
      #include <QWidget>
      #include <QWindow>
      
      #include <LayerShellQt/Window>
      
      int main(int argc, char** argv) {
        QApplication app(argc, argv);
      
        QWidget dock;
        dock.winId();  // we need this for widget->windowHandle() to not return nullptr.
        auto* layerShellWin = LayerShellQt::Window::get(dock.windowHandle());
      
        // Same bug if for example this is called instead:
        // layerShellWin->setAnchors(LayerShellQt::Window::AnchorBottom);
        layerShellWin->setLayer(LayerShellQt::Window::LayerBottom);
      
        dock.show();
      
        return app.exec();
      }
      
      

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            dangvd Viet Dang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes