New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse scrollwheel switches workspaces when mouse against the left edge of screen #605

Closed
nathanhaines opened this Issue Sep 26, 2017 · 11 comments

Comments

Projects
None yet
4 participants
@nathanhaines

nathanhaines commented Sep 26, 2017

In artful when logged in with the 'ubuntu' GNOME session with the mouse pointer on the leftmost edge of the screen, the scrollwheel scrolls through the available workspaces. The Desktop team says this is not the desired behavior.

Also filed against Ubuntu Dock as https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extension-ubuntu-dock/+bug/1719706

@franglais125

This comment has been minimized.

Show comment
Hide comment
@franglais125

franglais125 Sep 26, 2017

Contributor

Perhaps the setting is set to 'switch-workspace'

Can you try this to see if it's fixed?

dconf write /org/gnome/shell/extensions/dash-to-dock/scroll-action "'cycle-windows'"
Contributor

franglais125 commented Sep 26, 2017

Perhaps the setting is set to 'switch-workspace'

Can you try this to see if it's fixed?

dconf write /org/gnome/shell/extensions/dash-to-dock/scroll-action "'cycle-windows'"
@franglais125

This comment has been minimized.

Show comment
Hide comment
@franglais125

franglais125 Sep 26, 2017

Contributor

It seems that ubuntu-dock is being packaged that way:

https://github.com/micheleg/dash-to-dock/blob/ubuntu-dock/schemas/10_ubuntu-dock.gschema.override#L12

Edit: you can check this in 17.10 by running:

cat /usr/share/glib-2.0/schemas/10_ubuntu-dock.gschema.override
Contributor

franglais125 commented Sep 26, 2017

It seems that ubuntu-dock is being packaged that way:

https://github.com/micheleg/dash-to-dock/blob/ubuntu-dock/schemas/10_ubuntu-dock.gschema.override#L12

Edit: you can check this in 17.10 by running:

cat /usr/share/glib-2.0/schemas/10_ubuntu-dock.gschema.override
@franglais125

This comment has been minimized.

Show comment
Hide comment
@franglais125

franglais125 Sep 26, 2017

Contributor

@nathanhaines I think I misunderstood the problem. You can the workspace-switch action, just not on the edge of the screen?

Here is a patch for that: franglais125@2fd1624, branch based on ubuntu-dock: https://github.com/franglais125/dash-to-dock/tree/mouse_scroll

Contributor

franglais125 commented Sep 26, 2017

@nathanhaines I think I misunderstood the problem. You can the workspace-switch action, just not on the edge of the screen?

Here is a patch for that: franglais125@2fd1624, branch based on ubuntu-dock: https://github.com/franglais125/dash-to-dock/tree/mouse_scroll

@nathanhaines

This comment has been minimized.

Show comment
Hide comment
@nathanhaines

nathanhaines Sep 26, 2017

@franglais125 I'm over at the Ubuntu Rally and everyone here is very impressed. Thanks so much for that! I'll ping the right people over here. :)

nathanhaines commented Sep 26, 2017

@franglais125 I'm over at the Ubuntu Rally and everyone here is very impressed. Thanks so much for that! I'll ping the right people over here. :)

@franglais125

This comment has been minimized.

Show comment
Hide comment
@franglais125

franglais125 Sep 26, 2017

Contributor

@nathanhaines Awesome, let me know if it needs some tweaks!

Contributor

franglais125 commented Sep 26, 2017

@nathanhaines Awesome, let me know if it needs some tweaks!

@micheleg

This comment has been minimized.

Show comment
Hide comment
@micheleg

micheleg Sep 30, 2017

Owner

@franglais125: I'm not sure I understand what you are trying to achieve with that patch. The reason the border is reactive to the scroll events is that, due to margin/padding (depending on the theme) the event is not captured by the appicon actors

Owner

micheleg commented Sep 30, 2017

