[maemo-commits] [maemo-commits] r10658 - in projects/haf/trunk/hildon-desktop: . libhildondesktop

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Mar 20 17:07:27 EET 2007
Author: jobi
Date: 2007-03-20 17:07:26 +0200 (Tue, 20 Mar 2007)
New Revision: 10658

Modified:
   projects/haf/trunk/hildon-desktop/ChangeLog
   projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-window-dialog.c
Log:

2007-03-20  Johan Bilien  <johan.bilien at nokia.com>

	* libhildondesktop/hildon-desktop-panel-window-dialog.c:
	- Fixed a compilation warning


Modified: projects/haf/trunk/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-desktop/ChangeLog	2007-03-20 15:00:03 UTC (rev 10657)
+++ projects/haf/trunk/hildon-desktop/ChangeLog	2007-03-20 15:07:26 UTC (rev 10658)
@@ -1,3 +1,8 @@
+2007-03-20  Johan Bilien  <johan.bilien at nokia.com>
+
+	* libhildondesktop/hildon-desktop-panel-window-dialog.c:
+	- Fixed a compilation warning
+
 2007-03-19  Moises Martinez  <moises.martinez at nokia.com>
 
 	* libhildondesktop/hildon-desktop-panel-window-dialog.c:

Modified: projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-window-dialog.c
===================================================================
--- projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-window-dialog.c	2007-03-20 15:00:03 UTC (rev 10657)
+++ projects/haf/trunk/hildon-desktop/libhildondesktop/hildon-desktop-panel-window-dialog.c	2007-03-20 15:07:26 UTC (rev 10658)
@@ -100,10 +100,15 @@
 {
   Atom           atom_utf8_string, atom_wm_name, atom_check, type;
   int            result, format;
-  gchar          *val, *retval;
+  gchar          *retval;
+  unsigned char *val;
   unsigned long  nitems, bytes_after;
-  Window        *support_xwin = NULL;
   Display	*dpy;
+  union
+  {
+    unsigned char      *s;
+    Window             *w;
+  } support_xwin;
 
   dpy = GDK_DISPLAY ();
 
@@ -113,18 +118,18 @@
 		      GDK_WINDOW_XID (gdk_get_default_root_window ()),
 		      atom_check,
 		      0, 16L, False, XA_WINDOW, &type, &format,
-		      &nitems, &bytes_after, (unsigned char **)&support_xwin);
+		      &nitems, &bytes_after, &support_xwin.s);
 
-  if (support_xwin == NULL)
+  if (support_xwin.s == NULL)
       return NULL;
 
   atom_utf8_string = XInternAtom (dpy, "UTF8_STRING", False);
   atom_wm_name     = XInternAtom (dpy, "_NET_WM_NAME", False);
 
-  result = XGetWindowProperty (dpy, *support_xwin, atom_wm_name,
+  result = XGetWindowProperty (dpy, *(support_xwin.w), atom_wm_name,
 			       0, 1000L,False, atom_utf8_string,
 			       &type, &format, &nitems,
-			       &bytes_after, (unsigned char **)&val);
+			       &bytes_after, &val);
   if (result != Success)
     return NULL;
 
@@ -138,6 +143,7 @@
   retval = g_strdup (val);
 
   XFree (val);
+  XFree (support_xwin.s);
 
   return retval;
 }


More information about the maemo-commits mailing list