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

Persistent geometry in changing multi-screen environment #39

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

Persistent geometry in changing multi-screen environment #39

mtaki14 opened this issue Apr 12, 2016 · 10 comments

Comments

@mtaki14
Copy link

@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
Copy link
Member

@polyvertex 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
Copy link
Author

@mtaki14 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
Copy link
Member

@polyvertex 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
Copy link
Author

@mtaki14 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
Copy link
Member

@polyvertex polyvertex commented Apr 16, 2016

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

@mtaki14
Copy link
Author

@mtaki14 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 More robust way to remember screen position Persistent geometry in multi-screen environment Apr 17, 2016
@mtaki14
Copy link
Author

@mtaki14 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 Persistent geometry in multi-screen environment 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
Copy link
Member

@polyvertex 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
Copy link
Member

@polyvertex 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
Copy link
Member

@polyvertex 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.