valinet / sws

sws (Simple Window Switcher) is an Alt-Tab replacement for Windows
GNU General Public License v2.0
66 stars 9 forks source link

Add border for not rounded corner #3

Open jdp1024 opened 2 years ago

jdp1024 commented 2 years ago

Just a suggestion, to distingiush sws from the background content.

--- a\SimpleWindowSwitcher\sws_WindowSwitcher.c 2022-01-05 15:22:02.000000000 +0800
+++ b\SimpleWindowSwitcher\sws_WindowSwitcher.c 2022-01-05 15:22:51.000000000 +0800
@@ -661,12 +661,17 @@
             bi.bmiHeader.biPlanes = 1;
             bi.bmiHeader.biBitCount = 32;
             bi.bmiHeader.biCompression = BI_RGB;
             StretchDIBits(hdcPaint, 0, 0, siz.cx, siz.cy, 0, 0, 1, 1, &bkcol, &bi, DIB_RGB_COLORS, SRCCOPY);
         }

+        if (_this->dwCornerPreference == 1)
+        {
+           _sws_WindowSwitcher_DrawContour(_this, hdcPaint, rc, SWS_CONTOUR_INNER, 1, bkcol);
+        }
+
         // Draw highlight rectangle
         if (pWindowList)
         {
             _sws_WindowSwitcher_DrawContour(_this, hdcPaint, pWindowList[_this->layout.iIndex].rcWindow, SWS_CONTOUR_INNER, SWS_WINDOWSWITCHER_CONTOUR_SIZE, bkcol);
         }