[Xfce4-commits] r22836 - xfwm4/trunk/src

Olivier Fourdan olivier at xfce.org
Sat Aug 19 20:48:26 UTC 2006


Author: olivier
Date: 2006-08-19 20:48:24 +0000 (Sat, 19 Aug 2006)
New Revision: 22836

Modified:
   xfwm4/trunk/src/compositor.c
   xfwm4/trunk/src/focus.c
   xfwm4/trunk/src/mypixmap.c
   xfwm4/trunk/src/netwm.c
Log:
Plug a few leaks

Modified: xfwm4/trunk/src/compositor.c
===================================================================
--- xfwm4/trunk/src/compositor.c	2006-08-19 20:41:40 UTC (rev 22835)
+++ xfwm4/trunk/src/compositor.c	2006-08-19 20:48:24 UTC (rev 22836)
@@ -832,6 +832,7 @@
         c.alpha = 0xffff;
         XRenderFillRectangle (dpy, PictOpSrc, picture, &c, 0, 0, 1, 1);
     }
+    XFreePixmap (dpy, pixmap);
     return picture;
 }
 

Modified: xfwm4/trunk/src/focus.c
===================================================================
--- xfwm4/trunk/src/focus.c	2006-08-19 20:41:40 UTC (rev 22835)
+++ xfwm4/trunk/src/focus.c	2006-08-19 20:48:24 UTC (rev 22836)
@@ -607,14 +607,7 @@
     TRACE ("ungrabing buttons for client \"%s\" (0x%lx)", c->name, c->window);
 
     screen_info = c->screen_info;
-    if (screen_info->params->raise_with_any_button)
-    {
-        ungrabButton(clientGetXDisplay (c), AnyButton, AnyModifier, c->window);
-    }
-    else
-    {
-        ungrabButton(clientGetXDisplay (c), Button1, AnyModifier, c->window);
-    }
+    ungrabButton(clientGetXDisplay (c), AnyButton, AnyModifier, c->window);
     /* We've ungrabbed way too much, so regrab the regular buttons/modifiers */
     clientGrabButtons (c);
 }

Modified: xfwm4/trunk/src/mypixmap.c
===================================================================
--- xfwm4/trunk/src/mypixmap.c	2006-08-19 20:41:40 UTC (rev 22835)
+++ xfwm4/trunk/src/mypixmap.c	2006-08-19 20:48:24 UTC (rev 22836)
@@ -887,7 +887,7 @@
     }
     else
     {
-         destw = gdk_pixmap_foreign_new (pm->pixmap);
+        destw = gdk_pixmap_foreign_new (pm->pixmap);
     }
     
     if (!destw)

Modified: xfwm4/trunk/src/netwm.c
===================================================================
--- xfwm4/trunk/src/netwm.c	2006-08-19 20:41:40 UTC (rev 22835)
+++ xfwm4/trunk/src/netwm.c	2006-08-19 20:48:24 UTC (rev 22836)
@@ -764,8 +764,11 @@
     if (size < 1)
     {
         XDeleteProperty (myScreenGetXDisplay (screen_info), screen_info->xroot, a);
+        return;
     }
-    else if ((listw = (Window *) malloc ((size + 1) * sizeof (Window))))
+
+    listw = g_new (Window, size + 1);
+    if (listw)
     {
         TRACE ("%i windows in list for %i clients", size, screen_info->client_count);
         for (i = 0, index_dest = listw, index_src = list; i < size;
@@ -776,7 +779,7 @@
         }
         XChangeProperty (myScreenGetXDisplay (screen_info), screen_info->xroot, a, XA_WINDOW, 32, PropModeReplace,
             (unsigned char *) listw, size);
-        free (listw);
+        g_free (listw);
     }
 }
 



More information about the Xfce4-commits mailing list