# HG changeset patch # User Christian Hammond # Date 1047586792 0 # Node ID d3c09ddfd3aac7a8d6e2fff9755423600e870658 # Parent 83a3e0482954b28bba36074c9656b4f1350fb77e [gaim-migrate @ 5063] When dragging a tab out of a window to form a new window, the new window is now centered where the mouse cursor was. committer: Tailor Script diff -r 83a3e0482954 -r d3c09ddfd3aa src/gtkconv.c --- a/src/gtkconv.c Thu Mar 13 20:18:20 2003 +0000 +++ b/src/gtkconv.c Thu Mar 13 20:19:52 2003 +0000 @@ -1638,11 +1638,23 @@ if (gaim_window_get_conversation_count(win) > 1) { /* Make a new window to stick this to. */ struct gaim_window *new_win; + struct gaim_gtk_window *new_gtkwin; + gint win_width, win_height; new_win = gaim_window_new(); gaim_window_remove_conversation(win, gaim_conversation_get_index(conv)); gaim_window_add_conversation(new_win, conv); + + new_gtkwin = GAIM_GTK_WINDOW(new_win); + + gtk_window_get_size(GTK_WINDOW(new_gtkwin->window), + &win_width, &win_height); + + gtk_window_move(GTK_WINDOW(new_gtkwin->window), + e->x_root - (win_width / 2), + e->y_root - (win_height / 2)); + gaim_window_show(new_win); }