def remove(self): log.debug('removing %s' % self) try: self.all_clients.remove(self) del self.window_2_client_map[self.window] except (ValueError, KeyError): log.warn('remove bug') wc = xlib.XWindowChanges() wc.border_width = self.old_border xlib.XGrabServer(samuraix.display) xlib.XConfigureWindow(samuraix.display, self.window, xlib.CWBorderWidth, byref(wc)) xlib.XUngrabButton(samuraix.display, xlib.AnyButton, xlib.AnyModifier, self.window) xhelpers.set_window_state(self.window, xlib.WithdrawnState) xlib.XSync(samuraix.display, False) xlib.XUngrabServer(samuraix.display) self.dispatch_event('on_removed') for decoration in self.decorations: decoration.remove()
def unban(self): log.debug('unbanning %s' % self) xlib.XMapWindow(samuraix.display, self.window) xhelpers.set_window_state(self.window, xlib.NormalState) for decoration in self.decorations: decoration.unban()
def ban(self): log.debug('banning %s' % self) xlib.XUnmapWindow(samuraix.display, self.window) xhelpers.set_window_state(self.window, xlib.IconicState) for decoration in self.decorations: decoration.ban()
def unban(self): xlib.XMapWindow(samuraix.display, self.window.window) xhelpers.set_window_state(self.window.window, xlib.NormalState) self.draw()
def ban(self): xlib.XUnmapWindow(samuraix.display, self.window.window) xhelpers.set_window_state(self.window.window, xlib.IconicState)