diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-09 17:58:58 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-09 17:58:58 +0000 |
| commit | 851555348ec39a01a0e150d2e12b71212b8d338b (patch) | |
| tree | bc118f364e184388b46d8efd53bbdf9d38c051bd /openbox/event.c | |
| parent | cdb108c76d20e8272bfbd15919e32e609d685322 (diff) | |
support for _NET_WM_USER_TIME_WINDOW round 2 ! yay abstraction
Diffstat (limited to 'openbox/event.c')
| -rw-r--r-- | openbox/event.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/openbox/event.c b/openbox/event.c index 3b318b01..babb5197 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -32,6 +32,7 @@ #include "menuframe.h" #include "keyboard.h" #include "modkeys.h" +#include "propwin.h" #include "mouse.h" #include "mainloop.h" #include "framerender.h" @@ -81,7 +82,7 @@ static gboolean event_handle_menu(XEvent *e); static void event_handle_dock(ObDock *s, XEvent *e); static void event_handle_dockapp(ObDockApp *app, XEvent *e); static void event_handle_client(ObClient *c, XEvent *e); -static void event_handle_user_time_window_client(ObClient *c, XEvent *e); +static void event_handle_user_time_window_clients(GSList *l, XEvent *e); static void event_handle_user_input(ObClient *client, XEvent *e); static void focus_delay_dest(gpointer data); @@ -410,7 +411,7 @@ static void event_process(const XEvent *ec, gpointer data) ObDock *dock = NULL; ObDockApp *dockapp = NULL; ObWindow *obwin = NULL; - ObClient *timewinclient = NULL; + GSList *timewinclients = NULL; XEvent ee, *e; ObEventData *ed = data; @@ -420,8 +421,8 @@ static void event_process(const XEvent *ec, gpointer data) window = event_get_window(e); if (e->type != PropertyNotify || - !(timewinclient = - g_hash_table_lookup(client_user_time_window_map, &window))) + !(timewinclients = propwin_get_clients(window, + OB_PROPWIN_USER_TIME))) if ((obwin = g_hash_table_lookup(window_map, &window))) { switch (obwin->type) { case Window_Dock: @@ -555,8 +556,8 @@ static void event_process(const XEvent *ec, gpointer data) /* focus_set_client has already been called for sure */ client_calc_layer(client); } - } else if (timewinclient) - event_handle_user_time_window_client(timewinclient, e); + } else if (timewinclients) + event_handle_user_time_window_clients(timewinclients, e); else if (client) event_handle_client(client, e); else if (dockapp) @@ -690,11 +691,13 @@ void event_enter_client(ObClient *client) } } -static void event_handle_user_time_window_client(ObClient *client, XEvent *e) +static void event_handle_user_time_window_clients(GSList *l, XEvent *e) { g_assert(e->type == PropertyNotify); - if (e->xproperty.atom == prop_atoms.net_wm_user_time) - client_update_user_time(client); + if (e->xproperty.atom == prop_atoms.net_wm_user_time) { + for (; l; l = g_slist_next(l)) + client_update_user_time(l->data); + } } static void event_handle_client(ObClient *client, XEvent *e) |
