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

floating application started on the wrong (not focused) monitor #8449

Open
mm1ke opened this issue Nov 11, 2024 · 3 comments
Open

floating application started on the wrong (not focused) monitor #8449

mm1ke opened this issue Nov 11, 2024 · 3 comments
Labels
bug Not working as intended
Milestone

Comments

@mm1ke
Copy link

mm1ke commented Nov 11, 2024

Please fill out the following:

output DP-1 render_bit_depth 10 pos 0 0 mode [email protected] bg $swaywalls/wallpaper-main fill
output DP-2 pos 3840 -1250 transform 90 mode [email protected] bg $swaywalls/wallpaper-right fill

Since the update to 1.10, sway mixed the workspace and put workspace 1 at monitor DP-2, and workspace 2 at monitor DP-1
I've fixed that with adding following:

workspace 1 output DP-1
workspace 2 output DP-2

However, the focus is still wrong, even with setting focus output DP-1, after the initial login, the mouse appears on DP-2
I'm not sure if that information is relevant, but i thougt i'm going to include it.

The real issue is that usually, $drun should open on the focues monitor. $drun is in my case tofi.
If there are no open application this works as expected, if there is kitty open on both monitor, tofi always open on DP-1 - even if kitty on DP-2 is focus. Starting a application would however open it on the right monitor. It's just that tofi is placed wrong.

Interestingly, this is not always the case. Having for example firefox open on DP-2 would also open tofi correctly on DP-2 (if the focus is there). I made some tests:

DP-1: empty, DP-2: empty -> tofi always starts on focused monitor (expected behavior)
DP-1: kitty, DP-2: empty -> tofi always starts on focused monitor (expected behavior)
DP-1: empty, DP-2: kitty -> tofi always starts on focused monitor (expected behavior)
DP-1: kitty, DP-2: kitty -> tofi always starts on DP-1
DP-1: kitty, DP-2: firefox -> tofi always starts on focused monitor (expected behavior)
DP-1: kitty, DP-2: pcmanfm-qt -> tofi always starts on DP-1
DP-1: kitty, DP-2: spicy (floating app) -> tofi always starts on DP-1

Another interesting thing is that if i change tofi with something else like spicy - which is another floating app - it seems to work as expected. (but I haven't test too much)

Not sure it the debug logs helps, i've tried to test a few times the behavior while it was running.
Unfortunately this is also a regression of 1.10. There are no issues with 1.9. Please let me know if you need any further information.

@mm1ke mm1ke added the bug Not working as intended label Nov 11, 2024
@emersion
Copy link
Member

emersion commented Nov 12, 2024

This comment is not helpful. Please refrain from posting such comments (and keep in mind we're all volunteers here).

Edit: the comment this was replying to has been deleted.

@mukul1729
Copy link

This comment is not helpful. Please refrain from posting such comments (and keep in mind we're all volunteers here).

I am sorry if you didnt find it right, sway is great and I still use it as my daily driver but I will share the whole workflow video please take a look.

  1. Before 1.10 the workspace 1 was my laptop and workspace 2 was my Monitor. When the system would start all my applications would open only on workspace 2 which is my monitor but as u can see its actually mirroring everything i do on both the displays

  2. You can see in the video that i cannot interact with anything on my monitor using the mouse pointer , i have to get the pointer to my laptop screen first and only then i can interact with anything, I only use the defaults sway settings and no custom config for workspaces.

  3. Cannot send any window to any other output. Everything works when i run the command swaymsg reload.
    https://github.com/user-attachments/assets/7a0ff8a1-a67b-42f9-b2ce-7b63944a4da6

@FlowingMercury
Copy link

FlowingMercury commented Nov 19, 2024

I'm having the same issue, I have three monitors and the upgrade to 1.10 effectively reversed the order they were initialized in. Essentially sway thinks my leftmost monitor is on the right and my rightmost is on the left, which is really cumbersome when I try moving my cursor to other monitors.

I'm able to fix this by setting the monitor positions manually in the sway config as so:

output DP-1 mode [email protected] pos 0 0
output DP-2 mode [email protected] pos 2560 0
output HDMI-A-1 mode [email protected] pos 4480 0

This would be the end of my problems as it fixes the layout issue. However, sway thinks HDMI-A-1 is the main monitor / Screen 0 because it is initialized first. So whenever I load a game on steam it always starts at 1080p even on my 1440p monitor, which I now have to change manually in every game I run.

I can also fix that issue by turning my monitors off and on in the order I want them initialized in but this is obviously far from ideal and not an actual solution to the problem.

@emersion emersion added this to the 1.10.1 milestone Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not working as intended
Development

No branches or pull requests

4 participants