clock_info: call focus() after redraw

pull/3234/head
Rob Pilling 2024-03-11 08:57:36 +00:00
parent 2c92c94574
commit 33088c6257
1 changed files with 5 additions and 1 deletions

View File

@ -292,13 +292,17 @@ exports.addInteractive = function(menu, options) {
if (itm.blur) itm.blur(options);
};
const focus = (redraw) => {
let shown = false;
if (!options.focus) {
options.focus=true;
Bangle.CLKINFO_FOCUS=true;
shown = true;
}
if (redraw) options.redraw();
if (shown) {
const itm = menu[options.menuA].items[options.menuB];
if (itm.focus) itm.focus(options);
}
if (redraw) options.redraw();
};
let touchHandler, lockHandler;
if (options.x!==undefined && options.y!==undefined && options.w && options.h) {