summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2018-08-24 08:23:46 +0300
committerDevaev Maxim <[email protected]>2018-08-24 08:23:46 +0300
commit1c3c1baf9a8962239917bfb6bfe2b66fce94ac3c (patch)
tree4ce2679eb7c6a1c55676087eef6993a8859d8f4d
parent52d2b8a3158f6bf8651c07b11a056ecf17f9e49c (diff)
don't loose focus on stream resizing
-rw-r--r--kvmd/web/js/stream.js2
-rw-r--r--kvmd/web/js/ui.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/kvmd/web/js/stream.js b/kvmd/web/js/stream.js
index 7eb09ee0..baee87c1 100644
--- a/kvmd/web/js/stream.js
+++ b/kvmd/web/js/stream.js
@@ -91,7 +91,7 @@ function Stream(ui) {
var el_stream_image = $("stream-image");
el_stream_image.style.width = __normal_size.width * __size_factor + "px";
el_stream_image.style.height = __normal_size.height * __size_factor + "px";
- ui.showWindow($("stream-window"));
+ ui.showWindow($("stream-window"), false);
};
var __refreshImage = function() {
diff --git a/kvmd/web/js/ui.js b/kvmd/web/js/ui.js
index 02f83ff0..0fa2ccd3 100644
--- a/kvmd/web/js/ui.js
+++ b/kvmd/web/js/ui.js
@@ -70,7 +70,7 @@ function Ui(hid) {
/********************************************************************************/
- self.showWindow = function(el_window) {
+ self.showWindow = function(el_window, raise=true) {
if (!__isWindowOnPage(el_window) || el_window.hasAttribute("data-centered")) {
var view = __getViewGeometry();
var rect = el_window.getBoundingClientRect();
@@ -79,7 +79,9 @@ function Ui(hid) {
el_window.setAttribute("data-centered", "");
}
el_window.style.visibility = "visible";
- __raiseWindow(el_window);
+ if (raise) {
+ __raiseWindow(el_window);
+ }
};
var __isWindowOnPage = function(el_window) {