summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2009-11-10 16:08:23 +0200
committerTor Lillqvist <tml@iki.fi>2009-11-10 16:17:33 +0200
commit0e87c905395b06ce31cee5238172ce2de739f532 (patch)
tree4089964efabd49eb0dad49cbf99f6fc94ca5c893
parentcb301e6dbbe8c4017c7022995976b577796cf903 (diff)
downloadgtk+-0e87c905395b06ce31cee5238172ce2de739f532.tar.gz
Revert "Fix compilation warning: Use G_POINTER_TO_UINT"
GPOINTER_TO_UINT() *does* drop the upper 32 bits on 64-bit Windows. After all, it by definition produces a (32-bit) unsigned int. The GLib commit mentioned in the reverted commit's log message just means that it does this without any compiler warning about casting from pointer to integer of smaller size, as it first casts to a 64-bit integer, then casts that to a (32-bit) int. We must use the GdkNativeWindow cast here so that on 64-bit Windows the gpointer data in embedded_list is converted to a (64-bit) native window handle without going through 32-bit truncation. If ifdefs are required to avoid compiler warnings on X11, so be it then. Probably it would be best to introduce a GDK_GPOINTER_TO_NATIVE_WINDOW() macro in gdktypes.h. This reverts commit 78151dc7d41069e876fe165527e68c238ef7fd4a.
-rw-r--r--gtk/gtkwindow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 5fed54bfce..ffd9d8a9b6 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5315,7 +5315,7 @@ send_client_message_to_embedded_windows (GtkWidget *widget,
while (embedded_windows)
{
- GdkNativeWindow xid = GPOINTER_TO_UINT (embedded_windows->data);
+ GdkNativeWindow xid = (GdkNativeWindow) embedded_windows->data;
gdk_event_send_client_message_for_display (gtk_widget_get_display (widget), send_event, xid);
embedded_windows = embedded_windows->next;
}