@franglais125: I'm not sure I understand what you are trying to achieve with that patch. The reason the border is reactive to the scroll events is that, due to margin/padding (depending on the theme) the event is not captured by the appicon actors

@franglais125

This comment has been minimized.

Show comment
Hide comment
@franglais125

franglais125 Oct 1, 2017

Contributor

@micheleg I was simply preventing the scrolling from happening in the case where the event is within 1px of the screen edge. I based the branch on ubuntu-dock in case the Ubuntu team wants to pick up this patch.

As for myself, I actually like this behavior (i.e. the bug), and was not thinking of submitting a PR. I proposed it merely for the Ubuntu team. However, I don't know if you consider this something we should fix or not. As it is, this patch was meant to be ad-hoc, not for master.

In any case, you have perhaps a better fix in mind!

(Btw, I updated the patch just now.)

Contributor

franglais125 commented Oct 1, 2017

@micheleg I was simply preventing the scrolling from happening in the case where the event is within 1px of the screen edge. I based the branch on ubuntu-dock in case the Ubuntu team wants to pick up this patch.

As for myself, I actually like this behavior (i.e. the bug), and was not thinking of submitting a PR. I proposed it merely for the Ubuntu team. However, I don't know if you consider this something we should fix or not. As it is, this patch was meant to be ad-hoc, not for master.

In any case, you have perhaps a better fix in mind!

(Btw, I updated the patch just now.)

@micheleg

This comment has been minimized.

Show comment
Hide comment
@micheleg

micheleg Oct 1, 2017

Owner

I do like it as well, but I undertand it might feel a bit unpredictable.

Owner

micheleg commented Oct 1, 2017

I do like it as well, but I undertand it might feel a bit unpredictable.

@micheleg

This comment has been minimized.

Show comment
Hide comment
@micheleg

micheleg Oct 1, 2017

Owner

I stand corrected: the behaviour is not dependent on margin/padding (depending on the theme), but relieably intercepted here:

dash-to-dock/dash.js

Lines 328 to 332 in fd81051

if ((this._position == St.Side.LEFT && event_x <= 1)
|| (this._position == St.Side.RIGHT && event_x >= actor_w - 2)
|| (this._position == St.Side.TOP && event_y <= 1)
|| (this._position == St.Side.BOTTOM && event_y >= actor_h - 2))
return Clutter.EVENT_PROPAGATE;

It is restricted to 1px in the case of fixed-icons, while the whole dock is sensitive when it gets resized and threre's no other reason for scrolling. The easiest way to disable (as desired by the ubuntu team) is therefore to delete those lines. I'm tempted to do that indeed.

Owner

micheleg commented Oct 1, 2017

I stand corrected: the behaviour is not dependent on margin/padding (depending on the theme), but relieably intercepted here:

dash-to-dock/dash.js

Lines 328 to 332 in fd81051

if ((this._position == St.Side.LEFT && event_x <= 1)
|| (this._position == St.Side.RIGHT && event_x >= actor_w - 2)
|| (this._position == St.Side.TOP && event_y <= 1)
|| (this._position == St.Side.BOTTOM && event_y >= actor_h - 2))
return Clutter.EVENT_PROPAGATE;

It is restricted to 1px in the case of fixed-icons, while the whole dock is sensitive when it gets resized and threre's no other reason for scrolling. The easiest way to disable (as desired by the ubuntu team) is therefore to delete those lines. I'm tempted to do that indeed.

@micheleg

This comment has been minimized.

Show comment
Hide comment
@micheleg

micheleg Oct 1, 2017

Owner

This [8cbfa98] would make it.

Owner

micheleg commented Oct 1, 2017

This [8cbfa98] would make it.

@didrocks

This comment has been minimized.

Show comment
Hide comment
@didrocks

didrocks Oct 12, 2017

Collaborator

let's close the issue btw as it's in master :)

Collaborator

didrocks commented Oct 12, 2017

let's close the issue btw as it's in master :)

@didrocks didrocks closed this Oct 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment