-
Notifications
You must be signed in to change notification settings - Fork 44
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
bspwm. tdrop opens the application on wrong desktop (bspc-monitor) #369
Comments
I think there should be the following logic:
Now, when you close the window, tdrop remembers the desktop number and tries to open the application THERE the next time you call it. Why? |
Author said about this: "windowmap does not activate for all window managers" |
I created a pull request for fix this: #370 |
I will investigate if there is some more generic solution. If not, I will merge your PR. Thanks! |
Hi! How’s the progress with the solution? I would be glad to merge my PR. Thanks! |
Ping me in a week again if I haven't looked into it yet. |
Just for context, I was using bspwm at the time and this was intended to fix this issue for bspwm. I can't reproduce the issue on bspwm 0.9.10. Does it happen every time or inconsistently? Maybe some sleep time is needed for bspwm. What version of bspwm are you on? If I use #370, it no longer works correctly for me on bspwm (the dropdown shows up but is not focused). |
I'm on 0.9.10 version of bspwm. I added a changed version of tdrop (as in my PR) in Just now I checked again if tdrop with
Every time. If you kill dropdown (process), with next call, it will display correctly. But if you just "hide" dropdown, it will display on desktop where you hided it (not current) |
Does this happen with every program? Are there any steps to reproduce? I tried on multiple desktops and with desktops on multiple monitors but could not reproduce. Could you link me to your config or post it here? |
Yes, with every program that i tried.
I uploaded video with demonstration on YouTube: https://youtu.be/c-h0TWy8rcQ |
Yes, of course! I've just published it: https://github.com/peskovdev/dotfiles |
Is your bspwmrc there somewhere (or do you not have one)? I didn't see it. My only guess right now for why this happens for others but not me is some difference in settings. Also, what does I have a few suggestions you can try:
# increase sleep time if it still doesn't work
sleep 0.05
xdotool windowactivate "$wid" 2> /dev/null |
I have separated config, so my bspwmrc on another branch. If you would like to see not separated config, it's my friend's config, we tested this bag on his computer, and there are the same problem. xdotool version: 3.20211022.1 And about suggestions, I'll try this steps a little bit later, ty |
is there any update on this issue, i tried @peskovdev fixed but it didnt work for me
this is the command i use I tried adding --sync as @noctuid said after every windowmap and it worked |
Sorry for the delay. Also, I have updated the PR. I think we can close this issue. |
This will ensure that tdrop waits until the window is mapped before activating it. Otherwise tdrop can incorrectly focus another desktop. Fixes issue noctuid#369
Thanks all! |
This worked! I just wanted to make the solution clear for those that have not got the updated package:
map_and_reset_geometry() {
if [[ -n $width ]] && [[ -n $height ]] && [[ -n $xoff ]] \
&& [[ -n $yoff ]]; then
xdotool windowmap --sync "$wid" windowmove "$wid" "$xoff" "$yoff" \
windowsize "$wid" "$width" "$height" 2> /dev/null
elif [[ -n $width ]] && [[ -n $height ]]; then
xdotool windowmap --sync "$wid" windowsize "$wid" "$width" "$height" \
2> /dev/null
elif [[ -n $xoff ]] && [[ -n $yoff ]]; then
xdotool windowmap --sync "$wid" windowmove "$wid" "$xoff" "$yoff" \
2> /dev/null
else
xdotool windowmap --sync "$wid" 2> /dev/null
fi
# windowmap does not activate the window for all window managers;
# windowactivate should be run separately after windowmap --sync or it can
# activate a window on another desktop on some window managers (e.g. bspwm)
xdotool windowactivate "$wid" 2> /dev/null
}
|
tdrop is not my package and is not supported or recommended. Use tdrop-git. |
In order to reproduce this bug, do the following:
tdrop -am -h 60% -w 50% -y 25 -x 25% app
tdrop -am -h 60% -w 50% -y 25 -x 25% app
again for opening on NEW monitorYou can see example here
The text was updated successfully, but these errors were encountered: