Do not wake up on focus events
Focus events do not mark any change in state of the notifications so calling wake_up as a response is a wake of CPU cycles. Instead treat them like PropertyNotify and only redraw if we need to change monitors.
This commit is contained in:
parent
81fae350c9
commit
69100790a1
12
src/x11/x.c
12
src/x11/x.c
@ -326,22 +326,16 @@ gboolean x_mainloop_fd_dispatch(GSource *source, GSourceFunc callback, gpointer
|
||||
wake_up();
|
||||
}
|
||||
break;
|
||||
case FocusIn:
|
||||
LOG_D("XEvent: processing 'FocusIn'");
|
||||
wake_up();
|
||||
break;
|
||||
case FocusOut:
|
||||
LOG_D("XEvent: processing 'FocusOut'");
|
||||
wake_up();
|
||||
break;
|
||||
case CreateNotify:
|
||||
LOG_D("XEvent: processing 'CreateNotify'");
|
||||
if (win->visible &&
|
||||
ev.xcreatewindow.override_redirect == 0)
|
||||
XRaiseWindow(xctx.dpy, win->xwin);
|
||||
break;
|
||||
case FocusIn:
|
||||
case FocusOut:
|
||||
case PropertyNotify:
|
||||
LOG_D("XEvent: processing 'PropertyNotify'");
|
||||
LOG_D("XEvent: Checking for active sceen changes");
|
||||
fullscreen_now = have_fullscreen_window();
|
||||
scr = get_active_screen();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user