Window Position Changes on Image Load / Refresh
This issue seems a bit more involved than my prior PRs, and is partially related to GLFW limitations, so I wanted to discuss it here first.
At least on Windows, if you have the tev window open on a separate monitor and try to load or refresh an image, it will move the tev window back to the primary monitor.
This is caused by ``ImageViewer::resizeToFit()``, where ``set_size()`` and ``move_window()`` cause GLFW to resize / move the window in the primary monitor. Part of the issue is that the window has a null monitor pointer, and GLFW still has no way to get the window's current monitor. I saw that this has been discussed before in #362. The cleanest solution is probably to fix glfw/glfw#1699 and update the logic accordingly.
I'm mainly opening the issue for visibility. I think this issue could be fixed by calling ``move_window()`` with the corresponding offset, and I'm happy to help with this fix if it's desired, although I don't quite understand the workarea clamping logic going on in that function. But maybe it's more efficient to just work on the GLFW issue...
8 条评论