GTK+ drawing and primary selection

17 views
Skip to first unread message

Neil Hodgson

unread,
Jul 25, 2017, 11:15:34 PM7/25/17
to Scintilla mailing list
On GTK+, claiming the primary selection leads to unintended drawing effects. These included incorrect drawing of scroll bars and the corner between scrollbars and repainting the whole window repeatedly just to blink the caret. Under some conditions this was visible as flashing or even non-drawn text.

Scintilla has been using the main widget to provide the primary selection but this guide shows another technique.
https://developer.gnome.org/gtk-tutorial/stable/x1873.html
It uses an extra GtkInvisible widget to act as the primary selection supplier. Changing Scintilla over to this technique with the attached patch fixed the drawing problems.

While the patch works for me, there may be mistakes in aspects like widget lifetimes so it would be good to have some more eyes check it. The patch leaves in the old primary selection methods but they are no longer called so could be removed or replaced with stubs.

Neil
GTKSelectionWidget.patch

Neil Hodgson

unread,
Jul 28, 2017, 9:43:52 PM7/28/17
to scintilla...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages