Browse Source

Merge pull request #64 from oblique/master

Pull request
Martin Duquesnoy 12 years ago
parent
commit
67ec2d4c2b
2 changed files with 12 additions and 8 deletions
  1. 10 7
      src/event.c
  2. 2 1
      src/status.c

+ 10 - 7
src/event.c

@@ -114,19 +114,20 @@ event_clientmessageevent(XEvent *e)
                /* Manage _WMFS_FUNCTION && _WMFS_CMD */
                if(type == wmfs_function || type == wmfs_cmd)
                {
+                    Atom rt;
                     int d;
-                    long unsigned int len;
+                    long unsigned int len, il;
                     unsigned char *ret = NULL, *ret_cmd = NULL;
                     void (*func)(Uicb);
 
                     if(XGetWindowProperty(EVDPY(e), W->root, W->net_atom[wmfs_function], 0, 65536,
-                                          False, W->net_atom[utf8_string], (Atom*)&d, &d,
-                                          (long unsigned int*)&d, (long unsigned int*)&d, &ret) == Success
+                                          False, W->net_atom[utf8_string], &rt, &d,
+                                          &len, &il, &ret) == Success
                        && ret && ((func = uicb_name_func((char*)ret))))
                     {
                          if(XGetWindowProperty(EVDPY(e), W->root, W->net_atom[wmfs_cmd], 0, 65536,
-                                               False, W->net_atom[utf8_string], (Atom*)&d, &d,
-                                               &len, (long unsigned int*)&d, &ret_cmd) == Success
+                                               False, W->net_atom[utf8_string], &rt, &d,
+                                               &len, &il, &ret_cmd) == Success
                             && len && ret_cmd)
                          {
                               func((Uicb)ret_cmd);
@@ -327,12 +328,14 @@ event_unmapnotify(XEvent *e)
         && ev->send_event
         && ev->event == W->root)
      {
+          Atom rt;
+          unsigned long n, il;
           int d;
           unsigned char *ret = NULL;
 
           if(XGetWindowProperty(EVDPY(e), c->win, W->net_atom[wm_state], 0, 2,
-                                False, W->net_atom[wm_state], (Atom*)&d, &d,
-                                (long unsigned int*)&d, (long unsigned int*)&d, &ret) == Success)
+                                False, W->net_atom[wm_state], &rt, &d,
+                                &n, &il, &ret) == Success)
                if(*ret == NormalState)
                     client_remove(c);
      }

+ 2 - 1
src/status.c

@@ -554,12 +554,13 @@ status_surface(int x, int y, int w, int h, Color bg, char *status)
      struct screen *s;
      struct status_ctx ctx;
      int d;
+     Window rw;
 
      if(!status)
           return;
 
      if(x + y < 0)
-          XQueryPointer(W->dpy, W->root, (Window*)&d, (Window*)&d, &x, &y, &d, &d, (unsigned int *)&d);
+          XQueryPointer(W->dpy, W->root, &rw, &rw, &x, &y, &d, &d, (unsigned int *)&d);
 
      s = screen_gb_geo(x, y);