]> Pileus Git - ~andy/gtk/commitdiff
Bug 544684 - Win64 issue, window handles are assumed to be 32-bit
authorTor Lillqvist <tml@novell.com>
Mon, 4 Aug 2008 22:43:57 +0000 (22:43 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 4 Aug 2008 22:43:57 +0000 (22:43 +0000)
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.

svn path=/trunk/; revision=20991

ChangeLog
gdk/gdkselection.c
gdk/gdkselection.h
gdk/win32/gdkselection-win32.c
gdk/x11/gdkselection-x11.c

index 0993fb2615e466b6c3ee24ddb826f16aab8f8b31..3667d216f4d9f7a536ff276524656afd978277bc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        platforms, as GdkNativeWindow has been guint32 for them
        already.
 
+       * gdk/gdkselection.h
+       * gdk/gdkselection.c
+       * gdk/win32/gdkselection-win32.c
+       * gdk/x11/gdkselection-x11.c: Ditto for the requestor window id
+       parameter of gdk_selection_send_notify_for_display() and
+       gdk_selection_send_notify().
+
+       * 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.
+       
 2008-08-05  Tor Lillqvist  <tml@novell.com>
 
        * gdk/gdkrgb.c: Cast pointers to guintptr, not unsigned long,
index 0587fc75a631c2de89a41988913d376ed46d238b..2a9b84c6a494e1566912c32534729b8db4ec5a44 100644 (file)
@@ -49,11 +49,11 @@ gdk_selection_owner_get (GdkAtom selection)
 }
 
 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, 
index 8b8f008dc08dc7ce682d7c3dd6005e8b42336a65..325c38321cbcd31e296676bfe816f6cb3e5af97d 100644 (file)
@@ -92,19 +92,19 @@ gboolean   gdk_selection_property_get (GdkWindow  *requestor,
                                       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
 
index 5f90dc308f6ca065ca32bf551d0e4db35d164040..fbbaebbf224161ba09686a94a84b84d34e40296b 100644 (file)
@@ -144,7 +144,7 @@ _gdk_selection_property_store (GdkWindow *owner,
   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 @@ _gdk_selection_property_store (GdkWindow *owner,
          return;
        }
       else
-       prop->length = strlen (prop->data) + 1;
+       prop->length = strlen ((char*) prop->data) + 1;
     }
   else
     {
@@ -176,7 +176,7 @@ _gdk_dropfiles_store (gchar *data)
       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_selection_owner_set_for_display (GdkDisplay *display,
 
     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 @@ gdk_selection_owner_set_for_display (GdkDisplay *display,
       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_selection_owner_get_for_display (GdkDisplay *display,
     
     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_selection_convert (GdkWindow *requestor,
     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 @@ _gdk_selection_property_delete (GdkWindow *window)
 }
 
 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 @@ gdk_selection_send_notify_for_display (GdkDisplay *display,
              (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)));
index f56ab438680ddcfd627840bebfcee0ac259183bf..76ec3eec4ce80f7bca44c15cd5ac274663359ded 100644 (file)
@@ -387,12 +387,12 @@ gdk_selection_property_get (GdkWindow  *requestor,
  * 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;