w32_common: force DWMWA_EXTENDED_FRAME_BOUNDS to work on init#17591
w32_common: force DWMWA_EXTENDED_FRAME_BOUNDS to work on init#17591kasper93 merged 2 commits intompv-player:masterfrom
Conversation
|
@Sneakpeakcss: Please, try this one, if it works fine for you. |
|
This is kind of becoming a cat-and-mouse situation. While this does fix the geometry, it introduces new issues that are even worse imo. Now the opening window animation is completely gone. This seems to be a wanted behaviour for some reason, even though it goes against system settings, but at the same time it is quite confusing because this animation was working fine before and after #16127 was merged. Only this PR changes that. One of the issues is the mentioned white flash, which i can now confirm does really happen, although very rarely when opening But even besides that, there is an even bigger problem. The cursor position is now completely ignored when opening In a multi-monitor setup, opening Now with this fix, |
Always has been. You have no idea how many corner case and annoying behaviors I was fighting with. I've updated the PR to make it do the double resize differently, this should resolve your issue. However I never know when is |
Nice, that fixed it. Thanks for that. And every instance of
You mean like the one where geometry ignores monitor offset when moving between screens? Can we get a fix on that one so i don't get an aneurysm every time i remind myself of it ;) I can somewhat relate, but from a different perspective: https://github.com/Sneakpeakcss/mpv-window-positioning My lovely thingy built on a stacked-up race conditions and the documented no-no of parsing logs, basically the reason why i'm aware of all those weird edge cases that i've mentioned recently. |
I've lost this piece of code when doing rebases or testing. This is needed to correctly calc maximized window size.
DWMWA_EXTENDED_FRAME_BOUNDS is not available before window is shown, so show it off-screen to get correct values. Fixes: mpv-player#16127 (comment)
I can work on things, but I don't have will power to reverse usecases and find what is wrong with them. I need simple steps to reproduce the issue. In your script for example, I don't know why you need to do all those things, instead of saving window state and setting geometry/other props on init next time. |
I've fought with this around a year ago, but going off memory, it's mostly related to how Let's assume a 2 monitor setup: Opening For example, opening it through the taskbar on the secondary monitor with From what i remember, i kinda(?) worked around this by detecting which display is set as primary(0:0) and basically forcing (*)
Now, if you set a monitor 'offset' in Windows Display Settings:
Here you can CLEARLY see that
And if you go back to the So, from my limited understanding, This is basically what killed the idea of simply using Also, i just checked how well does From primary 96dpi to secondary 120dpi [cplayer] Set property: geometry=640x480+1920+0 -> 1
[vo/gpu-next/win32] DPI detected from the new API: 120
[vo/gpu-next/win32] DPI detected from the new API: 96
[vo/gpu-next/win32] Window size changed to: 3840:-10:640:480
[vo/gpu-next/win32] Window size changed to: 1920:0:640:480Well, that pos ain't right… Something, something, edge case. Powodzenia :^) This is great, it basically first jumps to the expected corner of the secondary monitor, and then on DPI change seems to reapply the Unrelated to the geometry issue, mostly ramble related to the script about limitation in a single case that pushed me to parse logs: The other issue i've encountered is one of the listed limitations related to the case where a user moves the window without resizing it, enters The expectation is that the new windowed position (after moving) should be the one it restores to on the next launch. And as far as i gathered, there's no event remotely close to "before entering This basically forced me originally to do the big no-no of parsing verbose logs, because conveniently In the current state, after #16127, it has turned from the no-no of parsing a reliable message into a racey no-no of using the The whole script would be way leaner and less of a hacky mess if |



No description provided.