summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-06-11 09:51:00 -0400
committerPietro Gagliardi <[email protected]>2014-06-11 09:51:00 -0400
commit0e620c4d34193089e5529623ad1655744a5e0b89 (patch)
tree68d3d6fee8cebfd955a1be623a20fe25cffaee1c
parent2407a415b955b514f086d5441e11c41b6dd41e1d (diff)
Fixed window.go from the previous commit to improve documentation and change function behavior.
-rw-r--r--window.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/window.go b/window.go
index f9c9337..99d300c 100644
--- a/window.go
+++ b/window.go
@@ -121,13 +121,15 @@ func (w *Window) Hide() {
w.sysData.hide()
}
-// Centers the window
+// Center centers the Window on-screen.
+// The concept of "screen" in the case of a multi-monitor setup is implementation-defined.
+// It presently panics if the Window has not been created.
func (w *Window) Center() {
w.lock.Lock()
defer w.lock.Unlock()
if !w.created {
- return
+ panic("attempt to center Window before it has been created")
}
w.sysData.center()
}