Procházet zdrojové kódy

Ewmh/Event: Fix _WMFS_STATUSTEXT_x mistake

Martin Duquesnoy před 14 roky
rodič
revize
5a25eaeff5
2 změnil soubory, kde provedl 3 přidání a 4 odebrání
  1. 1 1
      src/event.c
  2. 2 3
      src/ewmh.c

+ 1 - 1
src/event.c

@@ -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;
 

+ 2 - 3
src/ewmh.c

@@ -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);