I was trying to write a QWidgets application, but I can’t make it to work with Layer Shell Qt.
I have gotten the test copy-pasted from the repo to work:
MyPaintWindow* test = new MyPaintWindow();
auto layer = LayerShellQt::Window::get(test);
layer->setLayer(LayerShellQt::Window::LayerTop)
test->show
But I can’t find a way to use it with a QWidget: I’ve tried a ton of flavors of this, and always end up with either a normal window or no window at all.
QWindow* window = new QWindow();
QPushButton* widget = new QPushButton("Hello Layer!");
QPushButton::createWindowContainer(window, widget);
auto layer = LayerShellQt::Window::get(window);
layer->setLayer(LayerShellQt::Window::LayerTop)
widget->show
So, the my approach is probably wrong here, but I can’t seem to find any helpful documentation.
Without the hide and the second show, I get a regular window, and qt.qpa.wayland: Cannot set shell integration while there's already a shell surface created printed to stderr.