diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-11-06 17:54:05 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-11-06 17:54:05 +0100 |
commit | 07f9fab401f34753d0619ebb8d65f6f9df97931d (patch) | |
tree | 11533f3d2b844696f8df1dcc3d48b1e477f89cfe /src/core.py | |
parent | 700a59df5c2fb953b6e28dff2485b5952dcb3515 (diff) | |
parent | 7d861ee88514b38081f748a2b9f844eb56c6c349 (diff) | |
download | poezio-07f9fab401f34753d0619ebb8d65f6f9df97931d.tar.gz poezio-07f9fab401f34753d0619ebb8d65f6f9df97931d.tar.bz2 poezio-07f9fab401f34753d0619ebb8d65f6f9df97931d.tar.xz poezio-07f9fab401f34753d0619ebb8d65f6f9df97931d.zip |
Merge branch 'master' into plugins
Conflicts:
src/core.py
Diffstat (limited to 'src/core.py')
-rw-r--r-- | src/core.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core.py b/src/core.py index 1f21e36d..d9d0b00e 100644 --- a/src/core.py +++ b/src/core.py @@ -50,6 +50,7 @@ from text_buffer import TextBuffer from keyboard import read_char from theming import get_theme from fifo import Fifo +from windows import g_lock # http://xmpp.org/extensions/xep-0045.html#errorstatus ERROR_AND_STATUS_CODES = { @@ -72,8 +73,6 @@ possible_show = {'available':None, 'xa':'xa' } -resize_lock = threading.Lock() - Status = collections.namedtuple('Status', 'show message') class Core(object): @@ -269,15 +268,16 @@ class Core(object): """ Resize the global_information_win only once at each resize. """ - self.information_win.resize(self.information_win_size, tabs.Tab.width, - tabs.Tab.height - 2 - self.information_win_size, 0) - + with g_lock: + self.information_win.resize(self.information_win_size, tabs.Tab.width, + tabs.Tab.height - 2 - self.information_win_size, 0) def resize_global_info_bar(self): """ Resize the GlobalInfoBar only once at each resize """ - self.tab_win.resize(1, tabs.Tab.width, tabs.Tab.height - 2, 0) + with g_lock: + self.tab_win.resize(1, tabs.Tab.width, tabs.Tab.height - 2, 0) def on_exception(self, typ, value, trace): """ @@ -764,7 +764,7 @@ class Core(object): tabs.Tab.resize(self.stdscr) self.resize_global_information_win() self.resize_global_info_bar() - with resize_lock: + with g_lock: for tab in self.tabs: if config.get('lazy_resize', 'true') == 'true': tab.need_resize = True |