summaryrefslogtreecommitdiff
path: root/kvmd
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-07-29 00:09:06 +0300
committerDevaev Maxim <[email protected]>2018-07-29 00:09:06 +0300
commit0c8f8bc131ad2a295bc91544f3b12fe1d98358bc (patch)
treeb4c71c2a5e4de745a8f740b7475d2a3ae4a21f10 /kvmd
parent399ba3836b8a13afce8bfaab7079b6f244e867bd (diff)
focus fixes
Diffstat (limited to 'kvmd')
-rw-r--r--kvmd/web/js/ui.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/kvmd/web/js/ui.js b/kvmd/web/js/ui.js
index e4d3228f..d3bf6b14 100644
--- a/kvmd/web/js/ui.js
+++ b/kvmd/web/js/ui.js
@@ -22,6 +22,7 @@ var ui = new function() {
if (el_button) {
el_button.onclick = function() {
el_window.style.display = "none";
+ __raiseLastWindow();
};
}
});
@@ -49,10 +50,12 @@ var ui = new function() {
);
}
- window.onclick = __globalClickHandler;
window.onpagehide = hid.releaseAll;
window.onblur = hid.releaseAll;
+ window.onmouseup = __globalMouseButtonHandler;
+ // window.oncontextmenu = __globalMouseButtonHandler;
+
__raiseWindow($("stream-window"));
};
@@ -110,7 +113,7 @@ var ui = new function() {
}
};
- var __globalClickHandler = function(event) {
+ var __globalMouseButtonHandler = function(event) {
hid.updateLeds();
if (!event.target.matches(".ctl-item")) {
for (el_item = event.target; el_item && el_item !== document; el_item = el_item.parentNode) {