Exemplo n.º 1
0
func (c *client) CycleSelected() {
	if c.iconified {
		c.workspace.IconifyToggle(c)
	}
	focus.Focus(c)
	stack.Raise(c)
}
Exemplo n.º 2
0
func cmdRaise(args ...string) func() {
	return func() {
		withFocusedOrArg(args, func(c *client) {
			stack.Raise(c)
		})
	}
}
Exemplo n.º 3
0
func (mcmd mouseCommand) commandFun() func(c *client) {
	tryShellFun := commandShellFun(mcmd.cmd)
	if tryShellFun != nil {
		return func(c *client) {
			tryShellFun()
			xevent.ReplayPointer(X)
		}
	}

	switch mcmd.cmd {
	case "FocusRaise":
		return func(c *client) {
			focus.Focus(c)
			stack.Raise(c)
			xevent.ReplayPointer(X)
		}
	case "Focus":
		return func(c *client) {
			focus.Focus(c)
			xevent.ReplayPointer(X)
		}
	case "Raise":
		return func(c *client) {
			stack.Raise(c)
			xevent.ReplayPointer(X)
		}
	case "Close":
		return func(c *client) {
			c.Close()
		}
	case "MaximizeToggle":
		return func(c *client) {
			// c.MaximizeToggle()
		}
	case "Minimize":
		return func(c *client) {
			c.workspace.IconifyToggle(c)
		}
	}

	logger.Warning.Printf("Undefined mouse command: '%s'", mcmd.cmd)

	return nil
}
Exemplo n.º 4
0
func (c *client) manage() {
	c.refreshName()
	logger.Message.Printf("Managing new client: %s", c)

	c.fetchXProperties()
	c.setPrimaryType()
	c.setInitialLayer()

	// Determine whether the client should start iconified or not.
	c.iconified = c.nhints.Flags&icccm.HintState > 0 &&
		c.hints.InitialState == icccm.StateIconic

	// newClientFrames sets c.frame.
	c.frames = c.newClientFrames()
	c.states = c.newClientStates()
	c.prompts = c.newClientPrompts()

	wingo.add(c)
	focus.InitialAdd(c)
	stack.Raise(c)
	wingo.workspace().Add(c)
	c.attachEventCallbacks()
}
Exemplo n.º 5
0
func (c *client) SelectSelected() {
	focus.Focus(c)
	stack.Raise(c)
}
Exemplo n.º 6
0
func (c *Client) Raise() {
	stack.Raise(c)
}