Skip to content

Fix visual tearing in scroll-view (#11760) #12672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/st/st-scroll-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,16 @@ vfade_setting_changed_cb (GSettings *settings, gchar *key, gpointer user_data)
st_scroll_view_style_changed (widget);
}

static void
st_scroll_view_vadjustment_changed (GSettings *settings,
gchar *key,
gpointer user_data)
{
ClutterActor *scroll_view = CLUTTER_ACTOR (user_data);

clutter_actor_queue_redraw (scroll_view);
}

static gboolean
st_scroll_view_scroll_event (ClutterActor *self,
ClutterScrollEvent *event)
Expand Down Expand Up @@ -1087,6 +1097,8 @@ st_scroll_view_init (StScrollView *self)
clutter_actor_add_child (CLUTTER_ACTOR (self), priv->hscroll);
clutter_actor_add_child (CLUTTER_ACTOR (self), priv->vscroll);

g_signal_connect (priv->vadjustment, "notify::value", G_CALLBACK (st_scroll_view_vadjustment_changed), self);

/* mouse scroll is enabled by default, so we also need to be reactive */
priv->mouse_scroll = TRUE;
g_object_set (G_OBJECT (self), "reactive", TRUE, NULL);
Expand Down
Loading