2021-02-14 20:03:03 +00:00
|
|
|
From 6817bec35d2036e8f56a0a4c94843b5fd7b4984f Mon Sep 17 00:00:00 2001
|
2021-02-12 21:24:28 +00:00
|
|
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
|
Date: Thu, 11 Feb 2021 18:10:56 +0100
|
2021-02-14 18:38:56 +00:00
|
|
|
Subject: [PATCH 1/2] overviewControls: Everything is lava!
|
2021-02-12 21:24:28 +00:00
|
|
|
|
|
|
|
Account for the increased distance from Activities button to the
|
|
|
|
show-apps button by allowing clicks on the background to bring up
|
|
|
|
the app grid.
|
|
|
|
---
|
2021-02-14 20:03:03 +00:00
|
|
|
js/ui/overviewControls.js | 9 +++++++++
|
|
|
|
1 file changed, 9 insertions(+)
|
2021-02-12 21:24:28 +00:00
|
|
|
|
|
|
|
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
|
2021-02-14 20:03:03 +00:00
|
|
|
index 32388621e..cd394e56a 100644
|
2021-02-12 21:24:28 +00:00
|
|
|
--- a/js/ui/overviewControls.js
|
|
|
|
+++ b/js/ui/overviewControls.js
|
|
|
|
@@ -247,6 +247,7 @@ class ControlsManager extends St.Widget {
|
|
|
|
style_class: 'controls-manager',
|
|
|
|
x_expand: true,
|
|
|
|
y_expand: true,
|
|
|
|
+ reactive: true,
|
|
|
|
clip_to_allocation: true,
|
|
|
|
});
|
|
|
|
|
2021-02-14 20:03:03 +00:00
|
|
|
@@ -321,6 +322,14 @@ class ControlsManager extends St.Widget {
|
2021-02-12 21:24:28 +00:00
|
|
|
this.dash.showAppsButton.connect('notify::checked',
|
|
|
|
this._onShowAppsButtonToggled.bind(this));
|
|
|
|
|
|
|
|
+ const clickAction = new Clutter.ClickAction();
|
2021-02-14 20:03:03 +00:00
|
|
|
+ clickAction.connect('clicked', () => {
|
|
|
|
+ const button = clickAction.get_button();
|
|
|
|
+ if (button === 0 || button === 1)
|
|
|
|
+ this.dash.showAppsButton.checked = true;
|
|
|
|
+ });
|
2021-02-12 21:24:28 +00:00
|
|
|
+ this.add_action(clickAction);
|
|
|
|
+
|
|
|
|
Main.ctrlAltTabManager.addGroup(
|
|
|
|
this.appDisplay,
|
|
|
|
_('Applications'),
|
|
|
|
--
|
|
|
|
2.29.2
|
|
|
|
|
2021-02-14 18:38:56 +00:00
|
|
|
|
2021-02-14 20:03:03 +00:00
|
|
|
From 20a31bd0d726fd7e0f7bcf6636ce6a9a453cb0f7 Mon Sep 17 00:00:00 2001
|
2021-02-14 18:38:56 +00:00
|
|
|
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
|
|
|
Date: Sun, 14 Feb 2021 19:24:52 +0100
|
|
|
|
Subject: [PATCH 2/2] workspaceThumbnail: Always consume button/touch events on
|
|
|
|
thumbnails
|
|
|
|
|
|
|
|
Now that the background is reactive and opens the app grid, we have to
|
|
|
|
be more careful when consuming or propagating events: Thumbnails must
|
|
|
|
consume events, non-thumbnail parts should let them through.
|
|
|
|
---
|
2021-02-14 20:03:03 +00:00
|
|
|
js/ui/workspaceThumbnail.js | 28 ++++++++++++++++++----------
|
|
|
|
1 file changed, 18 insertions(+), 10 deletions(-)
|
2021-02-14 18:38:56 +00:00
|
|
|
|
|
|
|
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
|
2021-02-14 20:03:03 +00:00
|
|
|
index 40a33fe3a..6489a7eca 100644
|
2021-02-14 18:38:56 +00:00
|
|
|
--- a/js/ui/workspaceThumbnail.js
|
|
|
|
+++ b/js/ui/workspaceThumbnail.js
|
2021-02-14 20:03:03 +00:00
|
|
|
@@ -708,26 +708,34 @@ var ThumbnailsBox = GObject.registerClass({
|
2021-02-14 18:38:56 +00:00
|
|
|
workspaceManager.n_workspaces > 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
- _activateThumbnailAtPoint(stageX, stageY, time) {
|
|
|
|
+ _findThumbnailAtPoint(stageX, stageY) {
|
|
|
|
const [r_, x] = this.transform_stage_point(stageX, stageY);
|
|
|
|
+ return this._thumbnails.find(t => x >= t.x && x <= t.x + t.width);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- const thumbnail = this._thumbnails.find(t => x >= t.x && x <= t.x + t.width);
|
|
|
|
- if (thumbnail)
|
|
|
|
- thumbnail.activate(time);
|
|
|
|
+ vfunc_button_press_event(buttonEvent) {
|
|
|
|
+ const { x, y } = buttonEvent;
|
|
|
|
+ return this._findThumbnailAtPoint(x, y)
|
2021-02-14 20:03:03 +00:00
|
|
|
+ ? Clutter.EVENT_STOP : Clutter.EVENT_PROPAGATE;
|
2021-02-14 18:38:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
vfunc_button_release_event(buttonEvent) {
|
|
|
|
- let { x, y } = buttonEvent;
|
|
|
|
- this._activateThumbnailAtPoint(x, y, buttonEvent.time);
|
|
|
|
+ const { x, y } = buttonEvent;
|
|
|
|
+ const thumbnail = this._findThumbnailAtPoint(x, y);
|
|
|
|
+ if (!thumbnail)
|
|
|
|
+ return Clutter.EVENT_PROPAGATE;
|
|
|
|
+ thumbnail.activate(buttonEvent.time);
|
|
|
|
return Clutter.EVENT_STOP;
|
|
|
|
}
|
|
|
|
|
|
|
|
vfunc_touch_event(touchEvent) {
|
|
|
|
+ const { x, y } = touchEvent;
|
|
|
|
+ const thumbnail = this._findThumbnailAtPoint(x, y);
|
|
|
|
+ if (!thumbnail)
|
|
|
|
+ return Clutter.EVENT_PROPAGATE;
|
|
|
|
if (touchEvent.type == Clutter.EventType.TOUCH_END &&
|
2021-02-14 20:03:03 +00:00
|
|
|
- global.display.is_pointer_emulating_sequence(touchEvent.sequence)) {
|
2021-02-14 18:38:56 +00:00
|
|
|
- let { x, y } = touchEvent;
|
|
|
|
- this._activateThumbnailAtPoint(x, y, touchEvent.time);
|
2021-02-14 20:03:03 +00:00
|
|
|
- }
|
|
|
|
+ global.display.is_pointer_emulating_sequence(touchEvent.sequence))
|
2021-02-14 18:38:56 +00:00
|
|
|
+ thumbnail.activate(touchEvent.time);
|
|
|
|
|
|
|
|
return Clutter.EVENT_STOP;
|
2021-02-14 20:03:03 +00:00
|
|
|
}
|
2021-02-14 18:38:56 +00:00
|
|
|
--
|
|
|
|
2.29.2
|
|
|
|
|