propogate property changes on the group leader to the whole group

This commit is contained in:
Dana Jansens 2003-09-15 06:50:13 +00:00
parent 0242bc2ec8
commit 9e746b6439

View file

@ -15,6 +15,7 @@
#include "framerender.h" #include "framerender.h"
#include "focus.h" #include "focus.h"
#include "moveresize.h" #include "moveresize.h"
#include "group.h"
#include "stacking.h" #include "stacking.h"
#include "extensions.h" #include "extensions.h"
#include "event.h" #include "event.h"
@ -41,6 +42,7 @@ static void event_handle_menu(XEvent *e);
static void event_handle_dock(ObDock *s, XEvent *e); static void event_handle_dock(ObDock *s, XEvent *e);
static void event_handle_dockapp(ObDockApp *app, XEvent *e); static void event_handle_dockapp(ObDockApp *app, XEvent *e);
static void event_handle_client(ObClient *c, XEvent *e); static void event_handle_client(ObClient *c, XEvent *e);
static void event_handle_group(ObGroup *g, XEvent *e);
static gboolean focus_delay_func(gpointer data); static gboolean focus_delay_func(gpointer data);
static void focus_delay_client_dest(gpointer data); static void focus_delay_client_dest(gpointer data);
@ -424,6 +426,7 @@ static gboolean event_ignore(XEvent *e, ObClient *client)
static void event_process(const XEvent *ec, gpointer data) static void event_process(const XEvent *ec, gpointer data)
{ {
Window window; Window window;
ObGroup *group = NULL;
ObClient *client = NULL; ObClient *client = NULL;
ObDock *dock = NULL; ObDock *dock = NULL;
ObDockApp *dockapp = NULL; ObDockApp *dockapp = NULL;
@ -435,24 +438,26 @@ static void event_process(const XEvent *ec, gpointer data)
e = ⅇ e = ⅇ
window = event_get_window(e); window = event_get_window(e);
if ((obwin = g_hash_table_lookup(window_map, &window))) { if (!(e->type == PropertyNotify &&
switch (obwin->type) { (group = g_hash_table_lookup(group_map, &window))))
case Window_Dock: if ((obwin = g_hash_table_lookup(window_map, &window))) {
dock = WINDOW_AS_DOCK(obwin); switch (obwin->type) {
break; case Window_Dock:
case Window_DockApp: dock = WINDOW_AS_DOCK(obwin);
dockapp = WINDOW_AS_DOCKAPP(obwin); break;
break; case Window_DockApp:
case Window_Client: dockapp = WINDOW_AS_DOCKAPP(obwin);
client = WINDOW_AS_CLIENT(obwin); break;
break; case Window_Client:
case Window_Menu: client = WINDOW_AS_CLIENT(obwin);
case Window_Internal: break;
/* not to be used for events */ case Window_Menu:
g_assert_not_reached(); case Window_Internal:
break; /* not to be used for events */
g_assert_not_reached();
break;
}
} }
}
event_set_lasttime(e); event_set_lasttime(e);
event_hack_mods(e); event_hack_mods(e);
@ -460,7 +465,9 @@ static void event_process(const XEvent *ec, gpointer data)
return; return;
/* deal with it in the kernel */ /* deal with it in the kernel */
if (client) if (group)
event_handle_group(group, e);
else if (client)
event_handle_client(client, e); event_handle_client(client, e);
else if (dockapp) else if (dockapp)
event_handle_dockapp(dockapp, e); event_handle_dockapp(dockapp, e);
@ -572,6 +579,16 @@ static void event_handle_root(XEvent *e)
} }
} }
static void event_handle_group(ObGroup *group, XEvent *e)
{
GSList *it;
g_assert(e->type == PropertyNotify);
for (it = group->members; it; it = g_slist_next(it))
event_handle_client(it->data, e);
}
static void event_handle_client(ObClient *client, XEvent *e) static void event_handle_client(ObClient *client, XEvent *e)
{ {
XEvent ce; XEvent ce;
@ -1062,6 +1079,9 @@ static void event_handle_client(ObClient *client, XEvent *e)
msgtype == prop_atoms.kwm_win_icon) { msgtype == prop_atoms.kwm_win_icon) {
client_update_icons(client); client_update_icons(client);
} }
else if (msgtype == prop_atoms.sm_client_id) {
client_update_sm_client_id(client);
}
default: default:
; ;
#ifdef SHAPE #ifdef SHAPE