Open dcnieho opened 1 year ago
See https://github.com/pthom/imgui_bundle/issues/7#issuecomment-1296977345 for python code for handling dragging between differen monitors. Same logic would apply in C++ (but be simpler to implement)
And last note: I'm happy to test anything you implement (I have a setup with two screens with different DPI), using the Windows build artefacts.
Added some code to handle this. What about case if window is partially in one monitor and in another monitor?
There is no right solution to that case as far as i am aware. My example code (that i posted at the link above) determines with which monitor the window has most overlap and sets the window's scaling to that monitor's. This seems to be similar to what Microsoft programs here on Windows do.
Will test your new code today or tomorrow.
On Tue, Nov 1, 2022 at 12:25 PM Paul B Mahol @.***> wrote:
Added some code to handle this. What about case if window is partially in one monitor and in another monitor?
— Reply to this email directly, view it on GitHub https://github.com/richardpl/lavfi-preview/issues/5#issuecomment-1298380820, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANUOGMDY7BSN6YMBSTK5CTWGD437ANCNFSM6AAAAAARS7CKWQ . You are receiving this because you authored the thread.Message ID: @.***>
Works, stuff is nicely scaled now :)
On Tue, Nov 1, 2022 at 1:21 PM Diederick C. Niehorster @.***> wrote:
There is no right solution to that case as far as i am aware. My example code (that i posted at the link above) determines with which monitor the window has most overlap and sets the window's scaling to that monitor's. This seems to be similar to what Microsoft programs here on Windows do.
Will test your new code today or tomorrow.
On Tue, Nov 1, 2022 at 12:25 PM Paul B Mahol @.***> wrote:
Added some code to handle this. What about case if window is partially in one monitor and in another monitor?
— Reply to this email directly, view it on GitHub https://github.com/richardpl/lavfi-preview/issues/5#issuecomment-1298380820, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANUOGMDY7BSN6YMBSTK5CTWGD437ANCNFSM6AAAAAARS7CKWQ . You are receiving this because you authored the thread.Message ID: @.***>
I'm using a hidpi screen and lavfi-preview is not hidpi aware (I'm using Windows 10). That means everything is super small. In my own imgui+glfw c++ program, I handle this as follows, feel free to copy and adapt in case you'd like to fix this:
This of course does not handle the case of dragging the gui between screens with different dpi, but its something at least.