makefile
This commit is contained in:
@ -116,12 +116,19 @@ func setupLayers(mainwindow *mainwindow.MainWindow) {
|
||||
|
||||
func decodeInput(ctx util.ClientCtx, baseLayer *mainwindow.Layer) {
|
||||
var exit = false
|
||||
var waitForWCspam = true
|
||||
for !exit{
|
||||
select {
|
||||
case keycode := <-State.rawInput:
|
||||
if keycode == blt.TK_NONE {
|
||||
continue
|
||||
}
|
||||
if keycode == blt.TK_CLOSE && !waitForWCspam {
|
||||
ctx.Logger().Warn().Msg("exiting on window close...")
|
||||
State.exit <- struct{}{}
|
||||
ctx.Logger().Warn().Msg("...done")
|
||||
return
|
||||
}
|
||||
var pressed= ""
|
||||
var isModifier, _= util.InArray(keycode, modifiers)
|
||||
if !isModifier {
|
||||
@ -153,6 +160,7 @@ func decodeInput(ctx util.ClientCtx, baseLayer *mainwindow.Layer) {
|
||||
exit = true
|
||||
return
|
||||
default:
|
||||
waitForWCspam = false;
|
||||
State.input <- pressed
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user