Mercurial > vim
comparison src/gui_gtk_x11.c @ 9489:c5f40fc2e3e0 v7.4.2025
commit https://github.com/vim/vim/commit/da3a77d9ec28407b8fa2aa014e76944d0a525662
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 10 23:16:09 2016 +0200
patch 7.4.2025
Problem: The cursor blinking stops or is irregular when receiving date over
a channel and writing it in a buffer, and when updating the status
line. (Ramel Eshed)
Solution: Make it a bit better by flushing GUI output. Don't redraw the
cursor after updating the screen if the blink state is off.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 10 Jul 2016 23:30:05 +0200 |
parents | 0c7f47088e55 |
children | 9d1abad90d6c |
comparison
equal
deleted
inserted
replaced
9488:dde9090b258a | 9489:c5f40fc2e3e0 |
---|---|
865 gtk_timeout_remove(blink_timer); | 865 gtk_timeout_remove(blink_timer); |
866 #endif | 866 #endif |
867 blink_timer = 0; | 867 blink_timer = 0; |
868 } | 868 } |
869 if (blink_state == BLINK_OFF) | 869 if (blink_state == BLINK_OFF) |
870 { | |
870 gui_update_cursor(TRUE, FALSE); | 871 gui_update_cursor(TRUE, FALSE); |
872 gui_mch_flush(); | |
873 } | |
871 blink_state = BLINK_NONE; | 874 blink_state = BLINK_NONE; |
872 } | 875 } |
873 | 876 |
874 #if GTK_CHECK_VERSION(3,0,0) | 877 #if GTK_CHECK_VERSION(3,0,0) |
875 static gboolean | 878 static gboolean |
900 #else | 903 #else |
901 blink_timer = gtk_timeout_add((guint32)blink_ontime, | 904 blink_timer = gtk_timeout_add((guint32)blink_ontime, |
902 (GtkFunction) blink_cb, NULL); | 905 (GtkFunction) blink_cb, NULL); |
903 #endif | 906 #endif |
904 } | 907 } |
908 gui_mch_flush(); | |
905 | 909 |
906 return FALSE; /* don't happen again */ | 910 return FALSE; /* don't happen again */ |
907 } | 911 } |
908 | 912 |
909 /* | 913 /* |
932 blink_timer = gtk_timeout_add((guint32)blink_waittime, | 936 blink_timer = gtk_timeout_add((guint32)blink_waittime, |
933 (GtkFunction) blink_cb, NULL); | 937 (GtkFunction) blink_cb, NULL); |
934 #endif | 938 #endif |
935 blink_state = BLINK_ON; | 939 blink_state = BLINK_ON; |
936 gui_update_cursor(TRUE, FALSE); | 940 gui_update_cursor(TRUE, FALSE); |
941 gui_mch_flush(); | |
937 } | 942 } |
938 } | 943 } |
939 | 944 |
940 static gint | 945 static gint |
941 enter_notify_event(GtkWidget *widget UNUSED, | 946 enter_notify_event(GtkWidget *widget UNUSED, |