Decoration is not drawn
Describe the bug Server side decorations are not always drawn or they are drawn incorrectly for certain views.
To Reproduce Steps to reproduce the behavior:
- Enable decoration plugin
- Start a Xwayland Unity (Wine) game
Expected behavior The decoration is drawn.
Wayfire version 0.6.0
What do you mean by drawn incorrectly? The visual result is wrong, or they are drawn where they shouldn't?
Can you also provide the output of xprop of the window which doesn't have decorations but should?
Can you also provide the output of xprop of the window which doesn't have decorations but should?
I guess this one isn't a bug if it's set to fullscreen?
_NET_WM_STATE(ATOM) = _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_STATE_MAXIMIZED_HORZ
The visual result is wrong, or they are drawn where they shouldn't?
This is for a native wayland view and the final visual result is wrong. The view changes geometry while loading, but the decoration doesn't change so it has partial decorations until you force it to redraw by resizing for example.
The debug log is here: ix.io/2Ju7
@travankor What you say is conflicting It can't have X11 _NET properties and be a native wayland view, it's not native for sure. _NET_WM_STATE_FULLSCREEN are always undecorated.
After you force it to redraw is _NET_WM_STATE_FULLSCREEN gone?
And also (not mentioned in the report), I've noticed that the decorations sometimes have a "ghost" effect where they leave pixels when you move the view.
It can't have X11 _NET properties and be a native wayland view, it's not native for sure. _NET_WM_STATE_FULLSCREEN are always undecorated.
Sorry it's two different applications.
After you force it to redraw is _NET_WM_STATE_FULLSCREEN gone?
~No, I don't think so.~
Ah, yes it is, but there is no decoration
No, I don't think so.
If not check the same on native X / Gnome Wayland. Views that have _NET_WM_STATE_FULLSCREEN are always undecorated on X as well.
Compare the _NET_WM_STATE_FULLSCREEN appearance on wayfire (before / after redraw) and same on X / Gnome Wayland.
EDIT: if the bug is also on X / Gnome Wayland it's an application bug.
If the view is fullscreen then it should not have decorations. If the view itself is not fullscreen, then that is another bug (not related to decoration).
The wrong decoration size is strange, which app is it?
If the view itself is not fullscreen, then that is another bug (not related to decoration).
The view starts out maximized, but not fullscreen.
The wrong decoration size is strange, which app is it?
nwjs (basically chromium)
as @travankor mentioned on IRC screenshot: https://files.catbox.moe/gz17wd.png
@travankor Have you tried with latest wayfire from git? I cannot reproduce here.
Also, you could try disabling "Use system title bar and borders" in the settings (if it is like chromium).
Maybe there is a timing issue, race condition, or something? Here is a simple Qt program that opens 5 windows in quick succession:
#include <QMainWindow>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QMainWindow* w;
for(int i = 0; i < 5; i++)
{
w = new QMainWindow();
w->setWindowTitle(QString("#%1").arg(i));
w->show();
//a.processEvents();
}
return a.exec();
}
When I run the above program under Wayfire v0.7.0 (wlroots-0.12.0, Mesa 20.3.4 with vulkan support), only the first and last window opened gets a title bar with minimize/maximize/close server side decorations the way it should. The other three windows get nothing.
If I uncomment the "a.processEvents();" line and run it again, now the first two (sometimes three, especially with the Animate effect enabled) windows get the expected server side decorations, while the last three windows get no titlebar/decorations.
Note that this requires a system Qt library that has been compiled with Wayland support. Previously my Qt library was compiled for X11 only, and I think it never had the problem that way. Setting Wayfire to "Preferred decoration mode: Client" makes it work okay too (even with Qt compiled for Wayland).
This is on a Raspberry Pi 4, not overclocked.
Does this still happen?
@ammen99 I tried the python version of the code above. I don't seem to be able to trigger this issue anymore. I tried opening as many as 100 windows in quick succession, and in all cases, the decoration was drawn.
Before transactions, opening even 5 windows would result in having at least two windows without borders.