From eff4be5c8de9642fdd39e667e53ccca58b9070ef Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 4 Aug 2008 22:57:36 +0000 Subject: [PATCH] Bug 544684 - Win64 issue, window handles are assumed to be 32-bit 2008-08-05 Tor Lillqvist Bug 544684 - Win64 issue, window handles are assumed to be 32-bit * gtk/gtkwindow.h * gtk/gtkwindow.c: Change the type of the xid parameter of the internal gtk_window_remove_embedded_xid() and gtk_window_add_embedded_xid() functions from guint to GdkNativeWindow. * gtk/gtkwindow.c (send_client_message_to_embedded_windows): Instead of GPOINTER_TO_UINT(), just cast the gpointer to GdkNativeWindow. GPOINTER_TO_UINT() drops the upper 32 bits on Win64. svn path=/trunk/; revision=20992 --- ChangeLog | 11 +++++++++++ gtk/gtkwindow.c | 6 +++--- gtk/gtkwindow.h | 8 ++++---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3667d216f4..47b90abbec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,17 @@ casts to get rid of gcc 4.4 warnings. Print GdkAtom values in debugging output using the %p format. + * gtk/gtkwindow.h + * gtk/gtkwindow.c: Change the type of the xid parameter of the + internal gtk_window_remove_embedded_xid() and + gtk_window_add_embedded_xid() functions from guint to + GdkNativeWindow. + + * gtk/gtkwindow.c (send_client_message_to_embedded_windows): + Instead of GPOINTER_TO_UINT(), just cast the gpointer to + GdkNativeWindow. GPOINTER_TO_UINT() drops the upper 32 bits on + Win64. + 2008-08-05 Tor Lillqvist * gdk/gdkrgb.c: Cast pointers to guintptr, not unsigned long, diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index b1ffd959ca..c020354c25 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1936,7 +1936,7 @@ gtk_window_list_toplevels (void) } void -gtk_window_add_embedded_xid (GtkWindow *window, guint xid) +gtk_window_add_embedded_xid (GtkWindow *window, GdkNativeWindow xid) { GList *embedded_windows; @@ -1955,7 +1955,7 @@ gtk_window_add_embedded_xid (GtkWindow *window, guint xid) } void -gtk_window_remove_embedded_xid (GtkWindow *window, guint xid) +gtk_window_remove_embedded_xid (GtkWindow *window, GdkNativeWindow xid) { GList *embedded_windows; GList *node; @@ -5140,7 +5140,7 @@ send_client_message_to_embedded_windows (GtkWidget *widget, while (embedded_windows) { - guint 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; } diff --git a/gtk/gtkwindow.h b/gtk/gtkwindow.h index a399e267c3..20829eca4e 100644 --- a/gtk/gtkwindow.h +++ b/gtk/gtkwindow.h @@ -398,10 +398,10 @@ GList * gtk_window_group_list_windows (GtkWindowGroup *window_grou /* --- internal functions --- */ void _gtk_window_internal_set_focus (GtkWindow *window, GtkWidget *focus); -void gtk_window_remove_embedded_xid (GtkWindow *window, - guint xid); -void gtk_window_add_embedded_xid (GtkWindow *window, - guint xid); +void gtk_window_remove_embedded_xid (GtkWindow *window, + GdkNativeWindow xid); +void gtk_window_add_embedded_xid (GtkWindow *window, + GdkNativeWindow xid); void _gtk_window_reposition (GtkWindow *window, gint x, gint y);