mirror of
https://github.com/tsoding/boomer
synced 2024-11-14 18:12:47 +00:00
(#26) Add a flag to enable windowed support back
This commit is contained in:
parent
098203fe4b
commit
9ce54edb9c
@ -39,10 +39,16 @@ See issue [#26]. For an experimental Live Update feature compile the application
|
|||||||
$ nimble build -d:live
|
$ nimble build -d:live
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Live update feature makes more sense right now in the windowed mode to enabled windowed mode use the following flags:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ nimble build -d:live -d:windowed
|
||||||
|
```
|
||||||
|
|
||||||
For a faster Live Update feature based on MIT-SHM X11 extension use `-d:mitshm`:
|
For a faster Live Update feature based on MIT-SHM X11 extension use `-d:mitshm`:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ nimble build -d:live -d:mitshm
|
$ nimble build -d:live -d:windowed -d:mitshm
|
||||||
```
|
```
|
||||||
|
|
||||||
The MIT-SHM support would probably not work for you until
|
The MIT-SHM support would probably not work for you until
|
||||||
|
@ -182,6 +182,7 @@ proc main() =
|
|||||||
swa.event_mask = ButtonPressMask or ButtonReleaseMask or
|
swa.event_mask = ButtonPressMask or ButtonReleaseMask or
|
||||||
KeyPressMask or KeyReleaseMask or
|
KeyPressMask or KeyReleaseMask or
|
||||||
PointerMotionMask or ExposureMask or ClientMessage
|
PointerMotionMask or ExposureMask or ClientMessage
|
||||||
|
when not defined(windowed):
|
||||||
swa.override_redirect = 1
|
swa.override_redirect = 1
|
||||||
swa.save_under = 1
|
swa.save_under = 1
|
||||||
|
|
||||||
@ -303,6 +304,7 @@ proc main() =
|
|||||||
let dt = 1.0 / rate.float
|
let dt = 1.0 / rate.float
|
||||||
while not quitting:
|
while not quitting:
|
||||||
# TODO(#78): Is there a better solution to keep the focus always on the window?
|
# TODO(#78): Is there a better solution to keep the focus always on the window?
|
||||||
|
when not defined(windowed):
|
||||||
discard XSetInputFocus(display, win, RevertToParent, CurrentTime);
|
discard XSetInputFocus(display, win, RevertToParent, CurrentTime);
|
||||||
|
|
||||||
var wa: TXWindowAttributes
|
var wa: TXWindowAttributes
|
||||||
|
Loading…
Reference in New Issue
Block a user