Skip to content
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

Skip propagation of non-input events #1797

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/display-x11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ bool display_output_x11::main_loop_wait(double t) {
}
}

DBGP2("Processing %d X11 events...", XPending(display));
/* handle X events */
while (XPending(display) != 0) {
XEvent ev;
Expand Down Expand Up @@ -630,6 +631,7 @@ bool display_output_x11::main_loop_wait(double t) {
}
}
}
DBGP2("Done with events!");

#ifdef BUILD_XDAMAGE
if (x11_stuff.damage) {
Expand Down
5 changes: 5 additions & 0 deletions src/x11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,12 @@ void propagate_x11_event(XEvent &ev) {
i_ev->common.window = window.desktop;
i_ev->common.x = i_ev->common.x_root;
i_ev->common.y = i_ev->common.y_root;
} else {
// Not a known input event; blindly propagating them causes loops and all
// sorts of other evil.
return;
}
DBGP2("Propagating event: { type: %d; serial: %d }", i_ev->type, i_ev->common.serial);
XSendEvent(display, window.desktop, False, window.event_mask, &ev);

int _revert_to;
Expand Down