Skip to content

Support fullscreen mode via F11 on Linux and Windows desktop - #14216

Merged
gtritchie merged 4 commits into
mainfrom
feature/windows-fullscreen
Feb 3, 2024
Merged

gtritchie merged 4 commits into
mainfrom
feature/windows-fullscreen

Conversation

@gtritchie

@gtritchie gtritchie commented Feb 3, 2024 •

Copy link
Copy Markdown
Member

Intent

Addresses #3243

Note that I also noticed and fixed a menulabel string that was apparently edited directly in the "Do not edit this file" commands string resource file for copilotAcceptNextWord. I applied the change in Commands.cmd.xml and rebuilt to regenerate the string resources. Otherwise the old string would have stomped the new one.

Approach

We already supported fullsceen mode on Mac; this just enables the same codepath for Windows and Linux, using F11 as the default keyboard shortcut on those platforms.

This is a basic implementation. Some quirks to be aware of:

  • This feature only works on the main RStudio window; it doesn't do anything for secondary windows such as editors in their own window, the Git window, and so forth (this matches how it has always behaved on macOS)
  • The F11 shortcut can be problematic to test on Linux, especially in VMs on a Mac (VSCode has the same problem; if you encounter that you can customize the shortcut for Toggle Full Screen command to something else, use the View / Toggle Full Screen menu item, or the command palette
  • The behavior of the menubar when in full-screen mode is whatever Electron does automatically; in my testing:
    • on Linux (only tried Ubuntu 22), the menubar hides automatically and can be activated via the Alt key
    • on Windows, the menubar doesn't hide automatically in fullscreen mode; however, you can use the new "Hide menu bar until Alt-key pressed" option that was added in this version of RStudio (near the bottom of Options / General) to make it behave like it does on Linux
  • We don't preserve full-screen mode on restart, so if you are in full-screen mode and exit RStudio, when you restart, you won't be in full-screen mode

Automated Tests

None

QA Notes

See notes above about known quirks.

I'm going for something simple and low-impact in this initial implementation. We can look at polishing in the future based on feedback (e.g. might want to make menubar autohide in full-screen on Windows without having to enable that manually, and might want the option to hide the toolbar automatically in full-screen mode).

Documentation

None

Checklist

  • If this PR adds a new feature, or fixes a bug in a previously released version, it includes an entry in NEWS.md
  • If this PR adds or changes UI, the updated UI meets accessibility standards
  • A reviewer is assigned to this PR (if unsure who to assign, check Area Owners list)
  • This PR passes all local unit tests

@gtritchie
gtritchie requested a review from kevinushey February 3, 2024 00:25

@kevinushey kevinushey left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome; LGTM!

@gtritchie
gtritchie merged commit e3d2f51 into main Feb 3, 2024
@gtritchie
gtritchie deleted the feature/windows-fullscreen branch February 3, 2024 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants