fix funcpunc problem

master
Stefan Dorn 2016-08-09 00:57:15 +01:00
parent 9fc027ebbe
commit 20343f60b9
1 changed files with 8 additions and 9 deletions

View File

@ -212,21 +212,20 @@ void layer_disable(layer l) {
layers_active[l] -= 1;
}
if (l == layers_top) {
layers_top = highest_active_layer();
}
// re-press affected keys
for (u8 row=0; row<KB_ROWS; row++) {
for (u8 col=0; col<KB_COLUMNS; col++) {
if (layers_pressed[row][col] == l) {
// re-press affected keys
keycode key = kb_keycode(l, row, col);
debug_printf("re: %d on l: %d at: %d x %d\n",
key, l,
row, col);
exec_key(l, row, col, false);
layers_pressed[row][col] = layers_top;
exec_key(layers_top, row, col, true);
}
}
}
if (l == layers_top) {
layers_top = highest_active_layer();
}
}
// ----------------------------------------------------------------------------