[gtk+/wip/carlosg/event-delivery: 99/105] flowbox: Fix motion notify handler
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/carlosg/event-delivery: 99/105] flowbox: Fix motion notify handler
- Date: Sun, 14 May 2017 23:45:46 +0000 (UTC)
commit 14c0d4cbdabf44e05ded8e18cfb4189865850eef
Author: Timm Bäder <mail baedert org>
Date: Wed May 10 12:18:32 2017 +0200
flowbox: Fix motion notify handler
Same story as in GtkListBox.
gtk/gtkflowbox.c | 23 +----------------------
1 files changed, 1 insertions(+), 22 deletions(-)
---
diff --git a/gtk/gtkflowbox.c b/gtk/gtkflowbox.c
index bc7d610..a0f9820 100644
--- a/gtk/gtkflowbox.c
+++ b/gtk/gtkflowbox.c
@@ -2830,29 +2830,8 @@ gtk_flow_box_motion_notify_event (GtkWidget *widget,
{
GtkFlowBox *box = GTK_FLOW_BOX (widget);
GtkFlowBoxChild *child;
- GdkWindow *window;
- GdkWindow *event_window;
- gint relative_x;
- gint relative_y;
- gdouble parent_x;
- gdouble parent_y;
-
- window = gtk_widget_get_window (GTK_WIDGET (box));
- event_window = event->window;
- relative_x = event->x;
- relative_y = event->y;
-
- while ((event_window != NULL) && (event_window != window))
- {
- gdk_window_coords_to_parent (event_window,
- relative_x, relative_y,
- &parent_x, &parent_y);
- relative_x = parent_x;
- relative_y = parent_y;
- event_window = gdk_window_get_parent (event_window);
- }
- child = gtk_flow_box_get_child_at_pos (box, relative_x, relative_y);
+ child = gtk_flow_box_get_child_at_pos (box, event->x, event->y);
gtk_flow_box_update_active (box, child);
return GTK_WIDGET_CLASS (gtk_flow_box_parent_class)->motion_notify_event (widget, event);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]