double click windows brings to front
This commit is contained in:
parent
9d1a045a1f
commit
7b06b81ed3
|
@ -112,13 +112,15 @@ func (tk *guiWidget) doWidgetClick(w int, h int) {
|
||||||
func doMouseClick(w int, h int) {
|
func doMouseClick(w int, h int) {
|
||||||
dropdownUnclicked(w, h)
|
dropdownUnclicked(w, h)
|
||||||
|
|
||||||
// Flag widgets (dropdown menus, etc) are the highest priority. ALWAYS SEND MOUSE CLICKS THERE FIRST
|
/*
|
||||||
for _, tk := range findByXY(w, h) {
|
// Flag widgets (dropdown menus, etc) are the highest priority. ALWAYS SEND MOUSE CLICKS THERE FIRST
|
||||||
if tk.node.WidgetType == widget.Flag {
|
for _, tk := range findByXY(w, h) {
|
||||||
tk.doWidgetClick(w, h)
|
if tk.node.WidgetType == widget.Flag {
|
||||||
return
|
tk.doWidgetClick(w, h)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
*/
|
||||||
|
|
||||||
// Button widgets
|
// Button widgets
|
||||||
for _, tk := range findByXY(w, h) {
|
for _, tk := range findByXY(w, h) {
|
||||||
|
@ -128,14 +130,20 @@ func doMouseClick(w int, h int) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var found bool
|
||||||
|
|
||||||
for _, tk := range findByXY(w, h) {
|
for _, tk := range findByXY(w, h) {
|
||||||
// will show you everything found on a mouse click. great for debugging!
|
// will show you everything found on a mouse click. great for debugging!
|
||||||
// tk.dumpWidget("click()")
|
// tk.dumpWidget("click()")
|
||||||
if tk.node.WidgetType == widget.Stdout {
|
if tk.node.WidgetType == widget.Stdout {
|
||||||
// don't send clicks to the stdout debugging window
|
// don't send clicks to the stdout debugging window
|
||||||
continue
|
// continue
|
||||||
}
|
}
|
||||||
tk.doWidgetClick(w, h)
|
found = true
|
||||||
|
// tk.doWidgetClick(w, h)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if found {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,6 +157,7 @@ func doMouseDoubleClick(w int, h int) {
|
||||||
|
|
||||||
for _, tk := range findByXY(w, h) {
|
for _, tk := range findByXY(w, h) {
|
||||||
if tk.node.WidgetType == widget.Window {
|
if tk.node.WidgetType == widget.Window {
|
||||||
|
tk.redrawWindow(tk.gocuiSize.w0, tk.gocuiSize.h0)
|
||||||
me.stdout.outputOnTop = false
|
me.stdout.outputOnTop = false
|
||||||
setThingsOnTop()
|
setThingsOnTop()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue