Permalink
Browse files

Fix multi-monitor issue

Change-Id: I660267e9a00634bc9ed61fd22c7925d7643dd8fe
  • Loading branch information...
tomasz-wiszkowski committed Jan 14, 2013
1 parent 241c899 commit 506d34dc416475cb3550e82a06c46f3526c612d7
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/elements/xfcon_window.py
@@ -119,11 +119,11 @@ def __apply_config(self):
def __config_set_window_size(self, *ignore):
rect = self.__calculate_window_size()
- self.move(rect.x, rect.y)
self.set_geometry_hints(self,
min_width = rect.width, min_height = rect.height,
max_width = rect.width, max_height = rect.height,
base_width = rect.width, base_height = rect.height)
+ self.move(rect.x, rect.y)
def __on_tab_add(self, *ignore):
return self.__do_create_default_view()
@@ -194,7 +194,7 @@ def __calculate_window_size(self):
rect = screen.get_monitor_geometry(screen.get_primary_monitor())
rect.height = rect.height * height / 100
width = rect.width * width / 100
- rect.x = (rect.width - width) / 2
+ rect.x = rect.x + (rect.width - width) / 2
rect.width = width
return rect
@@ -257,8 +257,8 @@ def show(self):
# to respect panels position once shown. we don't want this, although it would
# be nice to expose panels later
# http://stackoverflow.com/questions/502282
- self.__config_set_window_size()
self.show_all()
+ self.__config_set_window_size()
self.restore_focus()
def hide(self):

0 comments on commit 506d34d

Please sign in to comment.