[gnome-shell/wip/carlosg/overview-during-grab-op] overview: Avoid entering in overview mode during display grab op
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/overview-during-grab-op] overview: Avoid entering in overview mode during display grab op
- Date: Tue, 26 Apr 2022 11:27:44 +0000 (UTC)
commit b10c9ad841d9de073928fb721a14381c3d7c6054
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Apr 26 13:09:01 2022 +0200
overview: Avoid entering in overview mode during display grab op
ClutterGrab and display grab operations are pretty much mutually
exclusive, but there's no mechanism to ensure a ClutterGrab does
not step on top of an existing grab operation.
This looks the only place that could trigger that (e.g. start
dragging window, then move pointer to top/left corner), so skip
over the situation here explicitly.
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5397
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5181
js/ui/overview.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 96ccde5219..8988a0c716 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -448,8 +448,14 @@ var Overview = class {
if (this._shown) {
let shouldBeModal = !this._inXdndDrag;
if (shouldBeModal && !this._modal) {
- let actionMode = Shell.ActionMode.OVERVIEW;
- let grab = Main.pushModal(global.stage, { actionMode });
+ if (global.display.get_grab_op() !== Meta.GrabOp.NONE) {
+ this.hide();
+ return false;
+ }
+
+ const grab = Main.pushModal(global.stage, {
+ actionMode: Shell.ActionMode.OVERVIEW
+ });
if (grab.get_seat_state() !== Clutter.GrabState.NONE) {
this._grab = grab;
this._modal = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]