Skip to content

Commit

Permalink
Don't change input focus on propagation
Browse files Browse the repository at this point in the history
Causes input focus flickering, especially with WMs where focus follows
pointer. This looks weird (carret flashing) and effectively acheives
nothing. So I'm, leaving it up to WMs to manage focus.

Signed-off-by: Tin Švagelj <[email protected]>
  • Loading branch information
Caellian committed Apr 8, 2024
1 parent 13bdaa6 commit 94f04b2
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/x11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1401,16 +1401,7 @@ void propagate_x11_event(XEvent &ev) {
i_ev->common.y = i_ev->common.y_root;
i_ev->common.time = CurrentTime;

XUngrabPointer(display, i_ev->common.time);

// int _revert_to;
// Window focused;
// XGetInputFocus(display, &focused, &_revert_to);
// if (focused == window.window) {
// XSetInputFocus(display, i_ev->common.window, RevertToPointerRoot,
// i_ev->common.time);
// }

XUngrabPointer(display, CurrentTime);
XSendEvent(display, i_ev->common.window, False, ev_to_mask(i_ev->type), &ev);
}

Expand Down

0 comments on commit 94f04b2

Please sign in to comment.