Issue with WIndowStaysOnTopHint on Linux RHEL8 with X11 Display. Qt version 5.15.3.
-
I am having an issue using the WindowStaysOnTopHint flag on Linux. I believe the manager is X11. I want the window to pop to the top when it prints an error message. For some reason it works the first time around while the app is running. The flag is set and then I do show() and it comes to the front. I then want it to stay at the top but disable that flag so its not always on top anymore. Its really just to let the user see there is an error. The second time I interact and have an error print there is no response from the app and it doesn't go to the top. I tested to see what happens if I disable it, and I can disable it ( i know this was a major issue for years on Linux ), but after disabling it, when the slot is called it does not get set to true again. Please help me out, I have tried to find help online but there is no in depth explanation to the Qt WindowFlags. Thank you.
-
Hi,
From the doc of
WindowStaysOnTopHint
:Informs the window system that the window should stay on top of all other windows. Note that on some window managers on X11 you also have to pass Qt::X11BypassWindowManagerHint for this flag to work correctly.
Did you also set
Qt::X11BypassWindowManagerHint
? -
Hello,
Yes I did. With that I am able to pop the window to the front every time it gets set. Thank you!
However, I now run into the issue when I don't want it to be stuck at the front of the stack. When it receives an error it pops to the front thats great. But then I want to disable it so its not stuck at the front. Is there a way to disable it but keep it showing, so it doesn't disappear when I disable those two flags? Right now I am doing hide() and show() when I disable it so thats why it disappears then reappears at the bottom of the stack, therefore not showing anymore.