How to refresh TextView after motion complete?

Sorry for newbie question, but I’ve some problem with EventControllerMotion callback function - cursor icon changed not immediately, with random delay.

Later, added another setter (TextView::set_gutter) and issue with cursor delay was solved. I believe that’s related to the GTK power safe that has dynamical frame control, and for some reasons it does not apply widget update immediately (on TextView::set_cursor_from_name change)

Can I manually call some frame update method (on motion function complete) to apply renderer changes immediately?

Thanks

Don’t understand what exactly this method does from docs, but emit this signal fixes my issue: TextView.emit_toggle_overwrite()

What do you mean by “cursor”?
The mouse pointer, or the keyboard input mark?
How do you expect it to look like?

That switches the keyboard input mode between “insert text” and “replace text”.

1 Like

Thanks for reply, I knew that emit_toggle_overwrite() does a trick just (as includes action that I want)

My problem in update icon on link tag hover when mouse move/leave, it even works but applies after some random delay, and looks like frame stuck. When add any sub-widget like gutter - it resolves the issue, because this action maybe toggle the frame redraw.

Anyway, found and replaced emit_toggle_overwrite with queue_draw seems it’s more relevant to subject and fixed it also:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.