GNOME Bugzilla – Bug 765358
map: avoid handling GtkAdjustment signals when hidden
Last modified: 2016-04-21 22:08:14 UTC
This improves performance of cursor movements in test-widget when the GtkSourceMap is hidden. This is not an entirely uncommon design, as both Gedit and Builder simply hide the widget when it is not in use. Another thing to look at longer term would be to delay those updates until the ::update() phase of the frame clock.
Created attachment 326468 [details] [review] map: avoid handling GtkAdjustment signals when hidden It is often the case that a GtkSourceMap will be packed into the widget hierarchy, but not visible unless the user has enabled the feature. This means that we receive a lot of signal notifications when we can't do anything about it. So instead, toggle the signal activity based on whether or not we are visible.
Review of attachment 326468 [details] [review]: sure, you are the sourcemap boss :)
Attachment 326468 [details] pushed as ef176f1 - map: avoid handling GtkAdjustment signals when hidden