Beispiel #1
0
 def do_size_request(self, req):
     ret = DockWindow.do_size_request(self, req)
     # Give some whitespace
     geom = self.get_screen().get_monitor_geometry(0)
     
     screen = gtk.gdk.screen_get_default()
     rootw = screen.get_root_window()
     prop = rootw.property_get("_NET_WORKAREA")
     logging.debug("got _NET_WORKAREA: %s" % (prop,))
     (_, _, workarea) = prop
     work_height = workarea[3]
     req.height = work_height 
     # Never take more than available size
     req.width = min(geom.width, req.width)
     return ret
Beispiel #2
0
 def __init__(self, is_left):
     gravity = gtk.gdk.GRAVITY_WEST
     if not is_left:
         gravity = gtk.gdk.GRAVITY_EAST
     DockWindow.__init__(self, gravity)
     self.is_left = is_left
 def __init__(self, strut_key):
     DockWindow.__init__(self, gtk.gdk.GRAVITY_WEST)
     self.__watcher = None
     self.__strut_key = strut_key