changeset 4748:d3c09ddfd3aa

[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 <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 13 Mar 2003 20:19:52 +0000
parents 83a3e0482954
children d03b3088e58c
files src/gtkconv.c
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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);
 		}