Mercurial > pidgin.yaz
comparison src/win32/win32dep.c @ 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 | 8e25dff29859 |
children | 89a5b0e23ea4 |
comparison
equal
deleted
inserted
replaced
4983:10d7a6686c1f | 4984:b5e52f7e5302 |
---|---|
126 * adjust the coordinates passed to gtk_window_move. | 126 * adjust the coordinates passed to gtk_window_move. |
127 */ | 127 */ |
128 void wgaim_gtk_window_move(GtkWindow *window, gint x, gint y) { | 128 void wgaim_gtk_window_move(GtkWindow *window, gint x, gint y) { |
129 LONG style, extended_style; | 129 LONG style, extended_style; |
130 RECT trect; | 130 RECT trect; |
131 HWND hWnd = GDK_WINDOW_HWND(GTK_WIDGET(window)->window); | 131 HWND hWnd; |
132 | 132 |
133 if(!GTK_WIDGET_REALIZED(GTK_WIDGET(window))) | |
134 gtk_widget_realize(GTK_WIDGET(window)); | |
135 hWnd = GDK_WINDOW_HWND(GTK_WIDGET(window)->window); | |
133 style = GetWindowLong(hWnd, GWL_STYLE); | 136 style = GetWindowLong(hWnd, GWL_STYLE); |
134 extended_style = GetWindowLong (hWnd, GWL_EXSTYLE); | 137 extended_style = GetWindowLong (hWnd, GWL_EXSTYLE); |
135 GetClientRect (hWnd, &trect); | 138 GetClientRect (hWnd, &trect); |
136 AdjustWindowRectEx (&trect, style, FALSE, extended_style); | 139 AdjustWindowRectEx (&trect, style, FALSE, extended_style); |
137 gtk_window_move(window, x + (-1 * trect.left), y + (-1 * trect.top)); | 140 gtk_window_move(window, x + (-1 * trect.left), y + (-1 * trect.top)); |