diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-08-01 16:00:01 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-08-01 16:00:01 +0200 |
commit | 271fd662a18d0a289fa73c1f42885a451accb1b8 (patch) | |
tree | 269f43afb5f345a4cb0bc290366aa96c17cbae45 /src/size_manager.py | |
parent | ba93f3f236e68b14d84c9bc621c638c4f79207f9 (diff) | |
download | poezio-271fd662a18d0a289fa73c1f42885a451accb1b8.tar.gz poezio-271fd662a18d0a289fa73c1f42885a451accb1b8.tar.bz2 poezio-271fd662a18d0a289fa73c1f42885a451accb1b8.tar.xz poezio-271fd662a18d0a289fa73c1f42885a451accb1b8.zip |
Entirely remove the g_lock (used to avoid a few race conditions with ncures)
Diffstat (limited to 'src/size_manager.py')
-rw-r--r-- | src/size_manager.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/size_manager.py b/src/size_manager.py index 7e01d5d0..1cad83fd 100644 --- a/src/size_manager.py +++ b/src/size_manager.py @@ -3,8 +3,6 @@ Size Manager: used to check size boundaries of the whole window and specific tabs """ -from windows import g_lock - THRESHOLD_WIDTH_DEGRADE = 45 THRESHOLD_HEIGHT_DEGRADE = 10 @@ -27,26 +25,22 @@ class SizeManager(object): @property def tab_degrade_x(self): - with g_lock: - _, x = self.tab_scr.getmaxyx() + _, x = self.tab_scr.getmaxyx() return x < THRESHOLD_WIDTH_DEGRADE @property def tab_degrade_y(self): - with g_lock: - y, x = self.tab_scr.getmaxyx() + y, x = self.tab_scr.getmaxyx() return y < THRESHOLD_HEIGHT_DEGRADE @property def core_degrade_x(self): - with g_lock: - y, x = self.core_scr.getmaxyx() + y, x = self.core_scr.getmaxyx() return x < FULL_WIDTH_DEGRADE @property def core_degrade_y(self): - with g_lock: - y, x = self.core_scr.getmaxyx() + y, x = self.core_scr.getmaxyx() return y < FULL_HEIGHT_DEGRADE |