@@ -318,14 +318,6 @@ gui_mch_set_rendering_options(char_u *s)
318318# define SPI_SETWHEELSCROLLCHARS 0x006D
319319#endif
320320
321- #ifndef DWMWA_CAPTION_COLOR
322- # define DWMWA_CAPTION_COLOR 35
323- #endif
324-
325- #ifndef DWMWA_TEXT_COLOR
326- # define DWMWA_TEXT_COLOR 36
327- #endif
328-
329321#ifdef PROTO
330322/*
331323 * Define a few things for generating prototypes. This is just to avoid
@@ -476,9 +468,6 @@ static int (WINAPI *pGetSystemMetricsForDpi)(int, UINT) = NULL;
476468static DPI_AWARENESS_CONTEXT (WINAPI * pSetThreadDpiAwarenessContext )(DPI_AWARENESS_CONTEXT dpiContext ) = NULL ;
477469static DPI_AWARENESS (WINAPI * pGetAwarenessFromDpiAwarenessContext )(DPI_AWARENESS_CONTEXT ) = NULL ;
478470
479- // Sets the value of Desktop Window Manager (DWM) non-client rendering attributes for a window.
480- static HRESULT (WINAPI * pDwmSetWindowAttribute )(HWND , DWORD , LPCVOID , DWORD ) = NULL ;
481-
482471 static int WINAPI
483472stubGetSystemMetricsForDpi (int nIndex , UINT dpi UNUSED )
484473{
@@ -1602,20 +1591,6 @@ _TextAreaWndProc(
16021591 }
16031592}
16041593
1605- static void
1606- load_dwm_func (void )
1607- {
1608- static HMODULE hLibDwm = NULL ;
1609- hLibDwm = vimLoadLib ("dwmapi.dll" );
1610- if (hLibDwm == NULL )
1611- return ;
1612-
1613- pDwmSetWindowAttribute = (HRESULT (WINAPI * )(HWND , DWORD , LPCVOID , DWORD ))
1614- GetProcAddress (hLibDwm , "DwmSetWindowAttribute" );
1615- }
1616-
1617- extern BOOL win11_or_later ; // this is in os_win32.c
1618-
16191594/*
16201595 * Called when the foreground or background color has been changed.
16211596 */
@@ -1629,21 +1604,6 @@ gui_mch_new_colors(void)
16291604 s_hwnd , GCLP_HBRBACKGROUND , (LONG_PTR )s_brush );
16301605 InvalidateRect (s_hwnd , NULL , TRUE);
16311606 DeleteObject (prevBrush );
1632-
1633- // Set The Caption Bar
1634-
1635- if (pDwmSetWindowAttribute == NULL )
1636- return ;
1637-
1638- if (win11_or_later )
1639- {
1640- const COLORREF captionColor = gui .back_pixel ;
1641- pDwmSetWindowAttribute (s_hwnd , DWMWA_CAPTION_COLOR ,
1642- & captionColor , sizeof (captionColor ));
1643- const COLORREF textColor = gui .norm_pixel ;
1644- pDwmSetWindowAttribute (s_hwnd , DWMWA_TEXT_COLOR ,
1645- & textColor , sizeof (textColor ));
1646- }
16471607}
16481608
16491609/*
@@ -5676,8 +5636,6 @@ gui_mch_init(void)
56765636
56775637 load_dpi_func ();
56785638
5679- load_dwm_func ();
5680-
56815639 s_dpi = pGetDpiForSystem ();
56825640 update_scrollbar_size ();
56835641
0 commit comments