Changed conditions for allowing focus windows

This commit is contained in:
bluesaxman 2022-12-20 11:57:25 -07:00
parent c6314709ef
commit 1126392c15

View File

@ -118,7 +118,6 @@ class buiWindow {
draggable = "boolean" == typeof draggable ? draggable : true;
if (draggable) {
makeDraggable(this.root, this.titlebar);
this.root.addEventListener("click", this.focus, {useCapture: true});
}
min = "boolean" == typeof min ? min : false;
close = "boolean" == typeof close ? close : false;
@ -151,6 +150,9 @@ class buiWindow {
}
this.root.appendChild(this.titlebar);
this.root.appendChild(this.main);
if (draggable || min || close) {
this.root.addEventListener("click", this.focus, {useCapture: true});
}
}
focus () { focus_window(this); }