Handle FocusIn events generated by clients and update decoration accordingly (Thanks mseed)

This commit is contained in:
Michael Stapelberg
2011-03-20 16:26:36 +01:00
parent 144deaaaf6
commit c130cefa93
5 changed files with 56 additions and 3 deletions

View File

@ -215,4 +215,5 @@ int handle_clientleader_change(void *data, xcb_connection_t *conn,
uint8_t state, xcb_window_t window,
xcb_atom_t name, xcb_get_property_reply_t *prop);
int handle_focus_in(void *data, xcb_connection_t *conn, xcb_focus_in_event_t *event);
#endif

View File

@ -5,6 +5,9 @@
#ifndef _X_H
#define _X_H
/** Stores the X11 window ID of the currently focused window */
extern xcb_window_t focused_id;
/**
* Initializes the X11 part for the given container. Called exactly once for
* every container from con_new().

View File

@ -3,7 +3,7 @@
*
* i3 - an improved dynamic tiling window manager
*
* (c) 2009 Michael Stapelberg and contributors
* © 2009-2011 Michael Stapelberg and contributors
*
* See file LICENSE for license information.
*
@ -32,7 +32,8 @@
while rendering the layout) */
/** The XCB_CW_EVENT_MASK for the child (= real window) */
#define CHILD_EVENT_MASK (XCB_EVENT_MASK_PROPERTY_CHANGE | \
XCB_EVENT_MASK_STRUCTURE_NOTIFY)
XCB_EVENT_MASK_STRUCTURE_NOTIFY | \
XCB_EVENT_MASK_FOCUS_CHANGE)
/** The XCB_CW_EVENT_MASK for its frame */
#define FRAME_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | /* …mouse is pressed/released */ \