wayfire
wayfire copied to clipboard
Every time a xdg_popup is created, there is a wlroots error log
Describe the bug
To Reproduce Steps to reproduce the behavior:
- Create a xdg_popup somehow (e.g. context menus)
- Check the log:
II 09-03-24 23:00:58.124 - [build/wayfire/src/view/xdg-shell.cpp:59] New xdg popup
EE 09-03-24 23:00:58.124 - [types/xdg_shell/wlr_xdg_surface.c:169] A configure is scheduled for an uninitialized xdg_surface 0x557ffd217530
Expected behavior No error logs.
Wayfire version git.
This patch fixes it, but I don't know if it introduces any issue:
diff --git a/src/view/xdg-shell.cpp b/src/view/xdg-shell.cpp
index 8340e932..09747202 100644
--- a/src/view/xdg-shell.cpp
+++ b/src/view/xdg-shell.cpp
@@ -110,7 +110,6 @@ std::shared_ptr<wayfire_xdg_popup> wayfire_xdg_popup::create(wlr_xdg_popup *popu
self->surface_root_node = std::make_shared<wayfire_xdg_popup_node>(self->get_id());
self->set_surface_root_node(self->surface_root_node);
self->set_output(self->popup_parent->get_output());
- self->unconstrain();
return self;
}
Yeah it should be safe to remove this call. It should happen on map() instead (if it isn't happening already)
I've reverted my local change because I suspend it caused my Firefox extension's popup to misplace. I may need to do some debugging.
It should happen on map() instead (if it isn't happening already)
I tried to move it there but the position is still wrong.
To reproduce, maximize Firefox, put an extension button on the left and click. Part of it will be out of screen: