X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fgtk-contrib%2Fgtkxpaned.c;h=8bd5253deae0f8c75db34c273b51d87b61931fcb;hb=7bf0c4d57ce0da1ad3fe082a01716808eaef09a5;hp=29f5b4dc168020568783c0791d64006a2e878c2b;hpb=dbf6401f7efc2feab37aae5c8620d8edc84e9dce;p=pspp diff --git a/lib/gtk-contrib/gtkxpaned.c b/lib/gtk-contrib/gtkxpaned.c index 29f5b4dc16..8bd5253dea 100644 --- a/lib/gtk-contrib/gtkxpaned.c +++ b/lib/gtk-contrib/gtkxpaned.c @@ -1468,12 +1468,18 @@ static void update_drag (GtkXPaned * xpaned) { GdkPoint pos; + GtkWidget *widget = GTK_WIDGET (xpaned); gint handle_size; GtkRequisition size; GtkAllocation allocation; - gtk_widget_get_allocation (GTK_WIDGET (xpaned), &allocation); - gtk_widget_get_pointer (GTK_WIDGET (xpaned), &pos.x, &pos.y); + gtk_widget_get_allocation (widget, &allocation); + + gdk_window_get_device_position (gtk_widget_get_window (widget), + gdk_device_manager_get_client_pointer ( + gdk_display_get_device_manager ( + gtk_widget_get_display (widget))), + &pos.x, &pos.y, NULL); if (xpaned->in_drag_vert) { @@ -1481,8 +1487,7 @@ update_drag (GtkXPaned * xpaned) if (is_rtl (xpaned)) { - gtk_widget_style_get (GTK_WIDGET (xpaned), - "handle-size", &handle_size, NULL); + gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); size.height = allocation.height - pos.y - handle_size; } @@ -1506,8 +1511,7 @@ update_drag (GtkXPaned * xpaned) if (is_rtl (xpaned)) { - gtk_widget_style_get (GTK_WIDGET (xpaned), - "handle-size", &handle_size, NULL); + gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); size.width = allocation.width - pos.x - handle_size; } @@ -1532,8 +1536,7 @@ update_drag (GtkXPaned * xpaned) if (is_rtl (xpaned)) { - gtk_widget_style_get (GTK_WIDGET (xpaned), - "handle-size", &handle_size, NULL); + gtk_widget_style_get (widget, "handle-size", &handle_size, NULL); size.width = allocation.width - pos.x - handle_size; size.height = allocation.height - pos.y - handle_size;