After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 635034 - Should be able to swipe-scroll anywhere on the background
Should be able to swipe-scroll anywhere on the background
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-11-16 22:49 UTC by Owen Taylor
Modified: 2011-01-24 09:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
overview: Add a facility for swipe-scrolling (10.24 KB, patch)
2011-01-24 00:51 UTC, Florian Müllner
reviewed Details | Review
workspaces-view: Use overview swipe-scrolling (11.95 KB, patch)
2011-01-24 00:52 UTC, Florian Müllner
needs-work Details | Review
app-display: Enable swipe-scrolling in the app view (1.39 KB, patch)
2011-01-24 00:52 UTC, Florian Müllner
committed Details | Review
search-display: Enable swipe scrolling (1.63 KB, patch)
2011-01-24 00:52 UTC, Florian Müllner
committed Details | Review
overview: Add a facility for swipe-scrolling (11.31 KB, patch)
2011-01-24 02:06 UTC, Florian Müllner
committed Details | Review
workspaces-view: Use overview swipe-scrolling (12.43 KB, patch)
2011-01-24 02:11 UTC, Florian Müllner
committed Details | Review

Description Owen Taylor 2010-11-16 22:49:25 UTC
With the relayout, when you are on the "Windows" tab, it's completely mysterious and unpredictable what parts of the background you can drag to scroll between workspaces. And very hard to find such a spot when you have a workspace with just one window. It should be possible to grab and drag on basically any part of the background that isn't occupied by something else.
Comment 1 Florian Müllner 2010-11-16 23:01:19 UTC
Assuming that the window rubberbanding in http://live.gnome.org/GnomeShell/Design/Whiteboards/OverviewWindowDND is still wanted, swipe-scroll might disappear entirely.
Comment 2 Florian Müllner 2011-01-24 00:51:55 UTC
Created attachment 179119 [details] [review]
overview: Add a facility for swipe-scrolling

The workspaces view allows to drag the active workspace to swipe-scroll
to the next or previous workspace. While this behavior can come in handy
in general, there are good reasons to move the functionality to the
overview:

 - Finding a spot on a workspace to start a drag can be hard,
   especially when the workspace contains a single window
 - With the new layout, workspaces have no visible border, making
   it hard to predict where a drag can be initiated
 - The same behavior is equally useful for other elements

So add setScrollAdjustment() to the overview, which allows setting
an adjustment controlled with swipe-scrolling (either horizontally
or vertically); only a single adjustment can be controlled at a
time. A swipe-scroll can be initiated on any part of the background that
is not occupied by a reactive actor. For cases where further control
is needed, 'swipe-scroll-start' and 'swipe-scroll-end' signals are
emitted.
Comment 3 Florian Müllner 2011-01-24 00:52:02 UTC
Created attachment 179120 [details] [review]
workspaces-view: Use overview swipe-scrolling

Remove the swipe-scrolling implementation in WorkspacesView and
use the new overview facility.
Comment 4 Florian Müllner 2011-01-24 00:52:13 UTC
Created attachment 179121 [details] [review]
app-display: Enable swipe-scrolling in the app view

With general support for swipe-scrolling in the overview, there is
no reason to limit the behavior to workspaces. It is equally useful
for scrolling through the grid of available applications, so enable
swipe-scrolling for the app view.
Comment 5 Florian Müllner 2011-01-24 00:52:19 UTC
Created attachment 179122 [details] [review]
search-display: Enable swipe scrolling

If a search gives many results from various providers, the result
area will be scrollable, so enable swipe-scrolling here as well.
Comment 6 Owen Taylor 2011-01-24 01:09:58 UTC
Review of attachment 179119 [details] [review]:

In testing with swipe scrolling for applications, search, one thing you notice is that you get prelights during swipe scrolling - so might need to block enter/leave events with the event capture (is that possible?). Of course, that could leave a missing prelight on release, but maybe that feels OK.

