A minor glitch in Experimental mode

Started by Mees Dekker, April 04, 2024, 09:07:48 AM

Previous topic - Next topic

Mees Dekker

Since release 2023.8 it seems that Imatch no longer fills the entire screen. A very small border is left at the bottom, left and righthand side of the screen, but only when in experimental mode. This causes a border of approx 3-4 pixels where one sees the chosen Windows background (which in my case results in a white and light blue border around the full IMatch  window).

When experimental features are disabled, these borders disappear.

I have two monitors, each 1920 x 1200. W11

hro

I experience the same behaviour on a 4k monitor.

Mario

No idea.
The border around the main IMatch window is drawn by Windows.
When I make IMatch to use a red border, I can clearly see it.

When Windows maximizes the IMatch window, it appears to reserve some pixels around the window for a border, but then does not paint it. This is why the background shows through.

I can repro this and spent two hours searching for a solution. I've found several reports, but no way to deal with it.
I had the idea to make the window a bit larger when maximizing, but this does not play well with multi-monitor systems, where the IMatch window then "bleeds" into the other monitor.

This trick also worked only for specific DPIs and resolutions. For example, on my 4K 150% DPI screen, adding to pixels to the left, right and bottom of the window worked. On a monitor with 1920 x 1080 pixel, however, this still left a 1 pixel border on the left where the background shines though.

Not sure how to tackle this. This is one of the things that can take hours or days to figure out - without a guarantee for a positive result in the end.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

Fix it. Kinda.
When Windows sends a specific message (WM_NCCALCSIZE) IMatch checks if the window is maximized.
And if this is the case, IMatch corrects the 'off' coordinates by getting the actual "monitor work rect" from Windows and then using the left, right and bottom coordinates.

For example, when maximizing the window on my 4K monitor, Windows calculates a left coordinate of +2, a right of 3851 and a bottom coordinate of 2099. All 3 values are off by 2 pixels. The left window border should be at coordinate 0 in full-screen mode, not at 2 pixels.

This seems to work fine. Except, on my second monitor, despite the math being correct now, a one pixel transparent border is visible on the left side of the maximized window. But only on the second monitor and independent on the screen resolution I configure for it (1920, 2560, 3840). Probably one of those Windows desktop manager things or whatnot. Or a graphic driver thing. No idea.

I don't want to hard-code subtracting one extra pixel, since this could cause the IMatch window bleeding in secondary or tertiary screens, depending on the screen layout.

I consider this as fixed and good enough for now.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook