コード例 #1
0
ファイル: drag.go プロジェクト: pascience/foci
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
}
コード例 #2
0
ファイル: frame.go プロジェクト: pascience/foci
// 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()
}
コード例 #3
0
ファイル: drag.go プロジェクト: pascience/foci
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
}