baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.71k stars 416 forks source link

Last focused desktop still has `focused` state when cycling to desktop on another monitor #722

Open scallyw4g opened 6 years ago

scallyw4g commented 6 years ago

Long-time and happy BSPWM user here - thank you for all your work on this project.

I would like to confirm that the WM is not running under the assumption that there are N focused desktops at a time, where N is the number of monitors.

I recently updated (after a few years) to the current build, and had a tough time deciphering why I was getting 2 desktops reported as Focused Occupied when calling bspc subscribe, which is denoted as a capital O. This manifested in lemonbar, which resulted in two desktops looking focused

It seems to me that the focused status is not being removed from the last desktop when cycling through desktops using bspc desktop -f {left,right}, and when the next/prev desktop is on a different monitor than the current one. I took a look and ran the tests (which seem out of date), and took a cursory look at the source code to see if I could quickly spot the problem.

Before going further I would like someone to confirm/deny my theory that this is in fact a bug and not introduced as a feature.

If necessary, I could try and write a test case for it, but since the tests are already failing I'm not sure this would be wise at the current moment.

Anyhow, happy Canadian Thanksgiving :)

baskerville commented 6 years ago

If a desktop is labelled with an uppercase letter within a monitor labelled with a lowercase m, it means it's active (and not focused).

But it's true that the default panel uses the same color for the focused and active desktops.

baskerville commented 6 years ago

The tests shouldn't fail. Have you followed the instructions given in tests/README.md?

scallyw4g commented 6 years ago

Ahh, in that case the comments and $COLORFOCUSED* variables in examples/panel_bar are slightly misleading. I interpereted the capital O as a focused desktop, not active.

As far as the tests go, I installed jshon from the official arch-linux repos, version 20131105-1 as reported by pacman, ran make and ./run . The Insertion tests seem to fail for a variety of reasons. I've attached screenshots of the test failures.

insertion-fail insertion-fail-windows

baskerville commented 6 years ago

I interpereted the capital O as a focused desktop, not active.

O can mean active if it follows m.

I'll try to address that.

The Insertion tests seem to fail for a variety of reasons.

The tests of the git repo won't work with version 0.9.3.

scallyw4g commented 6 years ago

Sweet, thanks for your help. I also noticed the VERSION file says 0.9.3, which doesn't match the output of ./bspwm -v

Again, thanks a lot for your help and time spent on this project. I love it.