https://bugs.kde.org/show_bug.cgi?id=496963
Bug ID: 496963
Summary: Qt program using layer-shell-qt exited after screen
turn-off
Classification: Frameworks and Libraries
Product: layer-shell-qt
Version: unspecified
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
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();
}
STEPS TO REPRODUCE
1. Build and run the program
2. Wait for screen to turn off (e.g. 1 minute of inactivity while screen is
locked)
3. Reactivate screen
OBSERVED RESULT
Program exited itself.
EXPECTED RESULT
Program should stay alive.
SOFTWARE/OS VERSIONS
Linux/KDE Plasma: OpenSUSE Tumbleweed (also happens on Fedora 41, Kubuntu 24.10
etc.)
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
ADDITIONAL INFORMATION
--
You are receiving this mail because:
You are watching all bug changes.