mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
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 #8958)
This commit is contained in:
@@ -1011,6 +1011,9 @@ gui_mch_set_scrollbar_thumb(scrollbar_T *sb, long val, long size, long max)
|
|||||||
{
|
{
|
||||||
GtkAdjustment *adjustment;
|
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));
|
adjustment = gtk_range_get_adjustment(GTK_RANGE(sb->id));
|
||||||
|
|
||||||
gtk_adjustment_set_lower(adjustment, 0.0);
|
gtk_adjustment_set_lower(adjustment, 0.0);
|
||||||
@@ -1023,6 +1026,8 @@ gui_mch_set_scrollbar_thumb(scrollbar_T *sb, long val, long size, long max)
|
|||||||
|
|
||||||
g_signal_handler_block(G_OBJECT(adjustment), (gulong)sb->handler_id);
|
g_signal_handler_block(G_OBJECT(adjustment), (gulong)sb->handler_id);
|
||||||
|
|
||||||
|
--hold_gui_events;
|
||||||
|
|
||||||
#if !GTK_CHECK_VERSION(3,18,0)
|
#if !GTK_CHECK_VERSION(3,18,0)
|
||||||
gtk_adjustment_changed(adjustment);
|
gtk_adjustment_changed(adjustment);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -757,6 +757,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3539,
|
||||||
/**/
|
/**/
|
||||||
3538,
|
3538,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user