Ewmh/Event: Fix _WMFS_STATUSTEXT_x mistake

This commit is contained in:
Martin Duquesnoy 2009-11-16 19:40:33 +01:00
parent a812c6d47e
commit 5a25eaeff5
2 changed files with 3 additions and 4 deletions

View File

@ -151,7 +151,7 @@ clientmessageevent(XClientMessageEvent *ev)
if(ev->format != 32)
return;
for(i = 0; i < net_last; ++i)
for(i = 0; i < net_last + screen_count(); ++i)
if(net_atom[i] == ev->message_type)
mess_t = i;

View File

@ -47,7 +47,7 @@ ewmh_init_hints(void)
char class[] = "wmfs", st[64];
long pid = (long)getpid();
net_atom = emalloc(net_last + screen_count() + 1, sizeof(Atom));
net_atom = emalloc(net_last + screen_count(), sizeof(Atom));
/* EWMH hints */
net_atom[net_supported] = ATOM("_NET_SUPPORTED");
@ -98,9 +98,8 @@ ewmh_init_hints(void)
net_atom[wmfs_statustext + j] = ATOM(st);
}
XChangeProperty(dpy, ROOT, net_atom[net_supported], XA_ATOM, 32,
PropModeReplace, (uchar*)net_atom, net_last);
PropModeReplace, (uchar*)net_atom, net_last + screen_count());
XChangeProperty(dpy, ROOT, net_atom[wmfs_running], XA_CARDINAL, 32,
PropModeReplace, (uchar*)&i, 1);