hw/xwin: Stop assuming WS_EX_APPWINDOW style in WM_SHOWWINDOW
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
		
							parent
							
								
									56e94403f8
								
							
						
					
					
						commit
						d6dcde7a03
					
				| 
						 | 
					@ -870,41 +870,36 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /* */
 | 
					        /* */
 | 
				
			||||||
        if (!pWin->overrideRedirect) {
 | 
					        if (!pWin->overrideRedirect) {
 | 
				
			||||||
 | 
					            HWND zstyle = HWND_NOTOPMOST;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            /* Flag that this window needs to be made active when clicked */
 | 
					            /* Flag that this window needs to be made active when clicked */
 | 
				
			||||||
            SetProp(hwnd, WIN_NEEDMANAGE_PROP, (HANDLE) 1);
 | 
					            SetProp(hwnd, WIN_NEEDMANAGE_PROP, (HANDLE) 1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (!(GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_APPWINDOW)) {
 | 
					            /* Set the transient style flags */
 | 
				
			||||||
                HWND zstyle = HWND_NOTOPMOST;
 | 
					            if (GetParent(hwnd))
 | 
				
			||||||
 | 
					                SetWindowLongPtr(hwnd, GWL_STYLE,
 | 
				
			||||||
 | 
					                                 WS_POPUP | WS_OVERLAPPED | WS_SYSMENU |
 | 
				
			||||||
 | 
					                                 WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
 | 
				
			||||||
 | 
					            /* Set the window standard style flags */
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					                SetWindowLongPtr(hwnd, GWL_STYLE,
 | 
				
			||||||
 | 
					                                 (WS_POPUP | WS_OVERLAPPEDWINDOW |
 | 
				
			||||||
 | 
					                                  WS_CLIPCHILDREN | WS_CLIPSIBLINGS)
 | 
				
			||||||
 | 
					                                 & ~WS_CAPTION & ~WS_SIZEBOX);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                /* Set the window extended style flags */
 | 
					            winUpdateWindowPosition(hwnd, &zstyle);
 | 
				
			||||||
                SetWindowLongPtr(hwnd, GWL_EXSTYLE, WS_EX_APPWINDOW);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                /* Set the transient style flags */
 | 
					            {
 | 
				
			||||||
                if (GetParent(hwnd))
 | 
					                WinXWMHints hints;
 | 
				
			||||||
                    SetWindowLongPtr(hwnd, GWL_STYLE,
 | 
					 | 
				
			||||||
                                     WS_POPUP | WS_OVERLAPPED | WS_SYSMENU |
 | 
					 | 
				
			||||||
                                     WS_CLIPCHILDREN | WS_CLIPSIBLINGS);
 | 
					 | 
				
			||||||
                /* Set the window standard style flags */
 | 
					 | 
				
			||||||
                else
 | 
					 | 
				
			||||||
                    SetWindowLongPtr(hwnd, GWL_STYLE,
 | 
					 | 
				
			||||||
                                     (WS_POPUP | WS_OVERLAPPEDWINDOW |
 | 
					 | 
				
			||||||
                                      WS_CLIPCHILDREN | WS_CLIPSIBLINGS)
 | 
					 | 
				
			||||||
                                     & ~WS_CAPTION & ~WS_SIZEBOX);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                winUpdateWindowPosition(hwnd, &zstyle);
 | 
					                if (winMultiWindowGetWMHints(pWin, &hints)) {
 | 
				
			||||||
 | 
					                    /*
 | 
				
			||||||
                {
 | 
					                       Give the window focus, unless it has an InputHint
 | 
				
			||||||
                    WinXWMHints hints;
 | 
					                       which is FALSE (this is used by e.g. glean to
 | 
				
			||||||
 | 
					                       avoid every test window grabbing the focus)
 | 
				
			||||||
                    if (winMultiWindowGetWMHints(pWin, &hints)) {
 | 
					                     */
 | 
				
			||||||
                        /*
 | 
					                    if (!((hints.flags & InputHint) && (!hints.input))) {
 | 
				
			||||||
                           Give the window focus, unless it has an InputHint
 | 
					                        SetForegroundWindow(hwnd);
 | 
				
			||||||
                           which is FALSE (this is used by e.g. glean to
 | 
					 | 
				
			||||||
                           avoid every test window grabbing the focus)
 | 
					 | 
				
			||||||
                         */
 | 
					 | 
				
			||||||
                        if (!((hints.flags & InputHint) && (!hints.input))) {
 | 
					 | 
				
			||||||
                            SetForegroundWindow(hwnd);
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue