Mercurial > audlegacy
changeset 1298:61b576d80cbb trunk
[svn] nitpicks, whee! just so I can see the popup when snapped against screen edge.
author | nemo |
---|---|
date | Sun, 18 Jun 2006 21:52:46 -0700 |
parents | f2e1a954237f |
children | ead95abdf9bc |
files | ChangeLog audacious/ui_fileinfo.c |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Jun 18 21:45:20 2006 -0700 +++ b/ChangeLog Sun Jun 18 21:52:46 2006 -0700 @@ -1,3 +1,12 @@ +2006-06-19 04:45:20 +0000 William Pitcock <nenolod@nenolod.net> + revision [1506] + - la la la, resize + + + Changes: Modified: + +2 -0 trunk/audacious/ui_fileinfo.c + + 2006-06-19 04:35:32 +0000 William Pitcock <nenolod@nenolod.net> revision [1504] - initial album art support
--- a/audacious/ui_fileinfo.c Sun Jun 18 21:45:20 2006 -0700 +++ b/audacious/ui_fileinfo.c Sun Jun 18 21:52:46 2006 -0700 @@ -149,7 +149,7 @@ static gboolean filepopup_pointer_check_iter(gpointer unused) { - gint x, y, pos; + gint x, y, x_off = 3, y_off = 3, h, w, pos; TitleInput *tuple; static gint prev_x = 0, prev_y = 0, ctr = 0; @@ -186,7 +186,10 @@ gdk_window_get_pointer(NULL, &x, &y, NULL); filepopup_show_for_tuple(tuple); - gtk_window_move(GTK_WINDOW(filepopup_win), x + 3, y + 3); + 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;