mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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>
This commit is contained in:
parent
caebb5a35e
commit
795723fe85
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue