|
Post by TechSalt on Sept 18, 2022 3:21:47 GMT -8
Windows "ghosts" a window when it's not responding, when this happens, it gives the window a modern border with the text on the titlebar "(Not Responding)". To disable ghosting, rename DWMGhost.dll to something else. For me, nothing breaks (except window ghosting, which is what we want to do) Log off and log back in. Open taskmgr, see if it's not responding. If done correctly, it will not have a modern border when a program hangs. Fun fact: Killing a program (with XP x64 taskmgr) that hangs with ghosting disabled will trigger this dialog:
|
|
|
Post by OrthodoxWin32 on Sept 18, 2022 5:43:56 GMT -8
Windows "ghosts" a window when it's not responding, when this happens, it gives the window a modern border with the text on the titlebar "(Not Responding)". To disable ghosting, rename DWMGhost.dll to something else. For me, nothing breaks (except window ghosting, which is what we want to do) Log off and log back in. Open taskmgr, see if it's not responding. If done correctly, it will not have a modern border when a program hangs. Fun fact: Killing a program (with XP x64 taskmgr) that hangs with ghosting disabled will trigger this dialog: Hello TechSalt, Which DWMGhost should be renamed ? Because there are several.
|
|
|
Post by TechSalt on Sept 18, 2022 5:44:55 GMT -8
Windows "ghosts" a window when it's not responding, when this happens, it gives the window a modern border with the text on the titlebar "(Not Responding)". To disable ghosting, rename DWMGhost.dll to something else. For me, nothing breaks (except window ghosting, which is what we want to do) Log off and log back in. Open taskmgr, see if it's not responding. If done correctly, it will not have a modern border when a program hangs. Fun fact: Killing a program (with XP x64 taskmgr) that hangs with ghosting disabled will trigger this dialog: Hello @windowstechspots, Which DWMGhost should be renamed ? Because there are several. DWMGhost.dll in System32
|
|
|
Post by OrthodoxWin32 on Sept 18, 2022 5:51:34 GMT -8
I don't have DWMGhost.exe in system32. However, when I search with Everything, it appears, but not in the folder. In Winfile it does not appear either. As much for me, it appears in Winfile. However, it's weird that it doesn't show up in Explorer, even with the "show hidden files" and "show system files" boxes checked.
|
|
|
Post by TechSalt on Sept 18, 2022 6:26:03 GMT -8
I don't have DWMGhost.exe in system32. However, when I search with Everything, it appears, but not in the folder. In Winfile it does not appear either. As much for me, it appears in Winfile. However, it's weird that it doesn't show up in Explorer, even with the "show hidden files" and "show system files" boxes checked. Not the exe, the dll
|
|
|
Post by OrthodoxWin32 on Sept 18, 2022 6:36:04 GMT -8
I don't have DWMGhost.exe in system32. However, when I search with Everything, it appears, but not in the folder. In Winfile it does not appear either. As much for me, it appears in Winfile. However, it's weird that it doesn't show up in Explorer, even with the "show hidden files" and "show system files" boxes checked. Not the exe, the dllI meant dll, not exe. It is a typing error. Anyway, I renamed the dll with Winfile, it seems to work. Thanks for the tip.
|
|
|
Post by The Jackal on Sept 18, 2022 7:34:23 GMT -8
Windows "ghosts" a window when it's not responding, when this happens, it gives the window a modern border with the text on the titlebar "(Not Responding)". To disable ghosting, rename DWMGhost.dll to something else. For me, nothing breaks (except window ghosting, which is what we want to do) Log off and log back in. Open taskmgr, see if it's not responding. If done correctly, it will not have a modern border when a program hangs. Fun fact: Killing a program (with XP x64 taskmgr) that hangs with ghosting disabled will trigger this dialog: Confrimed working on my end, really nice find Tech.
|
|
|
Post by OrthodoxWin32 on Jul 23, 2023 15:44:56 GMT -8
|
|
|
Post by anixx on Jul 26, 2023 14:50:49 GMT -8
I've tried this method, but the effect I got is as follows:
- The hang window is not dimmed and remains classic, but is not movable
- The close task dialog still remains themed.
I do not get the non-themed dialog as in the first post.
|
|
|
Post by TechSalt on Jul 27, 2023 5:03:43 GMT -8
I've tried this method, but the effect I got is as follows: - The hang window is not dimmed and remains classic, but is not movable - The close task dialog still remains themed. I do not get the non-themed dialog as in the first post. Do you have BasicThemer? BasicThemer, if you use classic theme will make some things that don't have classic borders have them
|
|
|
Post by anixx on Jul 27, 2023 5:33:22 GMT -8
No basic themer
|
|
|
Post by ephemeralViolette on Jul 27, 2023 5:52:17 GMT -8
- The hang window is not dimmed and remains classic, but is not movable This is a limitation of the method. When DWM is active, ghosting is delegated to DWM, which means that Windows still expects DWM to do something. Since the necessary functions couldn't be loaded into DWM, it gives up and just leaves the actual window hanging. The ghost window is never created and the true window, which cannot receive any inputs due to being hung, is left visible.
In effect, doing this disables ghosting entirely, which is more akin to how Windows 2000 and prior versions behaved.
|
|
|
Post by anixx on Jul 27, 2023 6:22:44 GMT -8
If the ghosting mechanism can hid the hung window, why it cannot move it, why it needs to create a new ghost window?
|
|
|
Post by ephemeralViolette on Jul 27, 2023 7:45:54 GMT -8
If the ghosting mechanism can hid the hung window, why it cannot move it, why it needs to create a new ghost window? Painting the window on screen is managed by the operating system (Windows USER and DWM), but the window frames were not directly managed by the OS until DWM started being used. This remains the case if you use the "legacy" window frames with DWM, since that just disables DWM's window frames and makes the legacy ones become included with the output of the window once again. Messages like WM_NCHITTEST are handled by the message loop of a window, so when the process that owns that window becomes unresponsive, even if the window just returns the default window procedure (and so uses the native frames), it will never get to these kinds of messages, and so you lose the ability to drag the window or interact with its caption buttons.
That is to say, the classic and basic theme window frames are managed by the window itself, and so they stop responding along with said window. I think if you were to disable classic theme but keep dwmghost.dll removed, you would be able to move unghosted, unresponsive windows. This is because DWM's window frames are handled by DWM itself, which remains responsive. Similarly, it is most likely possible to manually move the window using an API like SetWindowPos(), since this bypassing the message handling of the window.
And I suspect that's the entire reason ghosting was added in Windows XP. The unresponsive window was hidden and a new window that is owned by the operating system gets created which shows a screenshot of the unresponsive window. This new window tells the user that the window is unresponsive, but also lets them move it around or attempt to close it without going through Task Manager.
As for why removing dwmghost.dll doesn't restore USER's ghosting behaviour, I haven't exactly looked into that. My guess is that dwm.exe, which hosted DWM's custom ghosting implementation from Vista until 10, is still hardcoded to disable USER's ghosting behaviour. I'm not sure how this works exactly, and it probably involves some kernel-mode code since NT USER is implemented in the win32k.sys driver. dwmghost.dll is a very recent split, so I don't think it's checked for other than possibly being permitted to fail without crashing. If I had to guess, this was done to improve the ability to update DWM in smaller chunks.
|
|
|
Post by anixx on Jul 27, 2023 8:06:50 GMT -8
I wonder, why I still have the "end program" window themed regardless.
|
|