Search code examples
xlib

xlib how to show a blinking cursor for an input box


I'm trying to implement an input box with xlib, but i cannot find any ifnormation on how to show the blinking cursor.

Like the following: enter image description here

How can it be done?


Solution

  • xlib has no built-in notions of animation or blinking. You have to run a timer and draw and erase the cursor periodically.