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 694467 - Adjust the pressure barrier
Adjust the pressure barrier
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-22 18:14 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-03-23 07:01 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
layout: Adjust the pressure barrier threshold values (1.07 KB, patch)
2013-02-22 18:14 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
layout: Cap each event to 15px of motion (983 bytes, patch)
2013-02-22 18:14 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
layout: Trigger the tray if one event passes the threshold (1.89 KB, patch)
2013-02-22 18:14 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-02-22 18:14:30 UTC
These things were found after a fairly long hour or two
trying out and tweaking barriers with Cosimo and Jon
yesterday.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-02-22 18:14:34 UTC
Created attachment 237205 [details] [review]
layout: Adjust the pressure barrier threshold values

After a day of experimentation with Cosimo and Jon McCann, we
found that this was the best way to do this.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-02-22 18:14:38 UTC
Created attachment 237206 [details] [review]
layout: Cap each event to 15px of motion

When pressing against the bottom of the screen, we shouldn't
really take more than 15px from each event, to prevent spruious
mouse movements from opening the barrier.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-02-22 18:14:40 UTC
Created attachment 237207 [details] [review]
layout: Trigger the tray if one event passes the threshold

As a special-case to the "cap event" rules, this allows a heavy swipe
from top to bottom to allow triggering the tray without having to push
into it.
Comment 4 Hashem Nasarat 2013-02-22 18:17:30 UTC
What about a swipe from bottom to top (as in, swiping up to reveal the notification area)?

Perhaps you already considered this, but I believe the pressure should be configurable due to people having different settings for mouse/trackpad acceleration.
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-02-22 18:20:52 UTC
(In reply to comment #4)
> What about a swipe from bottom to top (as in, swiping up to reveal the
> notification area)?

This is the plan on touch devices.

> Perhaps you already considered this, but I believe the pressure should be
> configurable due to people having different settings for mouse/trackpad
> acceleration.

We tested with all speed settings for mouse/trackpad, but it's possible that we might need to more tweaking afterwards.
Comment 6 drago01 2013-02-23 19:29:16 UTC
Review of attachment 237205 [details] [review]:

Can't test it here right now but as you have tested it (and have design ack I assume it is actually better).
Code looks good.
Comment 7 drago01 2013-02-23 19:30:38 UTC
Review of attachment 237206 [details] [review]:

Makes sense.
Comment 8 drago01 2013-02-23 19:31:19 UTC
Review of attachment 237206 [details] [review]:

::: js/ui/layout.js
@@ +1331,3 @@
         this._trimBarrierEvents();
         this._barrierEvents.push(event);
+        this._currentPressure += Math.min(15, distance);

But this should be a constant really,
Comment 9 drago01 2013-02-23 19:33:19 UTC
(In reply to comment #3)
> Created an attachment (id=237207) [details] [review]
> layout: Trigger the tray if one event passes the threshold
> 
> As a special-case to the "cap event" rules, this allows a heavy swipe
> from top to bottom to allow triggering the tray without having to push
> into it.

Not sure about this one ... why? Doesn't this cause accidental trigger? (can't test, old X here).
Comment 10 Jasper St. Pierre (not reading bugmail) 2013-02-23 21:23:25 UTC
(In reply to comment #8)
> ::: js/ui/layout.js
> @@ +1331,3 @@
>          this._trimBarrierEvents();
>          this._barrierEvents.push(event);
> +        this._currentPressure += Math.min(15, distance);
> 
> But this should be a constant really,

Right, but I've been trying to separate these things out, and that would mean another parameter in the constructor...

(In reply to comment #9)
> Not sure about this one ... why? Doesn't this cause accidental trigger? (can't
> test, old X here).

After testing, we found that it's super hard to trigger the threshold accidentally (200 pixels against the bottom of the screen!)

The only parameter we might have to tweak is if this should be based on screen size or not.
Comment 11 drago01 2013-02-24 16:31:25 UTC
(In reply to comment #10)

> (In reply to comment #9)
> > Not sure about this one ... why? Doesn't this cause accidental trigger? (can't
> > test, old X here).
> 
> After testing, we found that it's super hard to trigger the threshold
> accidentally (200 pixels against the bottom of the screen!)

200 px do not mean much by itself (think of high res aka "retina" displays).

> The only parameter we might have to tweak is if this should be based on screen
> size or not.

It should.
Comment 12 Jasper St. Pierre (not reading bugmail) 2013-02-27 19:02:18 UTC
Attachment 237205 [details] pushed as 476eacd - layout: Adjust the pressure barrier threshold values
Attachment 237206 [details] pushed as 01bd10f - layout: Cap each event to 15px of motion
Attachment 237207 [details] pushed as 41f14e0 - layout: Trigger the tray if one event passes the threshold


I'm going to push these for now, and we'll revisit when I test on more screen sizes tomorrow.
Comment 13 Hashem Nasarat 2013-03-23 07:01:29 UTC
The current settings (as I guessed :) ) aren't satisfying everyone. 
http://worldofgnome.org/barriers-smooth-scrolling-osds-in-gnome-3-8/#comment-838784622

"hack the js" isn't appropriate means to configure such things.