pikvm/pikvm#531: improved fullscreen focus

This commit is contained in:
Maxim Devaev 2021-11-04 02:42:48 +03:00
parent 653bef8657
commit aed6fd10ed
5 changed files with 17 additions and 0 deletions

View File

@ -599,6 +599,7 @@
<div id="stream-info"></div>
<div class="stream-box-offline" id="stream-box"><img id="stream-image" src="/share/png/blank-stream.png">
<video class="hidden" id="stream-video" autoplay playsinline muted></video>
<div id="stream-fullscreen-active"></div>
</div>
<div class="keypad" id="stream-mouse-buttons" align="center">
<div class="keypad-block">

View File

@ -11,6 +11,7 @@ div(id="stream-window" class="window window-resizable")
div(id="stream-box" class="stream-box-offline")
img(id="stream-image" src=`${png_dir}/blank-stream.png`)
video(id="stream-video" class="hidden" autoplay playsinline muted)
div(id="stream-fullscreen-active")
div(id="stream-mouse-buttons" class="keypad" align="center")
div(class="keypad-block")

View File

@ -64,6 +64,19 @@ video#stream-video {
display: block;
background-color: black;
}
div#stream-window.window-active:fullscreen {
border: 0px !important;
border-radius: 0px !important;
}
div#stream-window.window-active:fullscreen div#stream-box div#stream-fullscreen-active {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
border: 0;
box-shadow: var(--shadow-window-fullscreen-active);
}
div#stream-mouse-buttons {
display: none;

View File

@ -72,6 +72,7 @@
--shadow-small: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
--shadow-big: 0 8px 16px 0 rgba(0, 0, 0, 0.4);
--shadow-navbar-item-pressed: 0 5px 0 #5b90bb inset;
--shadow-window-fullscreen-active: 0 0 0 2px #5b90bb inset;
--border-default-thin: thin solid #36393f;
--border-default-2px: 2px solid #36393f;

View File

@ -115,6 +115,7 @@ function __WindowManager() {
el_full_screen_button.title = "Go to full-screen mode";
tools.el.setOnClick(el_full_screen_button, function() {
__fullScreenWindow(el_window);
el_window.focus(el_window); // Почему-то теряется фокус
__activateLastWindow(el_window);
});
}