# HG changeset patch # User Jason Rumney # Date 1111796427 0 # Node ID 3b4d5e41f3fd8825f2fb9fa8ccd85f5d32e0a957 # Parent 03a8b8b9ebef7611d6da0d32079d7ece7cb9fdc7 (x_output): add focus_state. diff -r 03a8b8b9ebef -r 3b4d5e41f3fd src/w32term.h --- a/src/w32term.h Sat Mar 26 00:19:53 2005 +0000 +++ b/src/w32term.h Sat Mar 26 00:20:27 2005 +0000 @@ -276,8 +276,25 @@ { PIX_TYPE background_pixel; PIX_TYPE foreground_pixel; + + /* Keep track of focus. May be EXPLICIT if we received a FocusIn for this + frame, or IMPLICIT if we received an EnterNotify. + FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ + int focus_state; + }; +enum +{ + /* Values for focus_state, used as bit mask. + EXPLICIT means we received a FocusIn for the frame and know it has + the focus. IMPLICIT means we recevied an EnterNotify and the frame + may have the focus if no window manager is running. + FocusOut and LeaveNotify clears EXPLICIT/IMPLICIT. */ + FOCUS_NONE = 0, + FOCUS_IMPLICIT = 1, + FOCUS_EXPLICIT = 2 +}; struct w32_output {