summaryrefslogtreecommitdiff
path: root/eventMouseMove.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventMouseMove.go')
-rw-r--r--eventMouseMove.go29
1 files changed, 3 insertions, 26 deletions
diff --git a/eventMouseMove.go b/eventMouseMove.go
index ff08b01..01e49f3 100644
--- a/eventMouseMove.go
+++ b/eventMouseMove.go
@@ -93,29 +93,6 @@ func mouseMove(g *gocui.Gui) {
}
}
-func (tk *guiWidget) relocateStdout(w int, h int) {
- me.stdout.lastW = w
- me.stdout.lastH = h
-
- w0 := w
- h0 := h
- w1 := w + me.stdout.w
- h1 := h + me.stdout.h
-
- tk.gocuiSize.w0 = w0
- tk.gocuiSize.w1 = w1
- tk.gocuiSize.h0 = h0
- tk.gocuiSize.h1 = h1
-
- tk.full.w0 = w0
- tk.full.w1 = w1
- tk.full.h0 = h0
- tk.full.h1 = h1
-
- me.baseGui.SetView("msg", w0, h0, w1, h1, 0)
- me.baseGui.SetViewOnBottom("msg")
-}
-
// this is how the window gets dragged around
func (tk *guiWidget) moveNew() {
w, h := me.baseGui.MousePosition()
@@ -131,9 +108,9 @@ func (tk *guiWidget) moveNew() {
tk.dumpWidget(s)
return
} else {
- newW := w - me.stdout.mouseOffsetW
- newH := h - me.stdout.mouseOffsetH
- tk.relocateStdout(newW, newH)
+ me.stdout.lastW = w - me.stdout.mouseOffsetW
+ me.stdout.lastH = h - me.stdout.mouseOffsetH
+ tk.relocateStdout(me.stdout.lastW, me.stdout.lastH)
/*
// log.Info("NOT MOVE FLAG. PASSING MOVE TO MSG", tk.node.WidgetType)
// tk.dumpWidget("moveNew() MSG" + tk.cuiName)