gtk+ r20991 - in trunk: . gdk gdk/win32 gdk/x11



Author: tml
Date: Mon Aug  4 22:43:57 2008
New Revision: 20991
URL: http://svn.gnome.org/viewvc/gtk+?rev=20991&view=rev

Log:
2008-08-05  Tor Lillqvist  <tml novell com>

	Bug 544684 - Win64 issue, window handles are assumed to be 32-bit

	* gdk/gdkselection.h
	* gdk/gdkselection.c
	* gdk/win32/gdkselection-win32.c
	* gdk/x11/gdkselection-x11.c: Change type of the requestor
	window id parameter of gdk_selection_send_notify_for_display()
	and gdk_selection_send_notify() from guint32 to
	GdkNativeWindow.

	* gdk/win32/gdkselection-win32.c: Add some guchar and char pointer
	casts to get rid of gcc 4.4 warnings. Print GdkAtom values in
	debugging output using the %p format.



Modified:
   trunk/ChangeLog
   trunk/gdk/gdkselection.c
   trunk/gdk/gdkselection.h
   trunk/gdk/win32/gdkselection-win32.c
   trunk/gdk/x11/gdkselection-x11.c

Modified: trunk/gdk/gdkselection.c
==============================================================================
--- trunk/gdk/gdkselection.c	(original)
+++ trunk/gdk/gdkselection.c	Mon Aug  4 22:43:57 2008
@@ -49,11 +49,11 @@
 }
 
 void
-gdk_selection_send_notify (guint32  requestor,
-			   GdkAtom  selection,
-			   GdkAtom  target,
-			   GdkAtom  property,
-			   guint32  time)
+gdk_selection_send_notify (GdkNativeWindow requestor,
+			   GdkAtom         selection,
+			   GdkAtom         target,
+			   GdkAtom         property,
+			   guint32         time)
 {
   gdk_selection_send_notify_for_display (gdk_display_get_default (), 
 					 requestor, selection, 

Modified: trunk/gdk/gdkselection.h
==============================================================================
--- trunk/gdk/gdkselection.h	(original)
+++ trunk/gdk/gdkselection.h	Mon Aug  4 22:43:57 2008
@@ -92,19 +92,19 @@
 				       gint	  *prop_format);
 
 #ifndef GDK_MULTIHEAD_SAFE
-void	   gdk_selection_send_notify (guint32	    requestor,
-				      GdkAtom	    selection,
-				      GdkAtom	    target,
-				      GdkAtom	    property,
-				      guint32	    time_);
+void	   gdk_selection_send_notify (GdkNativeWindow requestor,
+				      GdkAtom	      selection,
+				      GdkAtom	      target,
+				      GdkAtom	      property,
+				      guint32	      time_);
 #endif /* GDK_MULTIHEAD_SAFE */
 
-void       gdk_selection_send_notify_for_display (GdkDisplay *display,
-						  guint32     requestor,
-						  GdkAtom     selection,
-						  GdkAtom     target,
-						  GdkAtom     property,
-						  guint32     time_);
+void       gdk_selection_send_notify_for_display (GdkDisplay      *display,
+						  GdkNativeWindow  requestor,
+						  GdkAtom     	   selection,
+						  GdkAtom     	   target,
+						  GdkAtom     	   property,
+						  guint32     	   time_);
 
 G_END_DECLS
 

Modified: trunk/gdk/win32/gdkselection-win32.c
==============================================================================
--- trunk/gdk/win32/gdkselection-win32.c	(original)
+++ trunk/gdk/win32/gdkselection-win32.c	Mon Aug  4 22:43:57 2008
@@ -144,7 +144,7 @@
   if (type == GDK_TARGET_STRING)
     {
       /* We know that data is UTF-8 */
-      prop->data = _gdk_utf8_to_string_target_internal (data, length);
+      prop->data = (guchar *) _gdk_utf8_to_string_target_internal ((char*) data, length);
       g_free (data);
 
       if (!prop->data)
@@ -154,7 +154,7 @@
 	  return;
 	}
       else
-	prop->length = strlen (prop->data) + 1;
+	prop->length = strlen ((char*) prop->data) + 1;
     }
   else
     {
@@ -176,7 +176,7 @@
       g_assert (dropfiles_prop == NULL);
 
       dropfiles_prop = g_new (GdkSelProp, 1);
-      dropfiles_prop->data = data;
+      dropfiles_prop->data = (guchar *) data;
       dropfiles_prop->length = strlen (data) + 1;
       dropfiles_prop->format = 8;
       dropfiles_prop->type = _text_uri_list;
@@ -211,9 +211,9 @@
 
     GDK_NOTE (DND,
 	      (sel_name = gdk_atom_name (selection),
-	       g_print ("gdk_selection_owner_set_for_display: %p %#x (%s)\n",
+	       g_print ("gdk_selection_owner_set_for_display: %p %p (%s)\n",
 			(owner ? GDK_WINDOW_HWND (owner) : NULL),
-			(guint) selection, sel_name),
+			selection, sel_name),
 	       g_free (sel_name)));
   }
 #endif
@@ -267,7 +267,7 @@
       tmp_event.selection.selection = selection;
       tmp_event.selection.target = _utf8_string;
       tmp_event.selection.property = _gdk_selection_property;
-      tmp_event.selection.requestor = (guint32) hwnd;
+      tmp_event.selection.requestor = hwnd;
       tmp_event.selection.time = time;
 
       gdk_event_put (&tmp_event);
@@ -303,8 +303,8 @@
     
     GDK_NOTE (DND,
 	      (sel_name = gdk_atom_name (selection),
-	       g_print ("gdk_selection_owner_get: %#x (%s) = %p\n",
-			(guint) selection, sel_name,
+	       g_print ("gdk_selection_owner_get: %p (%s) = %p\n",
+			selection, sel_name,
 			(window ? GDK_WINDOW_HWND (window) : NULL)),
 	       g_free (sel_name)));
   }
@@ -356,10 +356,10 @@
     GDK_NOTE (DND,
 	      (sel_name = gdk_atom_name (selection),
 	       tgt_name = gdk_atom_name (target),
-	       g_print ("gdk_selection_convert: %p %#x (%s) %#x (%s)\n",
+	       g_print ("gdk_selection_convert: %p %p (%s) %p (%s)\n",
 			GDK_WINDOW_HWND (requestor),
-			(guint) selection, sel_name,
-			(guint) target, tgt_name),
+			selection, sel_name,
+			target, tgt_name),
 	       g_free (sel_name),
 	       g_free (tgt_name)));
   }
@@ -750,12 +750,12 @@
 }
 
 void
-gdk_selection_send_notify_for_display (GdkDisplay *display,
-                                       guint32     requestor,
-                                       GdkAtom     selection,
-                                       GdkAtom     target,
-                                       GdkAtom     property,
-                                       guint32     time)
+gdk_selection_send_notify_for_display (GdkDisplay      *display,
+                                       GdkNativeWindow  requestor,
+                                       GdkAtom     	selection,
+                                       GdkAtom     	target,
+                                       GdkAtom     	property,
+                                       guint32     	time)
 {
   g_return_if_fail (display == _gdk_display);
 
@@ -767,11 +767,11 @@
 	      (sel_name = gdk_atom_name (selection),
 	       tgt_name = gdk_atom_name (target),
 	       prop_name = gdk_atom_name (property),
-	       g_print ("gdk_selection_send_notify_for_display: %p %#x (%s) %#x (%s) %#x (%s)\n",
-			(gpointer) requestor,
-			(guint) selection, sel_name,
-			(guint) target, tgt_name,
-			(guint) property, prop_name),
+	       g_print ("gdk_selection_send_notify_for_display: %p %p (%s) %p (%s) %p (%s)\n",
+			requestor,
+			selection, sel_name,
+			target, tgt_name,
+			property, prop_name),
 	       g_free (sel_name),
 	       g_free (tgt_name),
 	       g_free (prop_name)));

Modified: trunk/gdk/x11/gdkselection-x11.c
==============================================================================
--- trunk/gdk/x11/gdkselection-x11.c	(original)
+++ trunk/gdk/x11/gdkselection-x11.c	Mon Aug  4 22:43:57 2008
@@ -387,12 +387,12 @@
  * Since: 2.2
  **/
 void
-gdk_selection_send_notify_for_display (GdkDisplay *display,
-				       guint32     requestor,
-				       GdkAtom     selection,
-				       GdkAtom     target,
-				       GdkAtom     property, 
-				       guint32     time)
+gdk_selection_send_notify_for_display (GdkDisplay       *display,
+				       GdkNativeWindow  requestor,
+				       GdkAtom          selection,
+				       GdkAtom          target,
+				       GdkAtom          property, 
+				       guint32          time)
 {
   XSelectionEvent xevent;
   



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]