diff audacious/ui_fileinfo.c @ 1312:f7244db08f40 trunk

[svn] - solve the blink issue
author nenolod
date Mon, 19 Jun 2006 14:06:54 -0700
parents 816ea8bbde1c
children 696315025220
line wrap: on
line diff
--- a/audacious/ui_fileinfo.c	Mon Jun 19 10:52:13 2006 -0700
+++ b/audacious/ui_fileinfo.c	Mon Jun 19 14:06:54 2006 -0700
@@ -172,7 +172,7 @@
 static gboolean
 filepopup_pointer_check_iter(gpointer unused)
 {
-	gint x, y, x_off = 3, y_off = 3, h, w, pos;
+	gint x, y, pos;
 	TitleInput *tuple;
 	static gint prev_x = 0, prev_y = 0, ctr = 0;
 	gboolean skip = FALSE;
@@ -210,13 +210,7 @@
 	    	}
 
 		tuple = playlist_get_tuple(pos);
-
-		gdk_window_get_pointer(NULL, &x, &y, NULL);
 		filepopup_show_for_tuple(tuple);
-		gtk_window_get_size(GTK_WINDOW(filepopup_win), &w, &h);
-		if (gdk_screen_width()-(w+3) < x) x_off = (w*-1)-3;
-		if (gdk_screen_height()-(h+3) < y) y_off = (h*-1)-3;
-		gtk_window_move(GTK_WINDOW(filepopup_win), x + x_off, y + y_off);
 	}
 
 	return TRUE;
@@ -352,6 +346,7 @@
 {
 	gchar *tmp;
 	GDir *d;
+	gint x, y, x_off = 3, y_off = 3, h, w;
 
 	if (tuple == NULL)
 		return;
@@ -393,6 +388,12 @@
 		g_dir_close(d);
 	}
 
+	gdk_window_get_pointer(NULL, &x, &y, NULL);
+	gtk_window_get_size(GTK_WINDOW(filepopup_win), &w, &h);
+	if (gdk_screen_width()-(w+3) < x) x_off = (w*-1)-3;
+	if (gdk_screen_height()-(h+3) < y) y_off = (h*-1)-3;
+	gtk_window_move(GTK_WINDOW(filepopup_win), x + x_off, y + y_off);
+
 	gtk_widget_show(filepopup_win);
 }