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

(not so) harmless "Couldn't map window as subsurface" warning #38

Closed
wmww opened this issue Jul 24, 2020 · 7 comments · Fixed by #103
Closed

(not so) harmless "Couldn't map window as subsurface" warning #38

wmww opened this issue Jul 24, 2020 · 7 comments · Fixed by #103
Labels
wontfix This will not be worked on

Comments

@wmww
Copy link
Owner

wmww commented Jul 24, 2020

When some popups appear (such as tooltips), the following warning is shown:

(gtk-layer-demo:143889): Gdk-WARNING **: 15:30:45.911: Couldn't map window 0x55e39f0aa030 as subsurface because its parent is not mapped.

I believe this to be a harmless GTK bug (there's a lot of questionable logic around custom surfaces). Considering it's not causing any other problems, it's not worth trying to fix at this time.

@wmww wmww added the wontfix This will not be worked on label Jul 24, 2020
@wmww wmww changed the title Couldn't map window as subsurface warning Harmless "Couldn't map window as subsurface" warning Jul 24, 2020
@wmww
Copy link
Owner Author

wmww commented Jul 24, 2020

It doesn't seem to happen with my Ubuntu 20.04 system GTK. Might have been introduced in GTK v3.24.21

@w1ll-i-code
Copy link

I think this bug is what's causing an issue in the waybar project. Alexays/Waybar#859

@wmww
Copy link
Owner Author

wmww commented Sep 21, 2020

Unlikely. It really is harmless (AFAIK)

@wb9688
Copy link

wb9688 commented Dec 9, 2020

In my WIP port of PCManFM's desktop manager to Wayland using GTK Layer Shell, I'm getting (pcmanfm:14934): Gdk-WARNING **: 11:38:54.363: Couldn't map window 0x5555555b6ad0 as subsurface because its parent is not mapped. and I'm getting a normal window with SSD, while without GTK Layer Shell I'm not getting that warning and it's positioned correctly and doesn't have a SSD.

You could reproduce this by compiling it yourself (preferably in combination with my fork of LibFM), starting it with pcmanfm --desktop, focusing the desktop, pressing some key to start the "search". GTK Layer Shell could be disabled by uncommenting these lines, then it'll just show up as a normal window.

When I add a return TRUE; at https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gdk/wayland/gdkwindow-wayland.c#L3038, it is positioned correctly though (but keyboard input doesn't work, maybe I just have to disable keyboard interactivity as long as search_window is visible?), so it seems like GTK just thinks GTK Layer Shell windows aren't mapped for some reason.

@wmww
Copy link
Owner Author

wmww commented Dec 9, 2020

All right, so my assessment is this warning is usually harmless, but in some cases (such as yours) it's possible to create a subsurface that actually fails to map property. Can you point me to where in your pcmanfm fork the troublesome search box subsurface is created? I'll want to write an integration test with a minimal example of this behavior so once it's fixed it stays fixed.

@wb9688
Copy link

wb9688 commented Dec 10, 2020

search_window is created around https://github.com/wb9688/pcmanfm/blob/gtk-layer-shell/src/desktop.c#L3823

However if I understand the GTK code I linked in my previous comment correctly, it thinks the parent (i.e. my full-screen GTK Layer Shell window) is not mapped. Like I said, if I change it so that it returns true even if the parent isn't mapped (for testing purposes, normally that wouldn't be a good idea of course), it's able to correctly map the search_window as a subsurface.

Thanks for looking into it!

@wmww
Copy link
Owner Author

wmww commented Dec 11, 2020

With that code sample the issue was easy to reproduce, and with just one more gtk-priv call it's fixed. PR incoming.

@wmww wmww changed the title Harmless "Couldn't map window as subsurface" warning (not so) harmless "Couldn't map window as subsurface" warning Dec 11, 2020
@wmww wmww closed this as completed in #103 Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants