示例#1
0
文件: client.py 项目: sahwar/pyndow
    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()
示例#2
0
文件: client.py 项目: sahwar/pyndow
    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()
示例#3
0
文件: client.py 项目: sahwar/pyndow
    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()
示例#4
0
文件: client.py 项目: sahwar/pyndow
    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]
示例#5
0
文件: client.py 项目: sahwar/pyndow
    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()
示例#6
0
文件: client.py 项目: sahwar/pyndow
    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()
示例#7
0
 def map(self):
     icccm.set_wm_state(self.win, icccm.State.Normal, 0)
     self.conn.core.MapWindow(self.win)
示例#8
0
 def map(self):
     icccm.set_wm_state(self.win, icccm.State.Normal, 0)
     self.conn.core.MapWindow(self.win)