From: Herman B. <her...@us...> - 2003-08-11 17:52:32
|
Update of /cvsroot/gaim/gaim/src/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv12955 Modified Files: win32dep.h win32dep.c Log Message: gtk_window_move is now fixed in gtk-2-2 branch Index: win32dep.h =================================================================== RCS file: /cvsroot/gaim/gaim/src/win32/win32dep.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- win32dep.h 11 Jul 2003 02:33:58 -0000 1.17 +++ win32dep.h 11 Aug 2003 17:48:58 -0000 1.18 @@ -68,9 +68,5 @@ #define LIBDIR wgaim_lib_dir() #define LOCALEDIR wgaim_locale_dir() -/* Temp solution for gtk_window_get_pos & gtk_window_move conflict */ -#define gtk_window_move( window, x, y ) \ -wgaim_gtk_window_move( ## window ##, ## x ##, ## y ## ) - #endif /* _WIN32DEP_H_ */ Index: win32dep.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/win32/win32dep.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- win32dep.c 22 Jul 2003 00:37:49 -0000 1.26 +++ win32dep.c 11 Aug 2003 17:48:58 -0000 1.27 @@ -136,34 +136,6 @@ return ret; } -/* - * This is a hack to circumvent the conflict between the - * windows behaviour of gtk_window_get_pos and gtk_window_move, which - * exists in GTK+ v2.2.0. GTK+ documentation explains the following - * should be true for gtk_window_get_pos: - * This function returns the position you need to pass to - * gtk_window_move() to keep window in its current position. - * This is false (for windows). gtk_window_get_pos returns - * client coords, whereas gtk_window_move accepts non-client coords. - * Our solution, until this is fixed, is to anticipate the offset and - * adjust the coordinates passed to gtk_window_move. - */ -void wgaim_gtk_window_move(GtkWindow *window, gint x, gint y) { - LONG style, extended_style; - RECT trect; - 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); - AdjustWindowRectEx (&trect, style, FALSE, extended_style); - gtk_window_move(window, x + (-1 * trect.left), y + (-1 * trect.top)); -} - - /* Determine whether the specified dll contains the specified procedure. If so, load it (if not already loaded). */ FARPROC wgaim_find_and_loadproc( char* dllname, char* procedure ) { |