::: js/ui/overview.js
@@ +354,3 @@
+                if (stageX == this._dragStartX &&
+                    stageY == this._dragStartY) {
+                    // no motion? It's a click!

I think there probably needs to be some threshold here; don't know if using the same value as dnd.js makes sense or if that's too far
Comment 7 Owen Taylor 2011-01-24 01:17:40 UTC
Review of attachment 179120 [details] [review]:

Generally looks good, few things:

::: js/ui/workspacesView.js
@@ +635,3 @@
+            // Only switch to the workspace when there's no application
+            // windows open. The problem is that it's too easy to miss
+            // an app window and get the wrong one focused.

I'm not sure we want this - it doesn't feel at all natural (in fact, just a few minutes ago I accidentally clicked on the background on a empty workspace when trying to switch tabs and left the overview and didn't figure out what happened until I saw this in the code)

@@ +640,3 @@
+                Main.overview.hide();
+        } else if (result == Overview.SwipeScrollResult.SWIPE)
+            this._scrollToActive(false);

If this is necessary (I'm not sure why and it seems to apparently work fine without it) it needs commentary about why it is necessary and how it interacts with the generic swipe scrolling tween to the final position.

@@ +642,3 @@
+            this._scrollToActive(false);
+        else
+            this._updateVisibility();

This also needs a comment - not sure what it's about
Comment 8 Owen Taylor 2011-01-24 01:18:56 UTC
Review of attachment 179121 [details] [review]:

Looks good
Comment 9 Owen Taylor 2011-01-24 01:19:12 UTC
Review of attachment 179122 [details] [review]:

Looks good
Comment 10 Florian Müllner 2011-01-24 02:06:00 UTC
Created attachment 179127 [details] [review]
overview: Add a facility for swipe-scrolling

(In reply to comment #6)
> In testing with swipe scrolling for applications, search, one thing you notice
> is that you get prelights during swipe scrolling - so might need to block
> enter/leave events with the event capture (is that possible?).

Yes, but only until the pointer is released (which is when the capture handler is disconnected). Raising the cover pane while tweening to the final position works fine though.


> ::: js/ui/overview.js
> @@ +354,3 @@
> +                if (stageX == this._dragStartX &&
> +                    stageY == this._dragStartY) {
> +                    // no motion? It's a click!
> 
> I think there probably needs to be some threshold here; don't know if using the
> same value as dnd.js makes sense or if that's too far

Makes sense.
Comment 11 Florian Müllner 2011-01-24 02:11:30 UTC
Created attachment 179128 [details] [review]
workspaces-view: Use overview swipe-scrolling

(In reply to comment #7)
> I'm not sure we want this - it doesn't feel at all natural (in fact, just a few
> minutes ago I accidentally clicked on the background on a empty workspace when
> trying to switch tabs and left the overview and didn't figure out what happened
> until I saw this in the code)

I wouldn't mind removing it altogether, but that's a change from current behavior. For now I added an additional check whether the click happened on the actual workspace, which matches the current behavior more closely (but has again the problem that it's unclear what exact part triggers the behavior - so removing it probably is better after all) ...


> If this is necessary (I'm not sure why and it seems to apparently work fine
> without it) it needs commentary about why it is necessary and how it interacts
> with the generic swipe scrolling tween to the final position.

OK. I updated that part and added comments.
Comment 12 Owen Taylor 2011-01-24 03:37:45 UTC
Review of attachment 179127 [details] [review]:

Looks good
Comment 13 Owen Taylor 2011-01-24 03:41:05 UTC
Review of attachment 179128 [details] [review]:

Looks good
Comment 14 Florian Müllner 2011-01-24 09:34:58 UTC
Attachment 179121 [details] pushed as e96a90b - app-display: Enable swipe-scrolling in the app view
Attachment 179122 [details] pushed as 1b383c7 - search-display: Enable swipe scrolling
Attachment 179127 [details] pushed as a6da22f - overview: Add a facility for swipe-scrolling
Attachment 179128 [details] pushed as d64d491 - workspaces-view: Use overview swipe-scrolling