[gnome-shell] screenshot: Only enable window screenshots when allowed by mode
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] screenshot: Only enable window screenshots when allowed by mode
- Date: Mon, 22 Aug 2022 14:18:42 +0000 (UTC)
commit f9135cdc86bf64718e6d0f6f4747347d4ed4c388
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Aug 21 21:07:52 2022 +0200
screenshot: Only enable window screenshots when allowed by mode
We currently don't take the session mode's `hasWindows` property
into account when deciding whether window screenshots should be
allowed. Right now that doesn't matter in practice, because all
the ways to bring up the screenshot UI are blocked in those modes
anyway. This is about to change though, so take the property into
account to prevent an information leak.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2439>
js/ui/screenshot.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index d82d7a7a62..e6ead61273 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -1469,7 +1469,9 @@ var ScreenshotUI = GObject.registerClass({
}
this._windowButton.reactive =
- windows.length > 0 && !this._castButton.checked;
+ Main.sessionMode.hasWindows &&
+ windows.length > 0 &&
+ !this._castButton.checked;
if (!this._windowButton.reactive)
this._selectionButton.checked = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]