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

Persistent geometry in changing multi-screen environment #39

Closed
mtaki14 opened this Issue Apr 12, 2016 · 10 comments

Comments

Projects
None yet
2 participants
@mtaki14

mtaki14 commented Apr 12, 2016

This is just a minor annoyance, but whenever switching from a smaller to a bigger screen KP awkwardly changes position. Just wondering if there's a more robust way to save the screen position, for example relative to the screen's edges.

@polyvertex

This comment has been minimized.

Show comment
Hide comment
@polyvertex

polyvertex Apr 12, 2016

Member

Does it mean you are in a multi-screen environment?
What do you mean by changes position?
"Provide step-by-step instructions so we can reproduce the issue"

Member

polyvertex commented Apr 12, 2016

Does it mean you are in a multi-screen environment?
What do you mean by changes position?
"Provide step-by-step instructions so we can reproduce the issue"

@mtaki14

This comment has been minimized.

Show comment
Hide comment
@mtaki14

mtaki14 Apr 14, 2016

At the moment I use a 19" monitor at work connected to my laptop and extend the screen to both. I use KP on the 19" monitor and leave it at around the middle of the screen.

When I go home I connect my laptop to a 24" screen, but do NOT extend the screen on both. I just use the 24" screen. But once the system starts KP appears at around the bottom left of the screen (I'll have to confirm this once I get home) and I have to readjust its position.

mtaki14 commented Apr 14, 2016

At the moment I use a 19" monitor at work connected to my laptop and extend the screen to both. I use KP on the 19" monitor and leave it at around the middle of the screen.

When I go home I connect my laptop to a 24" screen, but do NOT extend the screen on both. I just use the 24" screen. But once the system starts KP appears at around the bottom left of the screen (I'll have to confirm this once I get home) and I have to readjust its position.

@polyvertex

This comment has been minimized.

Show comment
Hide comment
@polyvertex

polyvertex Apr 14, 2016

Member

Could you copy all the log lines starting with Monitor # for each your "home" and "work" config? KP logs them only when started. There might be several Monitor # lines per hardware/docking config, so copy all of them for each config. Separated.

They look like: Monitor #1: Name[\\.\DISPLAY1] Rect[0, 0, 1920, 1200] DpiScale[1.00] PRIMARY

Member

polyvertex commented Apr 14, 2016

Could you copy all the log lines starting with Monitor # for each your "home" and "work" config? KP logs them only when started. There might be several Monitor # lines per hardware/docking config, so copy all of them for each config. Separated.

They look like: Monitor #1: Name[\\.\DISPLAY1] Rect[0, 0, 1920, 1200] DpiScale[1.00] PRIMARY

@mtaki14

This comment has been minimized.

Show comment
Hide comment
@mtaki14

mtaki14 Apr 16, 2016

Work:
Monitor 1: Name[.\DISPLAY1] Rect[0, 0, 1366, 768] DpiScale[1.00] PRIMARY
Monitor 2: Name[.\DISPLAY2] Rect[-1366, 0, 0, 768] DpiScale[1.00]

Home:
Monitor 1: Name[.\DISPLAY1] Rect[0, 0, 1920, 1200] DpiScale[1.00] PRIMARY

mtaki14 commented Apr 16, 2016

Work:
Monitor 1: Name[.\DISPLAY1] Rect[0, 0, 1366, 768] DpiScale[1.00] PRIMARY
Monitor 2: Name[.\DISPLAY2] Rect[-1366, 0, 0, 768] DpiScale[1.00]

Home:
Monitor 1: Name[.\DISPLAY1] Rect[0, 0, 1920, 1200] DpiScale[1.00] PRIMARY

@polyvertex

This comment has been minimized.

Show comment
Hide comment
@polyvertex

polyvertex Apr 16, 2016

Member

Which one is the 19" monitor on your work config?

Member

polyvertex commented Apr 16, 2016

Which one is the 19" monitor on your work config?

@mtaki14

This comment has been minimized.

Show comment
Hide comment
@mtaki14

mtaki14 Apr 16, 2016

The "PRIMARY" one. It's a old monitor with a low resolution threshold as you can see :/

mtaki14 commented Apr 16, 2016

The "PRIMARY" one. It's a old monitor with a low resolution threshold as you can see :/

@polyvertex polyvertex changed the title from More robust way to remember screen position to Persistent geometry in multi-screen environment Apr 17, 2016

@mtaki14

This comment has been minimized.

Show comment
Hide comment
@mtaki14

mtaki14 Apr 18, 2016

Have you managed to reproduce the behaviour described?

mtaki14 commented Apr 18, 2016

Have you managed to reproduce the behaviour described?

@polyvertex polyvertex added this to the v2.5.3 milestone Apr 22, 2016

@polyvertex polyvertex closed this Apr 22, 2016

@polyvertex polyvertex changed the title from Persistent geometry in multi-screen environment to Persistent geometry in changing multi-screen environment Apr 24, 2016

@polyvertex polyvertex modified the milestones: next, v2.5.3 Apr 24, 2016

@polyvertex polyvertex reopened this Apr 24, 2016

@polyvertex polyvertex removed this from the next milestone Apr 24, 2016

@polyvertex

This comment has been minimized.

Show comment
Hide comment
@polyvertex

polyvertex May 5, 2016

Member

I took some time for this one. Microsoft's API documentation is almost inexistant when it comes to changing multi-screen environments. I addressed this issue partly in v2.5.3 but changes do not really apply to your use-case since KP always runs on the same machine.

Which means I actually have to make extensive tests with different screen configurations myself to see how Windows APIs react, if I want the fix to really work in any situation. Unfortunately I don't have the required hardware for that, I only have a small laptop to work with these days. And putting a VM on it is cumbersome.

Bottom line is, I understand this is inconvenient and this must be fixed, but you'll have to wait for it a bit more unfortunately. Sorry for that.

Member

polyvertex commented May 5, 2016

I took some time for this one. Microsoft's API documentation is almost inexistant when it comes to changing multi-screen environments. I addressed this issue partly in v2.5.3 but changes do not really apply to your use-case since KP always runs on the same machine.

Which means I actually have to make extensive tests with different screen configurations myself to see how Windows APIs react, if I want the fix to really work in any situation. Unfortunately I don't have the required hardware for that, I only have a small laptop to work with these days. And putting a VM on it is cumbersome.

Bottom line is, I understand this is inconvenient and this must be fixed, but you'll have to wait for it a bit more unfortunately. Sorry for that.

@polyvertex

This comment has been minimized.

Show comment
Hide comment
@polyvertex

polyvertex Aug 2, 2016

Member

Starting with next release and if the geometry setting is set to persistent, Keypirinha will record window's position and size according to current monitors setup. If user happens to change their monitors' configuration, KP will check whether this configuration is known (i.e. KP window has already been dragged around before, in persistent mode, while this specific monitors setup was active):

  • If it is (known), KP will just use the last pos and size of the window that was set by the user while being on that monitors config in the past
  • Otherwise, KP will translate and scale the previous pos and size of the window according to the current position and size of the primary monitor, so it feels like the window is positioned the same way than before

EDIT: This mechanism has been implemented for both LaunchBox and Console windows.

Member

polyvertex commented Aug 2, 2016

Starting with next release and if the geometry setting is set to persistent, Keypirinha will record window's position and size according to current monitors setup. If user happens to change their monitors' configuration, KP will check whether this configuration is known (i.e. KP window has already been dragged around before, in persistent mode, while this specific monitors setup was active):

  • If it is (known), KP will just use the last pos and size of the window that was set by the user while being on that monitors config in the past
  • Otherwise, KP will translate and scale the previous pos and size of the window according to the current position and size of the primary monitor, so it feels like the window is positioned the same way than before

EDIT: This mechanism has been implemented for both LaunchBox and Console windows.

@polyvertex polyvertex added status/done and removed status/wip labels Aug 2, 2016

@polyvertex

This comment has been minimized.

Show comment
Hide comment
@polyvertex

polyvertex Aug 20, 2016

Member

Implemented in 2.9

Member

polyvertex commented Aug 20, 2016

Implemented in 2.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment