Skip to content

Commit

Permalink
Merge branch 'main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dcommander committed Jan 13, 2025
2 parents 622ab91 + 682c62e commit ce0e693
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions java/com/turbovnc/vncviewer/Viewport.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,7 @@ public Viewport(CConn cc_) {
if (Utils.getBooleanProperty("turbovnc.lionfs", true))
enableLionFS();
}
// NOTE: If Lion FS mode is enabled, then the viewport is only created once
// as a non-full-screen viewport, so we tell showToolbar() to ignore the
// full-screen state.
showToolbar(cc.params.toolbar.get(), canDoLionFS);
showToolbar(cc.params.toolbar.get());

final Viewport vp = this;
addWindowFocusListener(new WindowAdapter() {
Expand Down Expand Up @@ -296,12 +293,10 @@ public Object invoke(Object proxy, Method method, Object[] args) {
cc.params.fullScreen.set(true);
cc.menu.fullScreen.setSelected(cc.params.fullScreen.get());
updateMacMenuFS();
showToolbar(cc.params.toolbar.get());
} else if (method.getName().equals("windowExitingFullScreen")) {
cc.params.fullScreen.set(false);
cc.menu.fullScreen.setSelected(cc.params.fullScreen.get());
updateMacMenuFS();
showToolbar(cc.params.toolbar.get());
} else if (method.getName().equals("windowEnteredFullScreen")) {
cc.sizeWindow();
}
Expand Down Expand Up @@ -417,10 +412,8 @@ public void setVisible(boolean visible) {
}
}

public void showToolbar(boolean show) { showToolbar(show, false); }

private void showToolbar(boolean show, boolean force) {
tb.setVisible(show && (!cc.params.fullScreen.get() || force));
public void showToolbar(boolean show) {
tb.setVisible(show && !cc.params.fullScreen.get());
}

public void updateTitle() {
Expand Down

0 comments on commit ce0e693

Please sign in to comment.