More robust blink control based on window focus state

This commit is contained in:
Kovid Goyal
2017-01-14 18:01:14 +05:30
parent 8300fb31e5
commit 217cc2f40e
2 changed files with 2 additions and 9 deletions
+1 -4
View File
@@ -481,8 +481,5 @@ class CharGrid:
glUniform4f(ul('color'), col[0], col[1], col[2], alpha)
glUniform2f(ul('xpos'), left, right)
glUniform2f(ul('ypos'), top, bottom)
if is_focused:
glDrawArrays(GL_TRIANGLE_FAN, 0, 4)
else:
glDrawArrays(GL_LINE_LOOP, 0, 4)
glDrawArrays(GL_TRIANGLE_FAN if is_focused else GL_LINE_LOOP, 0, 4)
glDisable(GL_BLEND)