changeset 1286:f8c976466f60 trunk

[svn] - proper X11 way of fixing this
author nenolod
date Sun, 18 Jun 2006 00:55:01 -0700
parents 000a0c4207ae
children e778f43a74fb
files ChangeLog audacious/playlist_list.h audacious/ui_fileinfo.c audacious/ui_playlist.c
diffstat 4 files changed, 34 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jun 18 00:40:44 2006 -0700
+++ b/ChangeLog	Sun Jun 18 00:55:01 2006 -0700
@@ -1,3 +1,12 @@
+2006-06-18 07:40:44 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1482]
+  - complete fix
+  
+
+  Changes:        Modified:
+  +1 -1           trunk/audacious/ui_fileinfo.c  
+
+
 2006-06-18 07:28:12 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1480]
   - kludge
--- a/audacious/playlist_list.h	Sun Jun 18 00:40:44 2006 -0700
+++ b/audacious/playlist_list.h	Sun Jun 18 00:55:01 2006 -0700
@@ -37,6 +37,7 @@
     gint pl_auto_drag_up_tag, pl_auto_drag_down_tag;
     gboolean pl_drag_motion;
     gint drag_motion_x, drag_motion_y;
+    gboolean pl_tooltips;
 };
 
 typedef struct _PlayList_List PlayList_List;
--- a/audacious/ui_fileinfo.c	Sun Jun 18 00:40:44 2006 -0700
+++ b/audacious/ui_fileinfo.c	Sun Jun 18 00:55:01 2006 -0700
@@ -128,14 +128,14 @@
 	TitleInput *tuple;
 	static gint prev_x = 0, prev_y = 0, ctr = 0;
 
-	gdk_window_get_pointer(playlistwin->window, &x, &y, NULL);
-
-	if (playlistwin_is_shaded() || playlistwin_shade->pb_allow_draw == FALSE)
+	if (playlistwin_list->pl_tooltips == FALSE)
 	{
 		ctr = 0;
 		return TRUE;
 	}
 
+	gdk_window_get_pointer(playlistwin->window, &x, &y, NULL);
+
 	if (prev_x == x && prev_y == y)
 		ctr++;
 	else
--- a/audacious/ui_playlist.c	Sun Jun 18 00:40:44 2006 -0700
+++ b/audacious/ui_playlist.c	Sun Jun 18 00:55:01 2006 -0700
@@ -727,6 +727,22 @@
 }
 
 static void
+playlistwin_enter(GtkWidget * widget,
+                   GdkEventMotion * event,
+                   gpointer callback_data)
+{
+    playlistwin_list->pl_tooltips = TRUE;
+}
+
+static void
+playlistwin_leave(GtkWidget * widget,
+                   GdkEventMotion * event,
+                   gpointer callback_data)
+{
+    playlistwin_list->pl_tooltips = FALSE;
+}
+
+static void
 playlistwin_show_filebrowser(void)
 {
     util_run_filebrowser(NO_PLAY_BUTTON);
@@ -1676,7 +1692,7 @@
         gtk_window_move(GTK_WINDOW(playlistwin),
                         cfg.playlist_x, cfg.playlist_y);
 
-    gtk_widget_add_events(playlistwin,
+    gtk_widget_add_events(playlistwin, GDK_POINTER_MOTION_MASK |
                           GDK_FOCUS_CHANGE_MASK | GDK_BUTTON_MOTION_MASK |
                           GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK |
                           GDK_SCROLL_MASK | GDK_VISIBILITY_NOTIFY_MASK);
@@ -1694,6 +1710,10 @@
                      G_CALLBACK(playlistwin_scrolled), NULL);
     g_signal_connect(playlistwin, "motion_notify_event",
                      G_CALLBACK(playlistwin_motion), NULL);
+    g_signal_connect(playlistwin, "enter_notify_event",
+                     G_CALLBACK(playlistwin_enter), NULL);
+    g_signal_connect(playlistwin, "leave_notify_event",
+                     G_CALLBACK(playlistwin_leave), NULL);
     g_signal_connect_after(playlistwin, "focus_in_event",
                            G_CALLBACK(playlistwin_focus_in), NULL);
     g_signal_connect_after(playlistwin, "focus_out_event",