diff options
| author | Lenni <[email protected]> | 2021-03-03 19:05:58 +0100 |
|---|---|---|
| committer | Lenni <[email protected]> | 2021-03-03 19:05:58 +0100 |
| commit | 2825966d27b67b6b0227bcbfcd81f3c995c0f472 (patch) | |
| tree | c121bfa62d3c57bb4f7a0b6adb009c79d938a075 /examples/create-window/main.go | |
| parent | 4c1bf8cd8d4f0f96428a90f3117896c7f1564cdf (diff) | |
formatting
Diffstat (limited to 'examples/create-window/main.go')
| -rw-r--r-- | examples/create-window/main.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/create-window/main.go b/examples/create-window/main.go index 76df734..d4f6d96 100644 --- a/examples/create-window/main.go +++ b/examples/create-window/main.go @@ -49,7 +49,8 @@ func main() { 0xffffffff, xproto.EventMaskStructureNotify | xproto.EventMaskKeyPress | - xproto.EventMaskKeyRelease}) + xproto.EventMaskKeyRelease, + }) // MapWindow makes the window we've created appear on the screen. // We demonstrated the use of a 'checked' request here. @@ -96,14 +97,14 @@ func main() { fmt.Println("Both event and error are nil. Exiting...") return } - + if ev != nil { fmt.Printf("Event: %s\n", ev) } if xerr != nil { fmt.Printf("Error: %s\n", xerr) } - + // This is how accepting events work: // The application checks what event we got // (the event must be registered using either xproto.CreateWindow (see l.35) or @@ -115,8 +116,8 @@ func main() { // for documentation about a key press event. kpe := ev.(xproto.KeyPressEvent) fmt.Printf("Key pressed: %d", kpe.Detail) - // The Detail value depends on the keyboard layout, - // for QWERTY, q is #24. + // The Detail value depends on the keyboard layout, + // for QWERTY, q is #24. if kpe.Detail == 24 { return // exit on q } |
