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
Fix menu dropdown focus logic in xwayland #6461
Conversation
So maybe I should get that code back into |
It works smoothly here on my subproject compiled version. |
@salkin-mada can you add my email contact@yrhki.com. |
Nice @yrhki. I tried to grap that via the github api. But no luck. |
630d918
to
8ef2b43
Compare
Taking a glance at the git history alone, it needs some cleaning. You have one commit doing your first fix attempt, and another undoing that and doing your second fix attempt. The message on the second one is also a little weird, including ">" characters it seems? See https://chris.beams.io/posts/git-commit/ for examples. For where to put "Co-authored-by", look for the examples containing a "See also" - that's the "block" you'd use for that. It would be good if the commit summary and description explained what is being added, and then in the description mention that this comes from that other commit. Most people do not remember all the sha's in the tree, so "re-add commit xyz" doesn't mean a lot to most. |
thanks @kennylevinsen . Will do. |
I have mixed feelings about this patch. I suspect we're missing something fundamental, because other compositors do not have such complex X11 refocusing logic, and presumably (has anyone tried Weston?) Reaper works there. The last focus issues we had with JetBrains IDEs ended up being due to us not implementing ICCCM focus hints; I wonder if that is at play here. This "try to find another unmanaged surface from the same process to pass focus to" logic is a hack I initially wrote without understanding why it was necessary, so I'd be a little sad to see it get reintroduced. It may also be informative to trace through the code and understand why removing /cc @BrassyPanache |
@Xyene Nice to see you joining in. We have been loosely throwing around the "lets find a universal fix" talk. |
I can share how I approached the issue swaywm/wlroots#2604 (related pulls of swaywm/wlroots#2605 and #5948). The issue sounds very similar in nature - IntelliJ drop down menus were behaving incorrectly. The initial fix I put in place was for #3007 where I took a seemingly similar approach to what's taken here. To make the fix I inserted logging statements until I could work out the specific change required to get IntelliJ to work and then made the change. I then verified that other applications worked as expected and called it a day. Of course this change broke with the next IntelliJ release. I was not at the time privy to the ICCCM specifications regarding input focus. I found the following table most insightful. I would just check that everything is consistent to the above table from both the sway (and wlroots) side and the Reaper side. If other window managers (e.g. GNOME) work it is a good indication that the change needs to occur in sway or wlroots. I am by no means an expert on these matters - just sharing my prior experience 😄 |
Any progress on this? It is still a critical issue and it would be nice to have it fixed soon. Thanks! |
Re-use of 7ca9ef1. Co-authored-by: Tuomas Yrjölä <contact@yrhki.com> Resolves: swaywm#6324 See also: swaywm#2103, swaywm#5398
83f96bd
to
31cf437
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
"Me too", "just merge it", "I won't use Sway unless this is fixed" type of comments don't help. If you want to help, read the discussion above and find a proper fix. A workaround like the one done currently in this PR won't get merged. |
Cool, cool. I wish you all the best. Thank you for sway! It will be sorely missed. So long for now. |
Fixed in #6764 🎉 |
Hey everyone, Thank you :) |
Not sure what unforeseen results this will have. But it seems to close #6324.
I tested with
code
(vscode) running underxwayland
and the menu's seemed to work fine there without setting seat focus to NULL before setting to previous.sway/sway/desktop/xwayland.c
Line 118 in bb3fd0a
At least removing that line makes the drop down menu's in Reaper usable again.