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
@ -535,8 +535,10 @@ var Message = GObject.registerClass({
|
|||||||
|
|
||||||
if (keysym == Clutter.KEY_Delete ||
|
if (keysym == Clutter.KEY_Delete ||
|
||||||
keysym == Clutter.KEY_KP_Delete) {
|
keysym == Clutter.KEY_KP_Delete) {
|
||||||
this.close();
|
if (this.canClose()) {
|
||||||
return Clutter.EVENT_STOP;
|
this.close();
|
||||||
|
return Clutter.EVENT_STOP;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return super.vfunc_key_press_event(keyEvent);
|
return super.vfunc_key_press_event(keyEvent);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user