[gnome-shell] messageList: Only close messages via delete key if they can be closed
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] messageList: Only close messages via delete key if they can be closed
- Date: Sat, 4 Jun 2022 13:40:18 +0000 (UTC)
commit 795723fe8533cc66cf5741ad81bd90e22aa90c3c
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>
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 f4e43f7aed..29e76752b8 100644
--- a/js/ui/messageList.js
+++ b/js/ui/messageList.js
@@ -535,8 +535,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]