Cloudef / wlc

High-level Wayland compositor library
MIT License
331 stars 58 forks source link

XWayland Firefox and GTK2 tooltips/menus etc. take up half the screen, like normal windows #104

Open robotanarchy opened 8 years ago

robotanarchy commented 8 years ago

This screenshot describes it best:

Screenshot

Happens to Firefox, Geany, Roxterm tooltips and menus. Also the autocompletion bar ("Awesome Bar") in Firefox.

I'm running sway on Void Linux with musl libc.

I've tried to fix this in https://github.com/Cloudef/wlc/pull/102, but it turns out that it was a coincidence that it suddenly worked and it didn't really fix it.

So to fix this, we'll need more information.

Who else does have this issue?

crondog commented 8 years ago

Hmm so with FF 43.0.1-2 I do not get this issue. However I get a similar issue with texstudio (qt) with menus

This is with Arch and sway/orbment compiled with cmake . -DCMAKE_BUILD_TYPE=Debug and Release

robotanarchy commented 8 years ago

From the #sway IRC channel:

zotek:

I had this issue on very old wlc/sway Gentoo, wayland 1.7 at the time

TheRealJohnGalt (who has the same issue currently):

I'm running sway on voidlinux glibc, built with your overlay

robotanarchy commented 8 years ago

@Cloudef : Do you have an idea, how we can debug this issue?

Cloudef commented 8 years ago

It's most likely issue with atoms prop being set after window creation. So the window creation to for wlc needs to be delayed until we have got the initial atoms. Otherwise the window will be created as if it was normal window.

The information here is all I know I'm afraid https://github.com/Cloudef/wlc/pull/102#issuecomment-168660355

Cloudef commented 8 years ago

It might also be issue with invalid calling convetion as the stuff for x11/xcb and few others in wlc still use weak linking. See: https://github.com/Cloudef/wlc/pull/46

robotanarchy commented 8 years ago

@Cloudef: I have another idea, where this issue could be from: Could it be that Firefox re-uses its windows and wlc deletes them once they are hidden?

I'll debug this further, but that is what I currently think is responsible.

I can pretty much reproduce this:

robotanarchy commented 8 years ago

Here are some logfiles to undermine my theory. Basically they contain the output of xwininfo -tree -root and then xprop -id on every window (full log script).

I ran it after opening firefox, and then for the first 3 times while the tooltip should be displayed, moving the mouse away between each log file. Behavior is exactly like described in my post above (displays fine, is invisible, is tiling like on the screenshot).

The logfiles can be diffed easily to find changes between the windows, and as far as I can tell the window ID is always the same (0x10008bd "Close tab (Ctrl+W)": ("Popup" "Firefox")).

(I also had a roxterm open, don't mind that).

Logfiles: https://robotanarchy.space/debugging_firefox.tar.gz

Cloudef commented 8 years ago

Window reuse is not uncommon in X11. Each time window is unmapped in X11 on wlc side the view is destroyed due to the surface being destroyed on Xwayland side as well. Once they are mapped back the view is created again. I'll debug this more myself as well in near future (tm). The #46 might be worth fixing as well, as anything can happen if the weak linked function prototypes are wrong.

zetok commented 8 years ago

So, I still have this issue, with both chromium and ff on newest sway/wlc. Just so you know.

robotanarchy commented 8 years ago

I didn't find the time to do this yet, but after @Cloudef debugged this issue with me for some hours and we didn't get anywhere, he recommended the following:

yeah just bisect, there aren't many commits. Just the set that touches xwm, I think I included xwm: in the commit message for each

... so maybe someone else, who is affected, may try to bisect the code and find where the bug was introduced.

PluMGMK commented 8 years ago

Actually I haven't had this issue in a long time. The suggestions from typing in the location bar in Firefox flash and have trouble resizing, but I don't know if that's a separate issue.

aereaux commented 8 years ago

I still have this issue with tooltips and dropdowns only being shown once (I've specifically been testing with Xfe, but it should be reproducible with firefox and other things). I've figured out that using the current git master, the issue appears when running cmake with -DCMAKE_BUILD_TYPE=Release, and doesn't appear when running cmake with -DCMAKE_BUILD_TYPE=Upstream. I'm going to try to bisect using -DCMAKE_BUILD_TYPE=Release as soon as I get the chance.

Cloudef commented 8 years ago

Release / Upstream change would indicate there is still race condition going somewhere here hmm..

ids1024 commented 8 years ago

I seem to be having this problem with qutebrowser, which is running natively without xwayland. Chromium, on the other hand, seems to work fine (in xwayland).

This is with the latest git of wlc and sway.

PluMGMK commented 8 years ago

@ids1024 Yep, same thing with Otter Browser now that you mention it. QtWayland actually seems to have a lot of problems on wlc/sway…

nightmared commented 8 years ago

With regard to the new status of https://github.com/SirCmpwn/sway/issues/571, do you still experience theses problems with latest version of wlc ? (for my part, I don't)