Example #1
0
func (c *Client) DragMoveEnd(rx, ry, ex, ey int) {
	f := c.frame
	frame.Reset(f)

	moving := f.MovingState()
	moving.Moving = false
	moving.RootX, moving.RootY = 0, 0
	c.dragGeom = nil
}
Example #2
0
// set will switch the current frame of the client to the frame provided.
// It is preferrable to use 'Frame[FrameType]' instead.
func (cf clientFrames) set(f frame.Frame) {
	current := cf.client.Frame()
	if current == f {
		return
	}
	cf.client.frame = f
	cf.client.frame.On()
	frame.Reset(cf.client.frame)
}
Example #3
0
func (c *client) dragMoveEnd(rx, ry, ex, ey int) {
	f := c.frame
	frame.Reset(f)
	// WM.headChoose(f.Client(), f.Geom())

	moving := f.MovingState()
	moving.Moving = false
	moving.RootX, moving.RootY = 0, 0
}
Example #4
0
// set will switch the current frame of the client to the frame provided.
// It is preferrable to use 'Frame[FrameType]' instead.
func (cf clientFrames) set(f frame.Frame) {
	current := cf.client.Frame()
	if current == f {
		return
	}
	cf.client.frame.Off()
	cf.client.frame = f
	cf.client.frame.On()
	frame.Reset(cf.client.frame)

	cf.client.refreshExtents()
}
Example #5
0
func (c *Client) DragResizeEnd(rx, ry, ex, ey int) {
	f := c.frame

	// If windows are really slow to respond/resize, this may be necessary.
	// If we don't, it's possible for the client to be out of whack inside
	// the decorations.
	// Example: Libreoffice in Xephyr. Try resizing it with the mouse and
	// releasing the mouse button really quickly.
	frame.Reset(f)

	// just zero out the resizing state
	resizing := f.ResizingState()
	resizing.Resizing = false
	resizing.RootX, resizing.RootY = 0, 0
	resizing.X, resizing.Y = 0, 0
	resizing.Width, resizing.Height = 0, 0
	resizing.Xs, resizing.Ys = false, false
	resizing.Ws, resizing.Hs = false, false
	c.dragGeom = nil
}