summaryrefslogtreecommitdiff
path: root/window.go
diff options
context:
space:
mode:
authorpapplampe <[email protected]>2014-06-10 14:34:26 +0200
committerpapplampe <[email protected]>2014-06-11 11:41:31 +0200
commit4fa35b22391d56ba22725229f8d99f0061c910d0 (patch)
tree7d35fc8183616b75b65a89b006be043b173b171b /window.go
parent5fa1bd22e2d457523949e0e5e1dece729d053129 (diff)
added Center function to window
Diffstat (limited to 'window.go')
-rw-r--r--window.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/window.go b/window.go
index 02b33e9..f9c9337 100644
--- a/window.go
+++ b/window.go
@@ -120,3 +120,14 @@ func (w *Window) Hide() {
w.sysData.hide()
}
+
+// Centers the window
+func (w *Window) Center() {
+ w.lock.Lock()
+ defer w.lock.Unlock()
+
+ if !w.created {
+ return
+ }
+ w.sysData.center()
+}