diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js index 3740975b1..eb9d21a5d 100644 --- a/js/ui/screenshot.js +++ b/js/ui/screenshot.js @@ -988,6 +988,11 @@ class UIWindowSelector extends St.Widget { } }); +const UIMode = { + SCREENSHOT: 0, + SCREENCAST: 1, +}; + var ScreenshotUI = GObject.registerClass({ Properties: { 'screencast-in-progress': GObject.ParamSpec.boolean( @@ -1408,13 +1413,15 @@ var ScreenshotUI = GObject.registerClass({ this._screenSelectors[Main.layoutManager.primaryIndex].checked = true; } - async open() { + async open(mode = UIMode.SCREENSHOT) { if (this._openingCoroutineInProgress) return; if (this._screencastInProgress) return; + this._castButton.checked = mode === UIMode.SCREENCAST; + if (!this.visible) { // Screenshot UI is opening from completely closed state // (rather than opening back from in process of closing).