Edit

IABSD.fr/ports/x11/blackbox/patches/patch-src_Window_cc

Branch :

  • Show log

    Commit

  • Author : naddy
    Date : 2022-03-11 20:15:18
    Hash : 21f1bb8a
    Message : drop RCS Ids

  • x11/blackbox/patches/patch-src_Window_cc
  • Calling XSetInputFocus() with non-"stale" time.
    I believe a change in Xorg facilitated this bug where, occasionally,
    a FocusOut event would immediately follow a FocusIn event, leaving
    focus reverted to Root window.
    References:
    	https://bugs.freedesktop.org/show_bug.cgi?id=83900
    	http://marc.info/?l=openbsd-misc&m=141067888307365&w=2
    
    --- src/Window.cc.orig	Tue Oct 18 10:01:41 2005
    +++ src/Window.cc	Tue Apr 25 16:42:41 2017
    @@ -43,6 +43,7 @@
     #endif
     
     #include <assert.h>
    +#include <stdlib.h>
     
     /*
       sometimes C++ is a pain in the ass... it gives us stuff like the
    @@ -2194,7 +2195,7 @@ bool BlackboxWindow::setInputFocus(void) {
       }
     
       XSetInputFocus(blackbox->XDisplay(), client.window,
    -                 RevertToPointerRoot, blackbox->XTime());
    +                 RevertToPointerRoot, CurrentTime);
     
       if (client.wmprotocols.wm_take_focus) {
         XEvent ce;