diff options
Diffstat (limited to 'xorg-server/hw/xwin/winmultiwindowwindow.c')
-rw-r--r-- | xorg-server/hw/xwin/winmultiwindowwindow.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/xorg-server/hw/xwin/winmultiwindowwindow.c b/xorg-server/hw/xwin/winmultiwindowwindow.c index 0093fcbb1..c0c7db2b7 100644 --- a/xorg-server/hw/xwin/winmultiwindowwindow.c +++ b/xorg-server/hw/xwin/winmultiwindowwindow.c @@ -63,6 +63,11 @@ winInitMultiWindowClass(void) WNDCLASSEX wcx; if (atomXWinClass == 0) { + HICON hIcon, hIconSmall; + + /* Load the default icons */ + winSelectIcons(&hIcon, &hIconSmall); + /* Setup our window class */ wcx.cbSize = sizeof(WNDCLASSEX); wcx.style = CS_HREDRAW | CS_VREDRAW | (g_fNativeGl ? CS_OWNDC : 0); @@ -70,12 +75,12 @@ winInitMultiWindowClass(void) wcx.cbClsExtra = 0; wcx.cbWndExtra = 0; wcx.hInstance = g_hInstance; - wcx.hIcon = g_hIconX; + wcx.hIcon = hIcon; wcx.hCursor = 0; wcx.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wcx.lpszMenuName = NULL; wcx.lpszClassName = WINDOW_CLASS_X; - wcx.hIconSm = g_hSmallIconX; + wcx.hIconSm = hIconSmall; #if CYGMULTIWINDOW_DEBUG ErrorF("winCreateWindowsWindow - Creating class: %s\n", WINDOW_CLASS_X); @@ -479,8 +484,6 @@ winCreateWindowsWindow(WindowPtr pWin) HWND hFore = NULL; winWindowPriv(pWin); - HICON hIcon; - HICON hIconSmall; winPrivScreenPtr pScreenPriv = pWinPriv->pScreenPriv; WinXSizeHints hints; WindowPtr pDaddy; @@ -574,13 +577,6 @@ winCreateWindowsWindow(WindowPtr pWin) } pWinPriv->hWnd = hWnd; - /* Set application or .XWinrc defined Icons */ - winSelectIcons(pWin, &hIcon, &hIconSmall); - if (hIcon) - SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM) hIcon); - if (hIconSmall) - SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall); - /* Change style back to popup, already placed... */ SetWindowLongPtr(hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); |