fix fullscreen issue on linux

This commit is contained in:
rustdesk 2021-05-03 00:50:50 +08:00
parent b5e8b9ee0d
commit dafc34dde5
2 changed files with 4 additions and 1 deletions

View File

@ -182,6 +182,7 @@ class Header: Reactor.Component {
view.windowState = View.WINDOW_SHOWN;
}
view.windowState = View.WINDOW_FULL_SCREEN;
if (is_linux) { self.timer(150ms, function() { view.windowState = View.WINDOW_FULL_SCREEN; }); }
}
}

View File

@ -396,10 +396,12 @@ handler.adaptSize = function() {
if (is_osx) workarea_offset = sy;
var r = handler.get_size();
if (r[2] > 0) {
if (r[2] >= fw && r[3] >= fh) {
if (r[2] >= fw && r[3] >= fh && !is_linux) {
view.windowState = View.WINDOW_FULL_SCREEN;
stdout.println("Initialize to full screen");
} else if (r[2] >= sw && r[3] >= sh) {
view.windowState = View.WINDOW_MAXIMIZED;
stdout.println("Initialize to full screen");
} else {
view.move(r[0], r[1], r[2], r[3]);
}