Originally created by @markgeejw on GitHub (Jul 16, 2022).
Hi! Thanks for this great project!
I noted that you had implemented cross-monitor focus/move with #165, but it wasn't working for me, which seems to be due to scaling.
Setup:
Left monitor is 4k scaled at 225%
Right monitor is 1440p scaled at 150%
After digging into the code a little, it seems that the condition for monitor_index_in_direction was not being met due to the monitor sizes not lining up. Using komorebic state, I noted that my left monitor was reporting {left: -2560, right: 1707} and my right monitor {left: 0, right: 1707}. If I set both monitors scaling to 100%, everything works great, with the monitor sizes being reported correctly and cross-monitor focus working. Seems to be something to do with how Windows is reporting monitor size information.
I tried digging into the Windows API a little but couldn't find the problem.
Originally created by @markgeejw on GitHub (Jul 16, 2022).
Hi! Thanks for this great project!
I noted that you had implemented cross-monitor focus/move with #165, but it wasn't working for me, which seems to be due to scaling.
Setup:
- Left monitor is 4k scaled at 225%
- Right monitor is 1440p scaled at 150%
After digging into the code a little, it seems that the condition for `monitor_index_in_direction` was not being met due to the monitor sizes not lining up. Using `komorebic state`, I noted that my left monitor was reporting `{left: -2560, right: 1707}` and my right monitor `{left: 0, right: 1707}`. If I set both monitors scaling to 100%, everything works great, with the monitor sizes being reported correctly and cross-monitor focus working. Seems to be something to do with how Windows is reporting monitor size information.
I tried digging into the Windows API a little but couldn't find the problem.
I have just tested this with two monitors at different scaling percentages between 100 and 200 on both monitors and I was able to both focus and move across monitor boundaries. I typically have 125% on my main monitor and 150% on my secondary monitor and I haven't noticed this before.
Running komorebic state | jq '.monitors.elements[].size' I get the following output:
Which matches up with what I see in my display settings (with the array ordering matching the numerical order given in the settings UI):
Using komorebic state, I noted that my left monitor was reporting {left: -2560, right: 1707} and my right monitor {left: 0, right: 1707}
From reading this, it seems like your left monitor is not being recognized in the display arrangement settings as being the left-most monitor, because left is not 0.
Can you report back with the output of the above command which uses jq to extract the monitor sizes in order and the numerical order and layout given by Windows in the display settings UI?
@LGUG2Z commented on GitHub (Jul 16, 2022):
I have just tested this with two monitors at different scaling percentages between 100 and 200 on both monitors and I was able to both `focus` and `move` across monitor boundaries. I typically have 125% on my main monitor and 150% on my secondary monitor and I haven't noticed this before.
Running `komorebic state | jq '.monitors.elements[].size'` I get the following output:
```json
{
"left": 0,
"top": 0,
"right": 3072,
"bottom": 1728
}
{
"left": 3840,
"top": 427,
"right": 1916,
"bottom": 1332
}
```
Which matches up with what I see in my display settings (with the array ordering matching the numerical order given in the settings UI):

> Using `komorebic state`, I noted that my left monitor was reporting `{left: -2560, right: 1707}` and my right monitor `{left: 0, right: 1707}`
From reading this, it seems like your left monitor is not being recognized in the display arrangement settings as being the left-most monitor, because `left` is not `0`.
Can you report back with the output of the above command which uses `jq` to extract the monitor sizes in order and the numerical order and layout given by Windows in the display settings UI?
and the numerical order and layout given by Windows in the display settings UI?
But even when I switch the main display to the left monitor it still doesn't work.
@markgeejw commented on GitHub (Jul 17, 2022):
I think it's because I use my right monitor as my main display.
> Can you report back with the output of the above command which uses jq to extract the monitor sizes in order
```
{
"left": 0,
"top": 0,
"right": 1707,
"bottom": 960
}
{
"left": -2560,
"top": -271,
"right": 1707,
"bottom": 960
}
```
> and the numerical order and layout given by Windows in the display settings UI?
<img width="731" alt="image" src="https://user-images.githubusercontent.com/19712422/179381533-ca1907d3-39b5-42b1-ae7c-f3eb0814a903.png">
But even when I switch the main display to the left monitor it still doesn't work.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @markgeejw on GitHub (Jul 16, 2022).
Hi! Thanks for this great project!
I noted that you had implemented cross-monitor focus/move with #165, but it wasn't working for me, which seems to be due to scaling.
Setup:
After digging into the code a little, it seems that the condition for
monitor_index_in_directionwas not being met due to the monitor sizes not lining up. Usingkomorebic state, I noted that my left monitor was reporting{left: -2560, right: 1707}and my right monitor{left: 0, right: 1707}. If I set both monitors scaling to 100%, everything works great, with the monitor sizes being reported correctly and cross-monitor focus working. Seems to be something to do with how Windows is reporting monitor size information.I tried digging into the Windows API a little but couldn't find the problem.
@LGUG2Z commented on GitHub (Jul 16, 2022):
I have just tested this with two monitors at different scaling percentages between 100 and 200 on both monitors and I was able to both
focusandmoveacross monitor boundaries. I typically have 125% on my main monitor and 150% on my secondary monitor and I haven't noticed this before.Running
komorebic state | jq '.monitors.elements[].size'I get the following output:Which matches up with what I see in my display settings (with the array ordering matching the numerical order given in the settings UI):
From reading this, it seems like your left monitor is not being recognized in the display arrangement settings as being the left-most monitor, because
leftis not0.Can you report back with the output of the above command which uses
jqto extract the monitor sizes in order and the numerical order and layout given by Windows in the display settings UI?@markgeejw commented on GitHub (Jul 17, 2022):
I think it's because I use my right monitor as my main display.
But even when I switch the main display to the left monitor it still doesn't work.