Add a define for the root window's event mask
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
351fc7aa3a
commit
1801a8be46
13
awesome.c
13
awesome.c
|
@ -553,21 +553,10 @@ main(int argc, char **argv)
|
||||||
scan();
|
scan();
|
||||||
|
|
||||||
{
|
{
|
||||||
/* select for events */
|
|
||||||
const uint32_t change_win_vals[] =
|
|
||||||
{
|
|
||||||
XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY
|
|
||||||
| XCB_EVENT_MASK_ENTER_WINDOW | XCB_EVENT_MASK_LEAVE_WINDOW
|
|
||||||
| XCB_EVENT_MASK_STRUCTURE_NOTIFY
|
|
||||||
| XCB_EVENT_MASK_BUTTON_PRESS
|
|
||||||
| XCB_EVENT_MASK_BUTTON_RELEASE
|
|
||||||
| XCB_EVENT_MASK_FOCUS_CHANGE
|
|
||||||
};
|
|
||||||
|
|
||||||
xcb_change_window_attributes(globalconf.connection,
|
xcb_change_window_attributes(globalconf.connection,
|
||||||
globalconf.screen->root,
|
globalconf.screen->root,
|
||||||
XCB_CW_EVENT_MASK,
|
XCB_CW_EVENT_MASK,
|
||||||
change_win_vals);
|
ROOT_WINDOW_EVENT_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we will receive events, stop grabbing server */
|
/* we will receive events, stop grabbing server */
|
||||||
|
|
11
globalconf.h
11
globalconf.h
|
@ -34,6 +34,17 @@
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "common/xembed.h"
|
#include "common/xembed.h"
|
||||||
|
|
||||||
|
#define ROOT_WINDOW_EVENT_MASK \
|
||||||
|
(const uint32_t []) { \
|
||||||
|
XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY \
|
||||||
|
| XCB_EVENT_MASK_ENTER_WINDOW \
|
||||||
|
| XCB_EVENT_MASK_LEAVE_WINDOW \
|
||||||
|
| XCB_EVENT_MASK_STRUCTURE_NOTIFY \
|
||||||
|
| XCB_EVENT_MASK_BUTTON_PRESS \
|
||||||
|
| XCB_EVENT_MASK_BUTTON_RELEASE \
|
||||||
|
| XCB_EVENT_MASK_FOCUS_CHANGE \
|
||||||
|
}
|
||||||
|
|
||||||
typedef struct drawin_t drawin_t;
|
typedef struct drawin_t drawin_t;
|
||||||
typedef struct a_screen screen_t;
|
typedef struct a_screen screen_t;
|
||||||
typedef struct button_t button_t;
|
typedef struct button_t button_t;
|
||||||
|
|
Loading…
Reference in New Issue