]> 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 23:44:59 +0000 (23:44 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Mon, 4 Aug 2008 23:44:59 +0000 (23:44 +0000)
2008-08-05  Tor Lillqvist  <tml@novell.com>

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

* gtk/gtksocket-win32.c: Don't cast HWND to guint, pass it as such
as the GdkNativeWindow parameter to
gtk_window_remove_embedded_xid(). Debugging printout format fixes.

* gtk/gtkwin32embed.h
* gtk/gtkwin32embed.c: Change the types of wparam and lparam
parameters to actually be WPARAM and LPARAM.

* gtk/gtkplug-win32.c: Adapt accordingly.

svn path=/trunk/; revision=21000

ChangeLog
gtk/gtkplug-win32.c
gtk/gtksocket-win32.c
gtk/gtkwin32embed.c
gtk/gtkwin32embed.h

index 6f5f0e60efc15bb852323226a797c6d06c5ce10b..fda365a3a128693d4c73deddb9b18f95908d2fb0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2008-08-05  Tor Lillqvist  <tml@novell.com>
+
+       Bug 544684 - Win64 issue, window handles are assumed to be 32-bit
+
+       * gtk/gtksocket-win32.c: Don't cast HWND to guint, pass it as such
+       as the GdkNativeWindow parameter to
+       gtk_window_remove_embedded_xid(). Debugging printout format fixes.
+
+       * gtk/gtkwin32embed.h
+       * gtk/gtkwin32embed.c: Change the types of wparam and lparam
+       parameters to actually be WPARAM and LPARAM.
+
+       * gtk/gtkplug-win32.c: Adapt accordingly.
+
 2008-08-04  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtksettings.c: Improve a setting nick: 'aureal' is not really
index 58f62c9ee228de37bf8e5069f21b47f214006b75..98440c1cfa0cf50378c65d315f0bf58a8e19ad3f 100644 (file)
@@ -55,7 +55,7 @@ _gtk_plug_windowing_realize_toplevel (GtkPlug *plug)
     {
       _gtk_win32_embed_send (plug->socket_window,
                             GTK_WIN32_EMBED_PARENT_NOTIFY,
-                            (int) GDK_WINDOW_HWND (GTK_WIDGET (plug)->window),
+                            (WPARAM) GDK_WINDOW_HWND (GTK_WIDGET (plug)->window),
                             GTK_WIN32_EMBED_PROTOCOL_VERSION);
       _gtk_win32_embed_send (plug->socket_window,
                             GTK_WIN32_EMBED_EVENT_PLUG_MAPPED, 0, 0);
index 3bf1f47fc2e7bfbe83bd444359640ed8a050d3f3..024b3f7f34eb2d02355fccd0d706692e12ffc2bf 100644 (file)
@@ -62,7 +62,7 @@ void
 _gtk_socket_windowing_end_embedding_toplevel (GtkSocket *socket)
 {
   gtk_window_remove_embedded_xid (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (socket))),
-                                 (guint) GDK_WINDOW_HWND (socket->plug_window));
+                                 GDK_WINDOW_HWND (socket->plug_window));
 }
 
 void
@@ -215,17 +215,18 @@ _gtk_socket_windowing_filter_func (GdkXEvent *gdk_xevent,
     default:
       if (msg->message == _gtk_win32_embed_message_type (GTK_WIN32_EMBED_PARENT_NOTIFY))
        {
-         GTK_NOTE (PLUGSOCKET, g_printerr ("GtkSocket: PARENT_NOTIFY received window=%#x version=%ld\n", msg->wParam, msg->lParam));
+         GTK_NOTE (PLUGSOCKET, g_printerr ("GtkSocket: PARENT_NOTIFY received window=%p version=%d\n",
+                                           (gpointer) msg->wParam, (int) msg->lParam));
          /* If we some day different protocols deployed need to add
           * some more elaborate version handshake
           */
          if (msg->lParam != GTK_WIN32_EMBED_PROTOCOL_VERSION)
            g_warning ("GTK Win32 embedding protocol version mismatch, "
-                      "client uses version %ld, we understand version %d",
-                      msg->lParam, GTK_WIN32_EMBED_PROTOCOL_VERSION);
+                      "client uses version %d, we understand version %d",
+                      (int) msg->lParam, GTK_WIN32_EMBED_PROTOCOL_VERSION);
          if (!socket->plug_window)
            {
-             _gtk_socket_add_window (socket, msg->wParam, FALSE);
+             _gtk_socket_add_window (socket, (GdkNativeWindow) msg->wParam, FALSE);
              
              if (socket->plug_window)
                GTK_NOTE (PLUGSOCKET, g_printerr ("GtkSocket: window created"));
index b386f93f989694a7c3bf2ae6d7b5141e2b456038..242722173be8d5d93f5cc00fc495a8c7777f85d4 100644 (file)
@@ -71,8 +71,8 @@ _gtk_win32_embed_pop_message (void)
 void
 _gtk_win32_embed_send (GdkWindow               *recipient,
                       GtkWin32EmbedMessageType message,
-                      gint                     wparam,
-                      gint                     lparam)
+                      WPARAM                   wparam,
+                      LPARAM                   lparam)
 {
   PostMessage (GDK_WINDOW_HWND (recipient),
               _gtk_win32_embed_message_type (message),
@@ -82,7 +82,7 @@ _gtk_win32_embed_send (GdkWindow               *recipient,
 void
 _gtk_win32_embed_send_focus_message (GdkWindow               *recipient,
                                     GtkWin32EmbedMessageType message,
-                                    gint                     wparam)
+                                    WPARAM                   wparam)
 {
   int lparam = 0;
 
index 4e2223ef33f4cb9eddb519feecac57580681c403..743af3ccc9dfbcecac951ad965137b40eb5a3144 100644 (file)
@@ -82,11 +82,11 @@ void _gtk_win32_embed_push_message (MSG *msg);
 void _gtk_win32_embed_pop_message (void);
 void _gtk_win32_embed_send (GdkWindow              *recipient,
                            GtkWin32EmbedMessageType message,
-                           gint                     wparam,
-                           gint                     lparam);
+                           WPARAM                   wparam,
+                           LPARAM                   lparam);
 void _gtk_win32_embed_send_focus_message (GdkWindow              *recipient,
                                          GtkWin32EmbedMessageType message,
-                                         gint                     wparam);
+                                         WPARAM                   wparam);
 void     _gtk_win32_embed_set_focus_wrapped  (void);
 gboolean _gtk_win32_embed_get_focus_wrapped  (void);