Dont call glfw functions from the child thread

This commit is contained in:
Kovid Goyal
2016-12-02 15:46:21 +05:30
parent 92401ee4b1
commit c9af8bc0bc
3 changed files with 25 additions and 19 deletions

View File

@@ -6,7 +6,7 @@ import os
import threading
import pwd
import ctypes
from collections import namedtuple
from collections import namedtuple, defaultdict
from .fast_data_types import (
GLFW_KEY_LEFT_SHIFT, GLFW_KEY_RIGHT_SHIFT, GLFW_KEY_LEFT_ALT,
@@ -65,6 +65,7 @@ def queue_action(func, *args):
tab_manager.manager.queue_action(func, *args)
is_key_pressed = defaultdict(lambda: False)
viewport_size = ViewportSize()
cell_size = ViewportSize()
terminfo_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'terminfo')