try _NET_CLIENT_LIST if _NET_CLIENT_LIST_STACKING doesn't work - #62
Conversation
|
I have tested it on another PC and now I get the error message again. I need to analyze why it happens. |
|
Hi do you have any news on this? It would be really cool to use dwm with jumpapp :) |
|
For me it works well with the limitation that I can't toggle between windows of the same application. But I use only one Firefox window and one terminal window (with tmux/byobu) anyway. If this is okay for you, you can simply clone/download my bugfix branch: https://github.com/MaxGyver83/jumpapp/tree/feature/better-dwm-support |
mkropat
left a comment
There was a problem hiding this comment.
Thanks for the PR! Good explanation in your description. Even if the behavior isn't perfect, it seems good enough (not to mention better than how it works today on dwm), so I'm going to go ahead and merge this.
Maybe I'll let it sit in master for a little bit to see if anyone discovers issues with this change, and if all is quiet I'll draft a new release with this change so it's in the easily downloaded version.
| list_stacking_order() { | ||
| local name ids | ||
| read -r name ids < <(xprop -root ' $0+\n' _NET_CLIENT_LIST_STACKING) | ||
| if [[ "$ids" == 'not found.' ]] || [[ "$ids" =~ 'no such atom' ]]; then |
There was a problem hiding this comment.
Thanks for testing this on multiple machines to catch the multiple messages. Another idea is instead of trying to match on specific error messages, we could invert the match and look for something that only appears in the success output (maybe (WINDOW) or 0x?). I like what you have though, let's try it and see if anyone reports issues.
BTW I double checked to see if we could use the process return status code, but it looks like it's always 0 whether the property exists or not.
In window managers that don't support _NET_CLIENT_LIST_STACKING (dwm), jumpapp emit this error message:
With this PR, jumpapp queries _NET_CLIENT_LIST when _NET_CLIENT_LIST_STACKING doesn't contain any values. This fixes #54 in a sense that this error message doesn't occur anymore.
But it still doesn't work as expected. When you run
jumpapp firefox:When firefox is not active, jumpapp brings you always to the firefox window created first. (Without this PR, the firefox window created last.) Maybe dwm doesn't update _NET_CLIENT_LIST. Nevertheless, I think this PR brings an improvement to dwm users.