Example #1
0
    def map(self):
        if self.mapped:
            return

        icccm.set_wm_state(state.conn, self.win.id, icccm.State.Normal, 0)

        if self.is_focusable():
            focus.add(self)

        layers.default.add(self)
        self.stack_raise()

        self.iconified = False

        self.workspace.assign_layout(self)

        # START GRAB
        state.grab()
        self.win.map()
        self.frame.map()
        self.focus()
        state.ungrab()
        # END GRAB

        self.initial_map = True
        self.mapped = True
        self.update_struts()
Example #2
0
    def unmapped(self, light=False):
        icccm.set_wm_state(state.conn, self.win.id, icccm.State.Iconic, 0)

        self.mapped = False
        self.update_struts()

        state.conn.flush()
Example #3
0
    def unmapped(self, light=False):
        icccm.set_wm_state(state.conn, self.win.id, icccm.State.Iconic, 0)
        fallback = focus.focused() is self
        self.frame.unmap()

        self.mapped = False
        self.update_struts()

        if not light:
            if fallback:
                focus.fallback()
            self.workspace.hide_client(self)

        state.conn.flush()
Example #4
0
    def unmanage(self):
        if self.mapped:
            self.unmapped()

        # No more..!
        if self.workspace is not None:
            self.workspace.remove(self)
        focus.remove(self)
        self.layer.remove(self)
        self.unlisten()
        self.stop_timeout()
        icccm.set_wm_state(state.conn, self.win.id, icccm.State.Withdrawn, 0)
        events.unregister_window(self.win.id)
        del state.windows[self.win.id]
Example #5
0
    def maplight(self):
        assert self.initial_map, 'a full map must be issued before maplight'

        if self.mapped or self.iconified:
            return

        icccm.set_wm_state(state.conn, self.win.id, icccm.State.Normal, 0)

        # START GRAB
        state.grab()
        self.win.map()
        self.frame.map()
        state.ungrab()
        # END GRAB

        self.mapped = True
        self.update_struts()
Example #6
0
    def maplight(self):
        """
        Mapping a docked client is similar to mapping a normal client, except
        it is not included in the focus stack. Also, it is added to the "dock"
        layer, where it will typically reside above most other clients.
        """
        if self.mapped:
            return

        icccm.set_wm_state(state.conn, self.win.id, icccm.State.Normal, 0)

        # START GRAB
        state.grab()
        self.win.map()
        state.ungrab()
        # END GRAB

        self.initial_map = True
        self.mapped = True

        self.update_struts()
Example #7
0
 def map(self):
     icccm.set_wm_state(self.win, icccm.State.Normal, 0)
     self.conn.core.MapWindow(self.win)
Example #8
0
 def map(self):
     icccm.set_wm_state(self.win, icccm.State.Normal, 0)
     self.conn.core.MapWindow(self.win)