Skip to content
This repository has been archived by the owner on Aug 9, 2019. It is now read-only.

Commit

Permalink
reintroduce xwayland is_unmanaged
Browse files Browse the repository at this point in the history
153f37bdf57c61e7fb09162a6791afe8b9b4d0ef (#1145) removed the
wlr_xwayland_is_unamanged function while fixing OR, because it was
belieived that it's supposed to work around the broken OR handling.

This was a misunderstanding. is_unmanaged is (while sort of a hack)
intended to work around inherent differences between "real" X sessions
and our Xwayland/wayland situation.

The main reason it exists is to support applications like rofi and dzen,
while not handing focus to other OR windows (which should *not* be
required).
Traditionally, these applications just grabbed input from X and didn't
need to be focused by any logic in the WM. Which of course doesn't work
in wayland compositors. So we have to give them focus in some way.
Giving *every* OR window focus, breaks other applications that don't
expect focus to change.

A testcase that was pointed out to me where wlr_xwayland_is_unamanged was
breaking things is swaywm/sway#2128 (syncplay,
gitk, gitgui)
Supposedly it broke using keyboard to navigate the menus.
I can't reproduce this with this patch. The popups can be navigated as
long as the parent has focus.
  • Loading branch information
Markus Ongyerth committed Jul 29, 2018
1 parent 4a2167a commit cd176c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion seat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,8 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) {

#ifdef WLR_HAS_XWAYLAND
if (view && view->type == ROOTS_XWAYLAND_VIEW &&
view->xwayland_surface->override_redirect) {
!wlr_xwayland_or_surface_wants_focus(
view->xwayland_surface)) {
return;
}
#endif
Expand Down

0 comments on commit cd176c7

Please sign in to comment.