Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every time a xdg_popup is created, there is a wlroots error log #2189

Open
lilydjwg opened this issue Mar 9, 2024 · 3 comments
Open

Every time a xdg_popup is created, there is a wlroots error log #2189

lilydjwg opened this issue Mar 9, 2024 · 3 comments
Labels
Milestone

Comments

@lilydjwg
Copy link
Contributor

lilydjwg commented Mar 9, 2024

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. Create a xdg_popup somehow (e.g. context menus)
  2. 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;
 }
 
@lilydjwg lilydjwg added the bug label Mar 9, 2024
@ammen99
Copy link
Member

ammen99 commented Mar 9, 2024

Yeah it should be safe to remove this call. It should happen on map() instead (if it isn't happening already)

@lilydjwg
Copy link
Contributor Author

lilydjwg commented Mar 9, 2024

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.

@lilydjwg
Copy link
Contributor Author

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:

图片

@ammen99 ammen99 modified the milestones: pre-1.0, 0.10 Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants