Commit 1b18916a authored by Benjamin Otte's avatar Benjamin Otte

win32: Make GtkWin32EmbedWidget use HWND instead of GdkNativeWindow

parent 63aa56bc
......@@ -1360,7 +1360,7 @@ pageDlgProc (HWND wnd, UINT message, WPARAM wparam, LPARAM lparam)
SetWindowLongPtrW (wnd, GWLP_USERDATA, (LONG_PTR)op);
plug = _gtk_win32_embed_widget_new ((GdkNativeWindow) wnd);
plug = _gtk_win32_embed_widget_new (wnd);
gtk_window_set_modal (GTK_WINDOW (plug), TRUE);
op_win32->embed_widget = plug;
gtk_container_add (GTK_CONTAINER (plug), op->priv->custom_widget);
......
......@@ -89,7 +89,7 @@ gtk_win32_embed_widget_init (GtkWin32EmbedWidget *embed_widget)
}
GtkWidget*
_gtk_win32_embed_widget_new (GdkNativeWindow parent_id)
_gtk_win32_embed_widget_new (HWND parent)
{
GtkWin32EmbedWidget *embed_widget;
......@@ -97,12 +97,12 @@ _gtk_win32_embed_widget_new (GdkNativeWindow parent_id)
embed_widget->parent_window =
gdk_win32_window_lookup_for_display (gdk_display_get_default (),
parent_id);
parent);
if (!embed_widget->parent_window)
embed_widget->parent_window =
gdk_win32_window_foreign_new_for_display (gdk_display_get_default (),
parent_id);
parent);
return GTK_WIDGET (embed_widget);
}
......@@ -150,8 +150,7 @@ gtk_win32_embed_widget_window_process (HWND hwnd, UINT msg, WPARAM wparam, LPARA
GtkWin32EmbedWidget *embed_widget;
gpointer user_data;
window = gdk_win32_window_lookup_for_display (gdk_display_get_default (),
(GdkNativeWindow)hwnd);
window = gdk_win32_window_lookup_for_display (gdk_display_get_default (), hwnd);
if (window == NULL) {
g_warning ("No such window!");
return 0;
......
......@@ -66,7 +66,7 @@ struct _GtkWin32EmbedWidgetClass
GType gtk_win32_embed_widget_get_type (void) G_GNUC_CONST;
GtkWidget* _gtk_win32_embed_widget_new (GdkNativeWindow parent_id);
GtkWidget* _gtk_win32_embed_widget_new (HWND parent);
BOOL _gtk_win32_embed_widget_dialog_procedure (GtkWin32EmbedWidget *embed_widget,
HWND wnd, UINT message, WPARAM wparam, LPARAM lparam);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment