aboutsummaryrefslogtreecommitdiffstats
path: root/src/__main__.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-01-13 02:36:17 +0100
committerMattias Andrée <maandree@kth.se>2017-01-13 02:36:17 +0100
commitab00f753770c993ae8eb20f0a03e88451d97be15 (patch)
tree385e52582f79651feec9e06240b331b55950a9e2 /src/__main__.py
parentupdate url for leapsec (diff)
downloadxpybar-ab00f753770c993ae8eb20f0a03e88451d97be15.tar.gz
xpybar-ab00f753770c993ae8eb20f0a03e88451d97be15.tar.bz2
xpybar-ab00f753770c993ae8eb20f0a03e88451d97be15.tar.xz
Work around bug in python-xlib, so new version of it can be used now that old versions cannot1.18.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rwxr-xr-xsrc/__main__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/__main__.py b/src/__main__.py
index 6a296ec..7958804 100755
--- a/src/__main__.py
+++ b/src/__main__.py
@@ -154,7 +154,7 @@ class Bar:
@param text:str The text
@return :int The width of the text
'''
- return self.font.query_text_extents(text).overall_width
+ return self.font.query_text_extents(text.encode('utf8')).overall_width
def draw_text(self, x, y, descent, text, *, colour = None, clear = None):
'''