[gtk/wip/synthetic-motion: 3/3] scrolledwindow: Create a synthetic motion during scrolling
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/synthetic-motion: 3/3] scrolledwindow: Create a synthetic motion during scrolling
- Date: Fri, 21 Feb 2020 21:42:30 +0000 (UTC)
commit 8df53a48cdf8763b94d3d0cd3fb7e8c32c5238e9
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 | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 30c4310ce2..4868e5bc35 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -51,6 +51,7 @@
#include "gtktypebuiltins.h"
#include "gtkviewport.h"
#include "gtkwidgetprivate.h"
+#include "gtknative.h"
#include "a11y/gtkscrolledwindowaccessible.h"
@@ -3470,9 +3471,22 @@ 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)
+ {
+ g_print ("adjustment value changed\n");
+ //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]