Esempio n. 1
0
 def _manage_client(self, gdkwindow):
     if gdkwindow in self._windows:
         #already managed
         return
     try:
         with xsync:
             log("_manage_client(%s)", gdkwindow)
             desktop_geometry = self.root_get("_NET_DESKTOP_GEOMETRY",
                                              ["u32"], True, False)
             win = WindowModel(self._root, gdkwindow, desktop_geometry)
     except Exception as e:
         if LOG_MANAGE_FAILURES or type(e) not in (Unmanageable, ):
             l = log.warn
         else:
             l = log
         l("Warning: failed to manage client window %#x:", gdkwindow.xid)
         l(" %s", e)
         l("", exc_info=True)
     else:
         win.managed_connect("unmanaged", self._handle_client_unmanaged)
         self._windows[gdkwindow] = win
         self._windows_in_order.append(gdkwindow)
         self.notify("windows")
         self._update_window_list()
         self.emit("new-window", win)
Esempio n. 2
0
 def do_manage_client(self, gdkwindow):
     try:
         win = WindowModel(self._root, gdkwindow)
     except Unmanageable:
         log("Window disappeared on us, never mind")
         return
     win.managed_connect("unmanaged", self._handle_client_unmanaged)
     self._windows[gdkwindow] = win
     self._windows_in_order.append(gdkwindow)
     self.notify("windows")
     self._update_window_list()
     self.emit("new-window", win)
Esempio n. 3
0
 def do_manage_client(self, gdkwindow):
     try:
         win = WindowModel(self._root, gdkwindow)
     except Unmanageable:
         log("Window disappeared on us, never mind")
         return
     win.managed_connect("unmanaged", self._handle_client_unmanaged)
     self._windows[gdkwindow] = win
     self._windows_in_order.append(gdkwindow)
     self.notify("windows")
     self._update_window_list()
     self.emit("new-window", win)
Esempio n. 4
0
 def do_manage_client(self, gdkwindow):
     try:
         desktop_geometry = self.root_get("_NET_DESKTOP_GEOMETRY", ["u32"], True, False)
         win = WindowModel(self._root, gdkwindow, desktop_geometry)
     except Unmanageable:
         log("Window disappeared on us, never mind")
         return
     win.managed_connect("unmanaged", self._handle_client_unmanaged)
     self._windows[gdkwindow] = win
     self._windows_in_order.append(gdkwindow)
     self.notify("windows")
     self._update_window_list()
     self.emit("new-window", win)
Esempio n. 5
0
File: wm.py Progetto: TianyouLi/Xpra
 def do_manage_client(self, gdkwindow):
     try:
         desktop_geometry = self.root_get("_NET_DESKTOP_GEOMETRY", ["u32"], True, False)
         win = WindowModel(self._root, gdkwindow, desktop_geometry)
     except Unmanageable:
         log("Window disappeared on us, never mind")
         return
     win.managed_connect("unmanaged", self._handle_client_unmanaged)
     self._windows[gdkwindow] = win
     self._windows_in_order.append(gdkwindow)
     self.notify("windows")
     self._update_window_list()
     self.emit("new-window", win)