-
Notifications
You must be signed in to change notification settings - Fork 597
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
Focus problems in multi monitor setup with Google Chrome / Chromium #170
Comments
Thanks for filing this. It is a known issue AFAIK. |
Yes, reported multiple time over the years on IRC. |
It is the case with most chromium based applications, including github's Atom editor. The only exclusion among chromium based browsers I know is Opera. So if you are desperate to use a chromium-based browser for some reason, you can stick with Opera, at least for now. |
I'm experiencing the exact same bug (awesome v3.5.6) . The drag and drop inside a chrome web page works only on the primary monitor. Does anyone have any idea why chrome behaves this way? |
Just for the docs. This bug was reported to the chromium team also: Already closed unfortunately. |
I wonder where one should start looking to pinpoint the problem. Since tab dragging works in i3, i was skipping through both awesome and i3 source code, trying to find significant differences in window and mouse handling code to get some clues, but to no avail (even though significant differences are aplenty, haha). So, tab dragging works in i3 both for primary and secondary displays by default. BUT, while playing with chromium i was able to reproduce exactly same erroneous behaviour in i3. Steps:
Dragged window and all its children (created by ctrl+n command) will exhibit the behaviour in question while being on secondary monitor. Alternative steps:
Oddly enough it's not reproduceable in bspwm, so probably gonna look there as well |
@schmellow If you really dare to do so, I'd recommend to look into Chromium's source code. How do they implement this? What's different in the non-working case? But I guess that this isn't exactly trivial to do... |
Just chiming in since I am also having this issue, and I'm willing to help digging into it if there's anything I can do to help. I'm a bit busy the next week and during easter, but I'll probably start trying to build both Awesome and Chromium from sources when I can find some time for it :) |
Uhh...chromium. Using builtin tracing i narrowed it down to TabDragController::GetTargetTabStripForPoint. Somehow chromium can't get existing tab strip for current mouse location and decides it should create a new window. That covers initial detachment and probably indirectly there is the reason window can't be reattached. As of why it happens, there are multiple potential points of failure: it may fail to get window at coordinates at all, window may not be a chromium one, tabstrip bounds may be out of place etc etc. To know for sure ideally i need to do a step by step debug, and that's where i'm stuck currently. |
I could imagine this being related to some method trying to get the current display/monitor, which could be related to #759. |
You are totally right, psychon's second comment here was like an eureka moment. It all works properly in i3 and bspwm because they store their workspaces structured, in a tree, so they can enumerate them consistently. And they do - they traverse the tree and set _NET_CURRENT_DESKTOP equal to index of currently focused workspace. You can emulate this in awesome:
And it starts working. Now im not sure how to approach this problem now, since solution may not stand well with current tags implementation, I can try to sketch something though. |
Then I could imagine a fix being to set the focused tag (from what Line 262 in 491f17f
|
Little more complicated, considering that:
So it becomes like this
Maybe there is more concise solution, still how to adress (6)? Take first active tag? That will have to be tested |
Thanks for analysing this!
Taking the first active tag (more or less the current behaviour) seems to be sensible in that case. |
Actually, it is what Awesome itself does. There isn't really multiple tags. What happen is that a new client list is created with the clients from all selected tags and it forced into the first tag. The layout and properties are those of the first tag. |
@Elv13 |
No, I got that, I can also reproduce the bug and all. I was just pointing out that using the first tag in a multi-tag selection is the right thing to do and and already what is being done elsewhere in Awesome when faced with other issues caused the 0-n cardinality. |
@schmellow So you are saying that chromium looks at |
@psychon Looking at chromium sources for a second time, yeah, i think this is it. It tries to find window at pointer location, ignoring all invisible ones. And visibility depends on window's assigned desktop and current active desktop: https://code.google.com/p/chromium/codesearch#chromium/src/ui/base/x/x11_util.cc&q=GetWindowDesktop&sq=package:chromium&type=cs&l=570 |
Could anybody of the affected people try out #910, please? |
Now that #910 is merged, I think that this is fixed. Feel free to report here if this issue is indeed fixed for you with latest git/master and please speak up if the problem remains. |
Closing it for now. |
I'm having this exact issue on Awesome 4.2, more specifically with not being able to drag and drop between windows on different monitors. Same (well, mostly same) root cause ( |
I was having it for a while on this awesomewm version, but it stopped for some reason (the entire browser window was greyed out / out of focus, and I had to start it on the primary display and then move it to the external to be in focus). |
Problem:
I use awesomewm v3.5.6 and have the following problem in a multi-monitor setup:
When I use chromium browser I cannot rearrange tabs using the mouse. When I try to drag a tab I instantly get a new window with that tab. After that it is not possible to move this tab back into the main window.
Another issue: in the bookmark manager (of chromium) it is not possible to reagange the bookmarks using drak and drop either.
Why I think this is an awesomewm issue:
Today I found, that these issues only occur on screen two and three.
On screen one everything works fine.
More precisely: it only works on the primary monitor (see below)
What I did to setup monitors:
xrandr --output eDP1 --auto --primary --output DP4 --auto --right-of eDP1 --output HDMI1 --auto --right-of DP4
the screen where I can move tabs moves with the
--primary
flagThe text was updated successfully, but these errors were encountered: