ecore-x - fix setting protocol atoms for icccm for 64bit
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sun, 11 May 2014 00:09:03 +0000 (09:09 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sun, 11 May 2014 00:09:03 +0000 (09:09 +0900)
@fix

src/lib/ecore_x/xlib/ecore_x_icccm.c

index b5e4069..d335fd2 100644 (file)
@@ -581,9 +581,13 @@ ecore_x_icccm_protocol_atoms_set(Ecore_X_Window win,
                                  Ecore_X_Atom *protos,
                                  int num)
 {
+   Atom *protos2 = alloca(sizeof(Atom) * num);
+   int i;
+   
+   for (i = 0; i < num; i++) protos2[i] = protos[i];
    LOGFN(__FILE__, __LINE__, __FUNCTION__);
    if (num > 0)
-     XSetWMProtocols(_ecore_x_disp, win, (Atom *)(protos), num);
+     XSetWMProtocols(_ecore_x_disp, win, protos2, num);
    else
      XDeleteProperty(_ecore_x_disp, win, ECORE_X_ATOM_WM_PROTOCOLS);
    if (_ecore_xlib_sync) ecore_x_sync();