def _manage_client(self, gdkwindow): assert gdkwindow not in self._windows try: win = WindowModel(self._root, gdkwindow) except Unmanageable: log("Window disappeared on us, never mind") return win.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)
def _manage_client(self, gdkwindow): if gdkwindow in self._windows: log.error("window %s is already managed!", gdkwindow) return try: win = WindowModel(self._root, gdkwindow) except Unmanageable: log("Window disappeared on us, never mind") return win.connect("unmanaged", self._handle_client_unmanaged) def bell_event(window_model, event): self.do_bell_event(event) win.connect("bell", bell_event) def geometry_changed(model, *args): log("Wm.geometry_changed(%s, %s) on window %s", model, args, win) self.emit("window-resized", win) win.connect("geometry", geometry_changed) self._windows[gdkwindow] = win self._windows_in_order.append(gdkwindow) self.notify("windows") self._update_window_list() self.emit("new-window", win)
def _manage_client(self, gdkwindow): if gdkwindow in self._windows: log.error("window %s is already managed!", gdkwindow) return try: win = WindowModel(self._root, gdkwindow) except Unmanageable: log("Window disappeared on us, never mind") return win.connect("unmanaged", self._handle_client_unmanaged) def bell_event(window_model, event): self.do_bell_event(event) win.connect("bell", bell_event) #win.connect("bell", self.do_bell_event) self._windows[gdkwindow] = win self._windows_in_order.append(gdkwindow) self.notify("windows") self._update_window_list() self.emit("new-window", win)
def do_manage_client(self, gdkwindow): try: win = WindowModel(self._root, gdkwindow) except Unmanageable: log("Window disappeared on us, never mind") return win.connect("unmanaged", self._handle_client_unmanaged) def bell_event(window_model, event): self.do_bell_event(event) win.connect("bell", bell_event) def geometry_changed(model, *args): log("Wm.geometry_changed(%s, %s) on window %s", model, args, win) self.emit("window-resized", win) win.connect("geometry", geometry_changed) self._windows[gdkwindow] = win self._windows_in_order.append(gdkwindow) self.notify("windows") self._update_window_list() self.emit("new-window", win)