summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2008-03-19 12:58:23 +0100
committerGuillaume Seguin <guillaume@segu.in>2008-03-19 12:58:23 +0100
commit06c7c1ae7685fbda52a10522cf77ed57451ae7c7 (patch)
tree14a6d145acc2c9aa0cdcfd0326cfe4a25fd40a63
parent79bab4aac96fd2cda29ea740645c16fd2a0d840b (diff)
downloadenso_linux-06c7c1ae7685fbda52a10522cf77ed57451ae7c7.tar.gz
enso_linux-06c7c1ae7685fbda52a10522cf77ed57451ae7c7.tar.bz2
* Fall back to root window geometry when _NET_WORKAREA isn't available
-rw-r--r--linux/enso_linux/graphics.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/enso_linux/graphics.py b/linux/enso_linux/graphics.py
index 06f2242..3c948cf 100644
--- a/linux/enso_linux/graphics.py
+++ b/linux/enso_linux/graphics.py
@@ -298,7 +298,9 @@ def getDesktopSize ():
propname, proptype, propvalue = prop
current = propvalue[0]
prop = root.property_get (_NET_WORKAREA)
- if prop is None: return None
+ if prop is None:
+ _, _, width, height, depth = root.get_geometry ()
+ return width, height
propname, proptype, propvalue = prop
_,_, width, height = propvalue[current * 4 : (current + 1) * 4]
return width, height