changeset 4984:b5e52f7e5302

[gaim-migrate @ 5319] now realizing windows in wgaim_gtk_window_move committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Thu, 03 Apr 2003 17:08:34 +0000
parents 10d7a6686c1f
children 088566495617
files src/buddy.c src/win32/win32dep.c
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy.c	Thu Apr 03 16:57:39 2003 +0000
+++ b/src/buddy.c	Thu Apr 03 17:08:34 2003 +0000
@@ -546,7 +546,6 @@
 		gtk_widget_set_app_paintable(gtkblist->tipwindow, TRUE);
 		gtk_window_set_resizable(GTK_WINDOW(gtkblist->tipwindow), FALSE);
 		gtk_widget_set_name(gtkblist->tipwindow, "gtk-tooltips");
-		gtk_widget_realize(gtkblist->tipwindow);
 		g_signal_connect(G_OBJECT(gtkblist->tipwindow), "expose_event", 
 				 G_CALLBACK(gaim_gtk_blist_paint_tip), buddy);
 		gtk_widget_ensure_style (gtkblist->tipwindow);
@@ -1141,7 +1140,6 @@
 	gtkblist->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
 	gtk_window_set_role(GTK_WINDOW(gtkblist->window), "buddy_list");
 	gtk_window_set_title(GTK_WINDOW(gtkblist->window), _("Buddy List"));
-	gtk_widget_realize(gtkblist->window);
 
 	gtkblist->vbox = gtk_vbox_new(FALSE, 0);
 	gtk_container_add(GTK_CONTAINER(gtkblist->window), gtkblist->vbox);
--- a/src/win32/win32dep.c	Thu Apr 03 16:57:39 2003 +0000
+++ b/src/win32/win32dep.c	Thu Apr 03 17:08:34 2003 +0000
@@ -128,8 +128,11 @@
 void wgaim_gtk_window_move(GtkWindow *window, gint x, gint y) {
 	LONG style,  extended_style;
 	RECT trect;
-	HWND hWnd = GDK_WINDOW_HWND(GTK_WIDGET(window)->window);
+	HWND hWnd;
 
+	if(!GTK_WIDGET_REALIZED(GTK_WIDGET(window)))
+		gtk_widget_realize(GTK_WIDGET(window));
+	hWnd = GDK_WINDOW_HWND(GTK_WIDGET(window)->window);
 	style = GetWindowLong(hWnd, GWL_STYLE);
 	extended_style = GetWindowLong (hWnd, GWL_EXSTYLE);
 	GetClientRect (hWnd, &trect);