-
Notifications
You must be signed in to change notification settings - Fork 18
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
Burrito loses focus when focusing on Gw2 #25
Comments
Can you share what distro and window manager you are using? |
Sure! I'm using Pop OS, it uses GNOME. I tried KDE too, it doesn't work either, same issue 😭 |
Is guild wars in fullscreen or windowed-fullscreen? |
Windowed. |
Unfortunately I cannot reproduce this issue on ubuntu using gnome and I do not have the resources to replicate a popos environment. If you or anyone else happen to figure it out, or are able to debug any more into the issue please add it here so we can work on a fix. |
i have the same issue. Endeavour/KDE latest packages (plasma-desktop version 5.22). so, if you click on gw2 window, the whole overlay goes into background. but if you set the gw2 window as "keep below others" , overlay will now display over gw2 window. i just recommend sticking to window mode for now and maybe play gw2 with "borderless" decoration. |
i checked on gnome 40 and xfce 4.16 . the same issue with windowed full screen. with gnome, i couldn't even use windowed mode of gw2. According to distrowatch, I think gnome 4 might have a bug that affects me and @Nuxmin . will need more people to report their distros/DE versions along with what issues they have with burrito to confirm. @AsherGlick what's your distro/gnome version? maybe you can put it in README as the main target that you develop for? |
#23 (comment) EDIT: i installed cinnamon to find out and had a horrible experience. cinnamon won't bring the focused windows up, so i hate to manually alt tab into them. but the good thing is that with cinnamon, the overlay stays above gw2 window, But when using full screen setting from godot, it didn't let me click through. that is one DE i am never installing again. |
@coderedart I am using 20.04 LTS. I think you probably right about gnome 4 having some sort of bug, or weird interaction. |
Think we should have a sort of table in readme with working combination or one primary target distro and wm. Cannot be bothered to support all variations of distros and wms. Maybe Ubuntu lts with gnome for starters |
I just installed ubuntu 20.04 lts, and the overlay was not working for me in gnome (3.38 version i think. i upgraded all packages to latest). i was researching this stuff for Jokolay, and i posted an issue on that repo, coderedart/jokolay#1 . TLDR; |
Tried that, it did not work |
I have made some progress: Using the XWindow handle (though I am currently acquiring them through the window names, which we would have to do anyways for getting the GW2 handle) and setting the override_redirect and WM_TRANSIENT_FOR properties I am able to get the window to stay above gw2, even in (windowed) fullscreen. This, however, leads to some other problems:
|
I have tried a few other things:
It should also be noted that reparenting seems to disable compositing for me, as in both cases Burrito loses its transparency. |
Great job. What wm/os? I think override flag is not good. Because the window needs to be controlled by wm and be provided events. |
Manjaro with kwin/picom.
As far as I understand the documentation, TRANSIENT_FOR is supposed to be used in combination with override_redirect. |
I am pretty new to this stuff too, but what i learnt after going through a bunch of articles is that. a window manager is just another x11 client, similar to any other window. but a window manager registers a substructure redirect mask, for all the windows. which means when any window wants to display itself or circulate itself aka alt+tab or change its size/pos/border/stacking order , that request will instead go to the window manager which will be the boss and decide what should actually happen. by using oerrideredirect, we essentially say that we will ourselves handle the resizing/positioning/focus/unfocus etc.. TRANSIENT_FOR otoh, just lets you be associated with a window. but still lets the window manager decide who gets the focus or other stuff. its a little confusing why burrito would receive keyboard, but gw2 would receive mouse inputs. there should only be one window in focus. and that should receive all of it. anyway, lets start with kde for now. if you have the time, can you try coderedart/jokolay#1 (comment) suggestion? that was recommended in kde forums. ik that it will be great if we can find a single solution for all DEs, but i don't think that's happening anytime soon. no matter what we do, there's already stuff happening in godot itself which is beyond our control, we might be putting override redirect and godot could be trying to interact with wm, too much debugging. we have a much better chance at just creating a borderless window for gw2 and pretend that gw2 windowed mode is now windowed fullscreen. much easier for burrito to stay on top then without having to worry about transient_for or override_redirect. and we can start with kde first as both of us are on kde/arch based distros. |
I am not quite sure whether this works correctly, but according to the KDE docs in the issue you linked, 17 should be for ciritical notification. It seems to do nothing, xprop reports |
I found out why Burrito was eating the input when setting WM_TRANSIENT_FOR: It was because I used my own build which was still calling Edit: You have to tab to Burrito to interact with it, but when playing the game the overlay stays where it is supposed to in fullscreen. I will try to make a pr later, with a small gdnative library (probably in rust) which will take burritos window id, find out the window id of gw2 and set the WM_TRANSIENT_FOR hint. |
This is great! I look forward to seeing the pr. Does the mouse capture region work properly when you are tabbed into burrito or do you have to tab back into Guildwars when you are done? |
I guess we can close this now? |
We can close this issue. If users are still experiencing similar problems we should open a new one referencing this one. |
I get the following error
and then burrito goes on to run normally. latest kde/arch. |
This seems to be panicking as a result of failing to connect to the default x11 server Line 34 in fb2ef57
https://docs.rs/breadx/1.2.1/breadx/display/type.DisplayConnection.html says it can return errors from https://docs.rs/breadx/1.2.1/breadx/display/struct.BasicDisplay.html#method.from_connection says this error is due to the x server rejecting the connection. @royalmustard any ideas? @coderedart when you say goes on to run normally, do you mean that it is still effected by this issue where burrito goes behind the gw2 window when gw2 is focused? |
aye. it goes behind in windowed fullscreen, and when i bring it forward with alt-tab, its just a black screen. |
godot on mxlinux can't build burrito for some reason (wasted like 3 hours on it -_- godot in debian repo is too old and can't even open the project. otoh, the latest binary can open it, but can't build it. if i use the burrito binary build on arch, i get a segfault and it can't even load the library ). so, i just tried arch/gnome and i get the same crash of xconnection failure, but this time, i can't even see the burrito icon. i will just see what @royalmustard tested this on and try that. i tried on kde again, and it works properly in window mode even if it can't connect to x server |
This seems to be an issue with the compositor not working. I had the same issue with Manjaro/kde and the kwin compositor. Try turning off compositing in kwin and install picom (or another compositor), that is what worked for me. As for the crash, are you running pure X or Xwayland? I tested it on pure X on aforementioned setup (Manjaro, kwin, picom). |
@royalmustard pure X. Just normal kde installation.i have nvidia card, so Wayland is a not an option. Maybe we should get someone else to check it. Maybe your system has a library installed that I don't? |
which drivers are you running? |
@royalmustard nvidia proprietary latest. Edit1: |
The alt tabbing is the only way we can get it to work on windowed fullscreen. Its a feature, not a bug |
Since it seems to work on Ubuntu and not on Arch, maybe compare your Xorg installations (version, Xorg.conf, addons, etc.). Maybe share your arch findings so others can try to reproduce the bug. |
i can't even get breadx example to run. it fails to connect for some reason. |
Try if you can get some xcb or xlib stuff to run, so we can see if it is a problem with breadx. |
everything else runs. it was fine when i was using x11rb to try the _NET_WINDOW_TYPE flags thingy. it seems breadx cant use xauth yet? bread-graphics/breadx#8 |
I don't quite understand the byte parsing code going on in the breadx authorisation functions, but failing to authorize should give a different error than failing to connect (see bread-graphics/breadx/pull/10). According to the X protocol, on refusing the connection (which is something different than not being authorized), X should send a reason in the connection response. (However I don't quite understand enough of it to add functionality to read it). Maybe there is something in Xorg.log, but I am not sure. On another note, I got someone to test it on arch with i3 and picom, where it seemed to run fine. |
This is really great progress. I think this has been scoped down enough to be its own issue at this point so it can be better tracked. @coderedart or @royalmustard can you transition this into a new issue with any system details or breadx code snippets that are necessary? |
Hey there!
I could make it work like you stated using ArcDPS, however, another issue I've seen. Even if the Burrito is checked as always on top and I have gw on windowed. Every time you focus on gw the Burrito stays in the background.
I find no way to make it stay on top so it's only possible to see the path alternating with Alt Tab.
The text was updated successfully, but these errors were encountered: