summaryrefslogtreecommitdiff
path: root/eventMouseMove.go
diff options
context:
space:
mode:
Diffstat (limited to 'eventMouseMove.go')
-rw-r--r--eventMouseMove.go41
1 files changed, 15 insertions, 26 deletions
diff --git a/eventMouseMove.go b/eventMouseMove.go
index 01e49f3..5fe98d3 100644
--- a/eventMouseMove.go
+++ b/eventMouseMove.go
@@ -108,32 +108,21 @@ func (tk *guiWidget) moveNew() {
tk.dumpWidget(s)
return
} else {
- 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)
- w0 := w - me.stdout.offsetW
- h0 := h - me.stdout.offsetH
- w1 := w - me.stdout.offsetW + me.stdout.w
- h1 := h - me.stdout.offsetH + me.stdout.h
- me.baseGui.SetView("msg", w0, h0, w1, h1, 0)
-
- // me.startOutputW = w - me.stdout.offsetW
- // me.startOutputH = h - me.stdout.offsetH
- me.baseGui.SetViewOnBottom("msg")
-
- 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
- */
+ if me.stdout.resize {
+ newW := w - me.stdout.lastW
+ newH := h - me.stdout.lastH
+ me.stdout.w = newW
+ me.stdout.h = newH
+ log.Info("Resize true", w, h, newW, newH)
+ // me.stdout.lastW = w - me.stdout.mouseOffsetW
+ // me.stdout.lastH = h - me.stdout.mouseOffsetH
+ tk.relocateStdout(me.stdout.lastW, me.stdout.lastH)
+ } else {
+ // log.Info("Resize false", w, h)
+ me.stdout.lastW = w - me.stdout.mouseOffsetW
+ me.stdout.lastH = h - me.stdout.mouseOffsetH
+ tk.relocateStdout(me.stdout.lastW, me.stdout.lastH)
+ }
}
// always place the help menu on top
setThingsOnTop() // sets help, Stdout, etc on the top after windows have been redrawn