Remove unused code

This commit is contained in:
Kovid Goyal 2017-09-15 18:10:17 +05:30
parent b2c7272af1
commit ddbe0703a3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 7 deletions

View File

@ -7,7 +7,7 @@ from weakref import WeakValueDictionary
from .config import MINIMUM_FONT_SIZE
from .constants import (
MODIFIER_KEYS, cell_size, is_key_pressed, set_boss, viewport_size, wakeup
MODIFIER_KEYS, cell_size, set_boss, viewport_size, wakeup
)
from .fast_data_types import (
GLFW_KEY_DOWN, GLFW_KEY_UP, GLFW_PRESS, GLFW_REPEAT, ChildMonitor,
@ -21,7 +21,9 @@ from .keys import (
)
from .session import create_session
from .tabs import SpecialWindow, TabManager
from .utils import get_primary_selection, safe_print, set_primary_selection, open_url
from .utils import (
get_primary_selection, open_url, safe_print, set_primary_selection
)
from .window import load_shader_programs
@ -181,7 +183,6 @@ class Boss:
w.write_to_child(data)
def on_key(self, window, key, scancode, action, mods):
is_key_pressed[key] = action == GLFW_PRESS
func = None
if action == GLFW_PRESS or action == GLFW_REPEAT:
func = get_shortcut(self.opts.keymap, mods, key, scancode)

View File

@ -6,7 +6,7 @@ import os
import pwd
import ctypes
import sys
from collections import namedtuple, defaultdict
from collections import namedtuple
from .fast_data_types import (
GLFW_KEY_LEFT_SHIFT, GLFW_KEY_RIGHT_SHIFT, GLFW_KEY_LEFT_ALT,
@ -64,9 +64,6 @@ def wakeup():
get_boss.boss.child_monitor.wakeup()
is_key_pressed = defaultdict(lambda: False)
mouse_button_pressed = defaultdict(lambda: False)
mouse_cursor_pos = [0, 0]
viewport_size = ViewportSize()
cell_size = ViewportSize()
base_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))