Update window.go
This commit is contained in:
parent
0f9c27c19a
commit
9dc929f545
10
window.go
10
window.go
@ -267,10 +267,10 @@ func (window *window) Paste (callback func (data.Data, error), accept ...data.Mi
|
||||
}
|
||||
|
||||
func (window *window) SetVisible (visible bool) {
|
||||
if this.visible == visible { return }
|
||||
if window.visible == visible { return }
|
||||
window.visible = visible
|
||||
|
||||
if this.visible {
|
||||
if window.visible {
|
||||
window.xWindow.Map()
|
||||
if window.shy { window.grabInput() }
|
||||
} else {
|
||||
@ -280,7 +280,7 @@ func (window *window) SetVisible (visible bool) {
|
||||
}
|
||||
|
||||
func (window *window) Visible () bool {
|
||||
return this.visible
|
||||
return window.visible
|
||||
}
|
||||
|
||||
func (window *window) Close () {
|
||||
@ -293,7 +293,7 @@ func (window *window) Close () {
|
||||
// we are a modal dialog, so unlock the parent
|
||||
window.modalParent.hasModal = false
|
||||
}
|
||||
window.Hide()
|
||||
window.SetVisible(false)
|
||||
window.SetRoot(nil)
|
||||
delete(window.backend.windows, window.xWindow.Id)
|
||||
window.xWindow.Destroy()
|
||||
@ -377,7 +377,7 @@ func (window *window) pushRegion (region image.Rectangle) {
|
||||
return
|
||||
}
|
||||
|
||||
subCanvas := window.xCanvas.Clip(region)
|
||||
subCanvas := window.xCanvas.SubCanvas(region)
|
||||
if subCanvas == nil {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user