[gtk+/wip/baedert/children: 5/5] listbox: Fix row hovering



commit 4ed172423e576d80fd41267692f0b192cd7d4514
Author: Timm Bäder <mail baedert org>
Date:   Wed Nov 30 11:27:32 2016 +0100

    listbox: Fix row hovering
    
    GtkListBox is not a windowed widget anymore so we can't use
    gtk_widget_get_window. Just directly access priv->view_window instead to
    get the right window.

 gtk/gtklistbox.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index db3a9a5..153c07b 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -1830,7 +1830,7 @@ gtk_list_box_enter_notify_event (GtkWidget        *widget,
   GtkListBox *box = GTK_LIST_BOX (widget);
   GtkListBoxRow *row;
 
-  if (event->window != gtk_widget_get_window (widget))
+  if (event->window != BOX_PRIV (box)->view_window)
     return FALSE;
 
   BOX_PRIV (box)->in_widget = TRUE;
@@ -1849,7 +1849,7 @@ gtk_list_box_leave_notify_event (GtkWidget        *widget,
   GtkListBox *box = GTK_LIST_BOX (widget);
   GtkListBoxRow *row = NULL;
 
-  if (event->window != gtk_widget_get_window (widget))
+  if (event->window != BOX_PRIV (box)->view_window)
     return FALSE;
 
   if (event->detail != GDK_NOTIFY_INFERIOR)
@@ -1879,7 +1879,7 @@ gtk_list_box_motion_notify_event (GtkWidget      *widget,
   if (!BOX_PRIV (box)->in_widget)
     return FALSE;
 
-  window = gtk_widget_get_window (widget);
+  window = BOX_PRIV (box)->view_window;
   event_window = event->window;
   relative_y = event->y;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]