From 75b07a2bb3b98d581b39d3991cf1e9068452264a Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 17 Mar 2003 20:16:32 +0000 Subject: all events are dispatched --- openbox/dispatch.h | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) (limited to 'openbox/dispatch.h') diff --git a/openbox/dispatch.h b/openbox/dispatch.h index c8371b99..9561e7e6 100644 --- a/openbox/dispatch.h +++ b/openbox/dispatch.h @@ -15,26 +15,35 @@ typedef enum { Event_X_ButtonPress = 1 << 4, Event_X_ButtonRelease = 1 << 5, Event_X_MotionNotify = 1 << 6, + Event_X_Bell = 1 << 7, - Event_Client_New = 1 << 7, /* new window, before mapping */ - Event_Client_Mapped = 1 << 8, /* new window, after mapping */ - Event_Client_Destroy = 1 << 9, /* unmanaged */ - Event_Client_Focus = 1 << 10, - Event_Client_Unfocus = 1 << 11, + Event_Client_New = 1 << 8, /* new window, before mapping */ + Event_Client_Mapped = 1 << 9, /* new window, after mapping */ + Event_Client_Destroy = 1 << 10, /* unmanaged */ + Event_Client_Focus = 1 << 11, /* focused */ + Event_Client_Unfocus = 1 << 12, /* unfocused */ + Event_Client_Urgent = 1 << 13, /* entered/left urgent state */ + Event_Client_Visible = 1 << 14, /* shown/hidden (not on a workspace or + show-the-desktop change though) */ - Event_Ob_Desktop = 1 << 12, /* changed desktops */ - Event_Ob_NumDesktops = 1 << 13, /* changed the number of desktops */ - Event_Ob_ShowDesktop = 1 << 14, /* entered/left show-the-desktop mode */ - Event_Ob_Startup = 1 << 15, /* startup complete */ - Event_Ob_Shutdown = 1 << 16, /* shutdown about to start */ + Event_Ob_Desktop = 1 << 15, /* changed desktops */ + Event_Ob_NumDesktops = 1 << 16, /* changed the number of desktops */ + Event_Ob_ShowDesktop = 1 << 17, /* entered/left show-the-desktop mode */ + Event_Ob_Startup = 1 << 18, /* startup complete */ + Event_Ob_Shutdown = 1 << 19, /* shutdown about to start */ - Event_Signal = 1 << 17, + Event_Signal = 1 << 20, - EVENT_RANGE = 1 << 18 + EVENT_RANGE = 1 << 21 } EventType; +typedef struct { + XEvent *e; + Client *client; +} EventData_X; + typedef union { - XEvent *x; /* for Event_X_* event types */ + EventData_X x; /* for Event_X_* event types */ Client *client; /* for Event_Client_* event types */ int signal; } EventData; @@ -50,7 +59,7 @@ typedef unsigned int EventMask; void dispatch_register(EventHandler h, EventMask mask); -void dispatch_x(XEvent *e); +void dispatch_x(XEvent *e, Client *c); void dispatch_client(EventType e, Client *c); void dispatch_ob(EventType e); void dispatch_signal(int signal); -- cgit v1.2.3