[gtk/wip/synthetic-motion2: 4/4] scrolledwindow: Create a synthetic motion during scrolling
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/synthetic-motion2: 4/4] scrolledwindow: Create a synthetic motion during scrolling
- Date: Wed, 26 Aug 2020 12:02:11 +0000 (UTC)
commit 60038463ce17f7bb1126d1bf701387e9702cfe14
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Feb 21 16:40:10 2020 -0500
scrolledwindow: Create a synthetic motion during scrolling
We are not doing any layout here, so this is needed to fix
the listbox demo in gtk4-demo.
gtk/gtkscrolledwindow.c | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index fbc03039e4..179ebcf10c 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -52,6 +52,7 @@
#include "gtktypebuiltins.h"
#include "gtkviewport.h"
#include "gtkwidgetprivate.h"
+#include "gtknative.h"
#include <math.h>
@@ -3488,9 +3489,19 @@ gtk_scrolled_window_adjustment_value_changed (GtkAdjustment *adjustment,
{
GtkScrolledWindow *scrolled_window = user_data;
GtkScrolledWindowPrivate *priv = gtk_scrolled_window_get_instance_private (scrolled_window);
+ GtkNative *native;
+ GdkSurface *surface;
maybe_emit_edge_reached (scrolled_window, adjustment);
+ native = gtk_widget_get_native (GTK_WIDGET (scrolled_window));
+ if (native)
+ {
+ surface = gtk_native_get_surface (native);
+ if (surface)
+ gdk_surface_ensure_motion (surface);
+ }
+
/* Allow overshooting for kinetic scrolling operations */
if (priv->deceleration_id)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]