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

Always On Top does not work on Linux with Wayland backend

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Out of scope
    • Affects Version/s: 5.8.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Yocto-based Linux Distro, Weston compositor with wayland backend, has Qt 5.8.0
    • Platform/s:
      Linux/Wayland

      Description

      Hi,
      I am trying to make sure a Qt/QML application stays on top of other windows in Wayland/Weston Linux desktop system.
      What I've tried in order to solve this is I've added the WindowStaysOnTopHint in my main.qml:

      main.qml

      import QtQuick 2.0
      import QtQuick.Controls 2.0
      import QtQuick.Window 2.2
      
      ApplicationWindow {
          visible: true
          visibility: "FullScreen"
          maximumWidth: 1920
          maximumHeight: 720
          minimumWidth: 1920
          minimumHeight: 720
          width: 1920
          height: 720
          title: qsTr("App")
          flags: Qt.FramelessWindowHint|Qt.WindowStaysOnTopHint
          MainScreen{
              anchors.fill: parent
          }
      }
      

      {{ main.cpp}}

      QGuiApplication app(argc, argv);
      QQmlApplicationEngine engine;
      engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
      if (engine.rootObjects().isEmpty())
           return -1;
      return app.exec();
      

      It works in my PC, but it does not work in target platform.
      Host PC:                    Ubuntu 16.04, with Xorg, has Qt 5.10.1
      Target platform:    Yocto-based Linux Distro, Weston compositor with wayland backend, has Qt 5.8.0

      When I launch a second app that is compiled without Qt.WindowStaysOnTopHint, it comes on top of the first app. But I want to have first one to stay always on top. I suspect this might be a Qt bug on systems that use wayland backend.

      Any guidance and ideas are appreciated. Thanks

        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:
              mustafa.ozcelikors MUSTAFA ÖZÇELİKÖRS
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes