Beispiel #1
0
    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()
Beispiel #2
0
 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()
Beispiel #3
0
 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()
Beispiel #4
0
 def unban(self):
     xlib.XMapWindow(samuraix.display, self.window.window)
     xhelpers.set_window_state(self.window.window, xlib.NormalState)
     self.draw()
Beispiel #5
0
 def ban(self):
     xlib.XUnmapWindow(samuraix.display, self.window.window)
     xhelpers.set_window_state(self.window.window, xlib.IconicState)