Skip to content
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

Jumping desktop focus. #30

Closed
Liupold opened this issue Aug 2, 2020 · 8 comments
Closed

Jumping desktop focus. #30

Liupold opened this issue Aug 2, 2020 · 8 comments
Assignees

Comments

@Liupold
Copy link
Owner

Liupold commented Aug 2, 2020

Focus is jumping from one desktop to another during toggle.

Steps to reproduce:

  • Open a window at any given desktop(say x) (from terminal)
  • Move the window to other desktop.(say y)
  • Close the window (at y). Focus should stay at y, but moving to x.
@Liupold
Copy link
Owner Author

Liupold commented Aug 2, 2020

bspwm specific instruction is not working, i think it's a lot of work to maintain that, IMO we should drop that, using windowmap the window get dynamically placed (better) user can specify the placement of the window using.

bspc node -p {west,south,north,east}

Liupold added a commit that referenced this issue Aug 2, 2020
@Liupold
Copy link
Owner Author

Liupold commented Aug 2, 2020

This is sort of fixed but the window is getting resized improperly after vomit, And the toggle window is not resizing to account for others. (Using BSPWM specific recommendations).

@Liupold
Copy link
Owner Author

Liupold commented Aug 2, 2020

The only thing that is sub optimal is preglue_hook. I can live without that, Everything else is working much better without BSPWM recommendation.

@SeerLite
Copy link
Collaborator

SeerLite commented Aug 2, 2020

This is sort of fixed but the window is getting resized improperly after vomit, And the toggle window is not resizing to account for others. (Using BSPWM specific recommendations).

What about checking for the current desktop before moving?

diff --git a/pidswallow b/pidswallow
index a990855..b377a17 100755
--- a/pidswallow
+++ b/pidswallow
@@ -43,6 +43,7 @@ vomit() {
 
         [ -f "/tmp/swallowed-by-$cwid-desk" ] \
                 && desk=$(cat /tmp/swallowed-by-"$cwid"-desk) && \
+                [ "$(xdotool get_desktop_for_window "$pwid")" -ne "$desk" ] && \
                 xdotool set_desktop_for_window "$pwid" "$desk"
         [ -f "/tmp/swallowed-by-$cwid-pos" ] \
                 && cpos=$(cat /tmp/swallowed-by-"$cwid"-pos) && \

Edit: a451448

@SeerLite
Copy link
Collaborator

SeerLite commented Aug 2, 2020

The only thing that is sub optimal is preglue_hook. I can live without that, Everything else is working much better without BSPWM recommendation.

I'm not sure I understand heh

@SeerLite
Copy link
Collaborator

SeerLite commented Aug 2, 2020

bspwm specific instruction is not working, i think it's a lot of work to maintain that, IMO we should drop that, using windowmap the window get dynamically placed (better) user can specify the placement of the window using.

bspc node -p {west,south,north,east}

Personally I don't like this approach. My idea of swallowing is that windows should occupy the exact same place as the child that swallowed them.
A plus would be that the parent (swallowed) window regains focus (only) if the child was focused when it was closed. Not sure how to implement this though

@Liupold
Copy link
Owner Author

Liupold commented Aug 3, 2020

It is doing that except for the window state, and for doing just this a loooot of thing had to be coincided. (With bspwn specific recommendation). Call me crazy but I think it will be really hard to maintain,

What I suggest:
* Drop SWALLOW_CMD , VOMIT_CMD , PREGLUE_HOOK

  • not using -f in bspwm hide cmd. (This doesn't focus parent but no jumping around).

@Liupold Liupold closed this as completed Aug 3, 2020
Liupold referenced this issue Aug 3, 2020
Also remove `-f` from bspwm example
@SeerLite
Copy link
Collaborator

SeerLite commented Aug 3, 2020

  • not using -f in bspwm hide cmd. (This doesn't focus parent but no jumping around).

Actually that's exactly what I did in a451448 haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants