添加窗口属性设置宏
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <xcb/xproto.h>
|
||||
|
||||
#include "action.h"
|
||||
#include "app.h"
|
||||
#include "xcursor.h"
|
||||
|
||||
typedef struct visual_t {
|
||||
@@ -17,3 +18,14 @@ void xwindow_grab_keys(xcb_window_t window, const keyboard_t *keys,
|
||||
int keys_length);
|
||||
bool xwindow_send_event(xcb_window_t window, xcb_atom_t atom);
|
||||
void xwindow_focus(xcb_window_t window);
|
||||
|
||||
#define xwindow_set_name_static(window, name) \
|
||||
xcb_icccm_set_wm_name(wm.xcb_conn, window, XCB_ATOM_STRING, 8, \
|
||||
sizeof(name) - 1, name)
|
||||
#define xwindow_set_class_instance(window) \
|
||||
xwindow_set_class_instance_static(window, APP_NAME, APP_NAME)
|
||||
#define xwindow_set_class_instance_static(window, class, instance) \
|
||||
_xwindow_set_class_instance_static(window, instance "\0" class)
|
||||
#define _xwindow_set_class_instance_static(window, instance_class) \
|
||||
xcb_icccm_set_wm_class(wm.xcb_conn, window, sizeof(instance_class), \
|
||||
instance_class)
|
||||
|
||||
Reference in New Issue
Block a user