! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Cycling through windows in dual-screen
Status:
RESOLVED: MOVED
Severity:
enhancement

Comments

Description Andrzej editbugs 2012-05-10 10:56:35 CEST
Currently xfwm4 cycles through all the windows on current workspace.

While that's one possible design choice, other (arguably more convenient for users) would be to limit cycling to windows on the current screen as well. I think this warrants an option, perhaps ON by default.

Not sure which screen should be considered "active" - the one with a focused window, or the one with mouse cursor.

Another possible choice would be to display all available windows in several rows - one per screen. This could work nicely with the newly added cursor key navigation.

My subjective explanation:
When I work with multiple screens I rarely think of them as a single common space - they "feel" more like separate workspaces to me. That mental model works reasonably well until I press Alt-Tab, which forces me to deal with all the additional windows from the other screen.
Comment 1 Liv 2014-01-21 21:29:32 CET
For info, this seems like an oft-requested feature for people using multiple monitors: 

http://askubuntu.com/questions/220165/switch-windows-only-in-current-workspace-and-display
Comment 2 Liv 2014-01-22 14:22:13 CET
To give an idea of what flexibility is allowed elsewhere, in Skippy-XD (a full-screen task-switcher for X11 similar to Mac OS X's Exposé feature) you can: 
"To avoid displaying windows from other virtual desktops, set [general] -> showAllDesktops to 'false'. Should work on most EWMH compliant WMs.

To avoid displaying windows from other Xinerama screens, set [xinerama] -> showAll to 'false'.

To avoid displaying windows from other, separate X displays, set [general] -> includeAllScreens to 'false'. (But this is a hidden switch and is disabled by default.)"

See https://github.com/richardgv/skippy-xd/issues/35#issuecomment-32977001 .
Comment 3 Olivier Fourdan editbugs 2016-03-18 08:35:37 CET
Not a feature I would like myself so I won;t add it (myself) but if someone else i willing to give it a try, I might consider a well written patch for inclusion.

Thing is, this would be incompatible with the tabwin shown on both monitors, as both would show different content and there is only one keyboard/mouse/user to choose.

I am quite attached to he same tabwin showing on all monitors as I use it all the time (I don't have to think on which monitor I have to look at to select my windows, and I really miss that on gnome-shell where the tabwin shows only on the primary monitor, but on gnome-shell, the windows preview is per monitor so it's less of a problem).
Comment 4 Andrzej editbugs 2016-03-18 22:21:49 CET
I would like to point to the bug #8867 where we are discussing focus issues with sticky windows.

Sticky windows are an idiomatic way (in X, at least) of keeping windows visible on multiple workspaces. They could be used instead of the mechanism described here but, as they end up stealing focus from other windows, they are much less useful than they could be.
Comment 5 Ignacio Losiggio 2019-05-14 17:32:22 CEST
A friend of mine asked me if i could help him with this issue several months ago. I made a dirty patch and forgot about it. Now another friend is asking for the same feature. I have an almost working patch (i currently cannot test it myself because i don't have a dual-monitor setup in my house). Would someone check if it's good enough for submission?

Any critic of my work is welcome

URL: https://github.com/iglosiggio/xfwm4/commit/0a42e70f22624bb8e7efa2f83455b19ba2e39591
Comment 6 Ignacio Losiggio 2019-05-14 17:34:12 CEST
Created attachment 8522 
Patch that adds the option of cycling through all windows in the current workspace
Comment 7 Ignacio Losiggio 2019-05-14 17:55:14 CEST
Created attachment 8523 
Patch that adds the option of cycling through all windows in the current workspace

(In reply to Ignacio Losiggio from comment #5)

Sorry, i sent the wrong patch and wrong link (i forgot to clean the repo).

URL: https://github.com/iglosiggio/xfwm4/commit/d9874d75bd8a7df0aa594b8528f8f521f9014ffb
Comment 8 Nilesh 2020-01-29 02:47:45 CET
Any update on this? I would be a nice feature to have for people with multiple monitors.
Comment 9 Ignacio Losiggio 2020-01-29 04:31:43 CET
I've received some comments on my patch (https://github.com/iglosiggio/xfwm4/commit/d9874d75bd8a7df0aa594b8528f8f521f9014ffb#r33866008) and i'm not using xfwm4 currently.

I could rebase my changes and try to get a working patch again (i assume not much has changed) but i would like a comment from someone upstream before commiting any more work. Btw, if you want to try the patch and have any problems feel free to drop me an email or an issue :D
Comment 10 Nilesh 2020-01-29 05:30:44 CET
> Btw, if you want to try the patch and have any problems feel free to drop me an email or an issue :D

Thanks for the awesome work. Tried that patch, with https://github.com/xfce-mirror/xfwm4/tree/xfce-4.14 merged with it.

```
git clone https://github.com/iglosiggio/xfwm4
git remote add upstream https://github.com/xfce-mirror/xfwm4
git pull upstream 
git merge upstream/xfce-4.14 
./autogen.sh     --prefix=/usr     --libexecdir=/usr/lib     --sysconfdir=/etc     --localstatedir=/var     --disable-dependency-tracking     --disable-static     --enable-epoxy     --enable-startup-notification     --enable-xsync     --enable-render     --enable-randr     --enable-xpresent     --enable-compositor     --disable-debug
make
sudo make install 
```

It works for most of the part but found something buggy. Attaching a video, have a look at 0:25. It did not work properly for some cases.

https://imgur.com/a/1LD62As
Comment 11 Ignacio Losiggio 2020-01-29 23:17:21 CET
Mmm seems like some kind of off-by-one-pixel bug. I will try to solve that :)
Comment 12 Ignacio Losiggio 2020-01-30 22:26:59 CET
Created attachment 9412 
Patch that adds the option of cycling through all windows in the current workspace

This patch adds the fix provided by GreyAlien502 (https://github.com/iglosiggio/xfwm4/commit/d9874d75bd8a7df0aa594b8528f8f521f9014ffb#r33866008). I currently do not have a multi-monitor setup to test it.
Comment 13 Ignacio Losiggio 2020-01-30 22:29:11 CET
(In reply to Nilesh from comment #10)
> 
> It works for most of the part but found something buggy. Attaching a video,
> have a look at 0:25. It did not work properly for some cases.
> 
> https://imgur.com/a/1LD62As

I've updated the patch with a possible fix. I do not have a multi-monitor setup to test it. Tell me if it helped :)

https://bugzilla.xfce.org/attachment.cgi?id=9412
Comment 14 Ignacio Losiggio 2020-01-30 22:32:47 CET
If you try to merge the patch it wouldn't work (i've rebased the branch to upstream/master). Cherry picking my branch works.

`git cherry-pick iglosiggio/8865-dual-screen-cycling`
Comment 15 Nilesh 2020-01-31 06:34:39 CET
Tried it, and the bug seems to be resolved :)
Comment 16 Ignacio Losiggio 2020-01-31 06:37:56 CET
Yay! Now we need to ask someone on the xfce team to review the patch in hopes of upstreaming it.
Comment 17 Öyvind Saether 2020-02-01 03:48:02 CET
Created attachment 9416 
The patch works fine on my desktop.

I have tested the patch and it appears to work as advertised. The new "Cycle only through windows in the active monitor" setting under "Cycling" in "Window manager Tweaks" works as advertised on a 3 monitor setup.

I don't like that feature and I am not going to use it so it is nice that it is disabled by default. It is also nice that the feature is there in case I change my mind.

I do wonder if the comment "Estos son datos basura que no voy a usar" (something about junk data?) in the patch could/should be in English not Spanish. I'm personally fine with it.

I see no reason why this can't be merged as-is to those who want the feature can have it.
Comment 18 Ignacio Losiggio 2020-02-01 05:50:32 CET
Yup, that "datos basura" is an unneeded spanish comment saying that some data is not used.

My native language is Spanish.

If someone upstream wants to merge the patch I will clean the code if necessary!
Comment 19 Git Bot editbugs 2020-05-29 11:49:50 CEST
-- GitLab Migration Automatic Message --

This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/xfce/xfwm4/-/issues/78.

Please create an account or use an existing account on one of our supported OAuth providers. 

If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests

Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev

Bug #8865

Reported by:
Andrzej
Reported on: 2012-05-10
Last modified on: 2020-05-29

People

Assignee:
Olivier Fourdan
CC List:
4 users

Version

Version:
unspecified

Attachments

Additional information