[maemo-commits] [maemo-commits] r9866 - in projects/haf/branches/maemo-af-desktop/hildon-desktop: . libhildondesktop libhildonwm

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Feb 14 17:29:04 EET 2007
Author: moimart
Date: 2007-02-14 17:29:03 +0200 (Wed, 14 Feb 2007)
New Revision: 9866

Modified:
   projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-window.c
   projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
Log:

	* libhildonwm/hd-wm.c:
        - Using union for storing value returned from XGetWindowProperty.
        Patch from Santtu Lakkala.
        * libhildondesktop/hildon-desktop-panel-window.c:
        - Taking into account "move" property when moving/resizing
        - Changed forced moving resizing when mapping widget
	* ChangeLog updated.



Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2007-02-14 15:18:34 UTC (rev 9865)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/ChangeLog	2007-02-14 15:29:03 UTC (rev 9866)
@@ -1,5 +1,14 @@
-2007-02-13  Johan Bilien  <johan.bilien at nokia.com>
+2007-02-14  Moises Martinez  <moises.martinez at nokia.com>
 
+	* libhildonwm/hd-wm.c:
+	- Using union for storing value returned from XGetWindowProperty.
+	Patch from Santtu Lakkala.
+	* libhildondesktop/hildon-desktop-panel-window.c:
+	- Taking into account "move" property when moving/resizing
+	- Changed forced moving resizing when mapping widget
+
+2007-02-14  Johan Bilien  <johan.bilien at nokia.com>
+
 	* data/hildon-desktop.sh: Added startup script
 
 2007-02-13  Johan Bilien  <johan.bilien at nokia.com>

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-window.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-window.c	2007-02-14 15:18:34 UTC (rev 9865)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildondesktop/hildon-desktop-panel-window.c	2007-02-14 15:29:03 UTC (rev 9866)
@@ -387,7 +387,7 @@
 
 static void 
 hildon_desktop_panel_window_force_move (GtkWidget *widget, GdkEventExpose *event, gpointer data)
-{
+{ 
   hildon_desktop_panel_win_move_resize (HILDON_DESKTOP_PANEL_WINDOW (widget),TRUE,TRUE);
 }
 
@@ -453,7 +453,7 @@
   gtk_widget_show (GTK_WIDGET (HILDON_DESKTOP_WINDOW (window)->container));
 
   g_signal_connect_after (object,
-		          "expose-event",
+		          "map",
 			  G_CALLBACK (hildon_desktop_panel_window_force_move),
 			  NULL);
 
@@ -980,7 +980,8 @@
     position_changed = TRUE;	
   }
 
-  hildon_desktop_panel_win_move_resize (window,position_changed,size_changed);
+  if (window->priv->move)
+    hildon_desktop_panel_win_move_resize (window,position_changed,size_changed);
 }
 
 static void 

Modified: projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c
===================================================================
--- projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c	2007-02-14 15:18:34 UTC (rev 9865)
+++ projects/haf/branches/maemo-af-desktop/hildon-desktop/libhildonwm/hd-wm.c	2007-02-14 15:29:03 UTC (rev 9866)
@@ -2124,8 +2124,14 @@
   unsigned long extra;
   int           format, status, i;
   Atom          realType;
-  unsigned char *value = NULL;
+  union
+  {
+     Atom *a;
+     unsigned char *cpp;
+  } value;
 
+  value.a = NULL;
+
   if (hdwm == NULL)
     hdwm = hd_wm_get_singleton ();
 
@@ -2140,7 +2146,7 @@
                               hdwm->priv->atoms[HD_ATOM_NET_WM_STATE],
                               0L, 1000000L,
                               0, XA_ATOM, &realType, &format,
-                              &n, &extra, &value);
+                              &n, &extra, &value.cpp);
 
   if (gdk_error_trap_pop ())
   {
@@ -2153,9 +2159,9 @@
     if (realType == XA_ATOM && format == 32 && n > 0)
     {
       for (i=0; i < n; i++)
-        if (value[i] && value[i] == hdwm->priv->atoms[HD_ATOM_NET_WM_STATE_FULLSCREEN])
+        if (value.a[i] && value.a[i] == hdwm->priv->atoms[HD_ATOM_NET_WM_STATE_FULLSCREEN])
         {
-          if (value) XFree(value);
+          if (value.a) XFree(value.a);
           g_signal_emit_by_name (hdwm,"fullscreen",TRUE);
 	  g_debug ("FULLSCREEN ON %d",(GdkNativeWindow)xid);
 	  return;
@@ -2163,8 +2169,8 @@
     }
   }
 
-  if (value)
-    XFree(value);	      
+  if (value.a)
+    XFree(value.a);	      
 
   g_signal_emit_by_name (hdwm,"fullscreen",FALSE);
   g_debug ("FULLSCREEN OFF");


More information about the maemo-commits mailing list