changeset 26010:2fafae9c79e8 v8.2.3539

patch 8.2.3539: GTK3: with 'rightleft' set scrollbar may move unintentionally Commit: https://github.com/vim/vim/commit/604e207e277767a67cbf4a6a179080efb830b9e7 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 19 14:22:03 2021 +0100 patch 8.2.3539: GTK3: with 'rightleft' set scrollbar may move unintentionally Problem: GTK3: with 'rightleft' set scrollbar may move unintentionally. Solution: Ignore events while moving the scrollbar thumb. (closes https://github.com/vim/vim/issues/8958)
author Bram Moolenaar <Bram@vim.org>
date Tue, 19 Oct 2021 15:30:05 +0200
parents 990958e8c3a2
children 7278258f5f83
files src/gui_gtk.c src/version.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gui_gtk.c
+++ b/src/gui_gtk.c
@@ -1011,6 +1011,9 @@ gui_mch_set_scrollbar_thumb(scrollbar_T 
     {
 	GtkAdjustment *adjustment;
 
+	// ignore events triggered by moving the thumb (happens in GTK 3)
+	++hold_gui_events;
+
 	adjustment = gtk_range_get_adjustment(GTK_RANGE(sb->id));
 
 	gtk_adjustment_set_lower(adjustment, 0.0);
@@ -1023,6 +1026,8 @@ gui_mch_set_scrollbar_thumb(scrollbar_T 
 
 	g_signal_handler_block(G_OBJECT(adjustment), (gulong)sb->handler_id);
 
+	--hold_gui_events;
+
 #if !GTK_CHECK_VERSION(3,18,0)
 	gtk_adjustment_changed(adjustment);
 #endif
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    3539,
+/**/
     3538,
 /**/
     3537,