[gnome-shell/gnome-42] messageList: Only close messages via delete key if they can be closed
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-42] messageList: Only close messages via delete key if they can be closed
- Date: Sun, 3 Jul 2022 12:19:47 +0000 (UTC)
commit 554300377d0af8fc9fbc8658e2901f9e0384bcf6
Author: PhilProg <philroh2008 gmail com>
Date: Fri Jun 3 04:53:11 2022 +0000
messageList: Only close messages via delete key if they can be closed
If the delete key is pressed while a message/MPRIS indicator is focused
GNOME now asks whether the message/MPRIS indicator is closable.
If yes it will be closed but if not it won't be closed.
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5536
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2323>
(cherry picked from commit 795723fe8533cc66cf5741ad81bd90e22aa90c3c)
js/ui/messageList.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/messageList.js b/js/ui/messageList.js
index 99c544d017..e431e73eac 100644
--- a/js/ui/messageList.js
+++ b/js/ui/messageList.js
@@ -539,8 +539,10 @@ var Message = GObject.registerClass({
if (keysym == Clutter.KEY_Delete ||
keysym == Clutter.KEY_KP_Delete) {
- this.close();
- return Clutter.EVENT_STOP;
+ if (this.canClose()) {
+ this.close();
+ return Clutter.EVENT_STOP;
+ }
}
return super.vfunc_key_press_event(keyEvent);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]