win: split struct win
Currently compton handles window creation event by immediately query all the information it needs and create a window struct with that information. However, this is prone to race conditions. In the future, we want to react to window creation event by creating a placeholder in the window stack, and only query window information in a critical section where the X server is grabbed by us. This commit split struct win into two struct, one as placeholder, the other for holding actual window information. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
14
src/dbus.h
14
src/dbus.h
@@ -14,7 +14,7 @@
|
||||
#include <dbus/dbus.h>
|
||||
|
||||
typedef struct session session_t;
|
||||
typedef struct win win;
|
||||
struct win;
|
||||
|
||||
/**
|
||||
* Return a string representation of a D-Bus message type.
|
||||
@@ -34,21 +34,21 @@ bool cdbus_init(session_t *ps, const char *uniq_name);
|
||||
void cdbus_destroy(session_t *ps);
|
||||
|
||||
/// Generate dbus win_added signal
|
||||
void cdbus_ev_win_added(session_t *ps, win *w);
|
||||
void cdbus_ev_win_added(session_t *ps, struct win *w);
|
||||
|
||||
/// Generate dbus win_destroyed signal
|
||||
void cdbus_ev_win_destroyed(session_t *ps, win *w);
|
||||
void cdbus_ev_win_destroyed(session_t *ps, struct win *w);
|
||||
|
||||
/// Generate dbus win_mapped signal
|
||||
void cdbus_ev_win_mapped(session_t *ps, win *w);
|
||||
void cdbus_ev_win_mapped(session_t *ps, struct win *w);
|
||||
|
||||
/// Generate dbus win_unmapped signal
|
||||
void cdbus_ev_win_unmapped(session_t *ps, win *w);
|
||||
void cdbus_ev_win_unmapped(session_t *ps, struct win *w);
|
||||
|
||||
/// Generate dbus win_focusout signal
|
||||
void cdbus_ev_win_focusout(session_t *ps, win *w);
|
||||
void cdbus_ev_win_focusout(session_t *ps, struct win *w);
|
||||
|
||||
/// Generate dbus win_focusin signal
|
||||
void cdbus_ev_win_focusin(session_t *ps, win *w);
|
||||
void cdbus_ev_win_focusin(session_t *ps, struct win *w);
|
||||
|
||||
// vim: set noet sw=8 ts=8 :
|
||||
|
||||
Reference in New Issue
Block a user