Jump to content

Exclude single apps from aero glass?


Recommended Posts

I suspect one app (paint shop pro X9) crash due aero glass - this app don't have a glass border and it uses it own window controls, but when it starts to hang, I notice is trying to "paint" a glass frame.

Wondering if there is a .bat or .vbs to say "don't use aero glass" on specific app or to pause dwm effects when such apps are running. Should be possible, as aero glass uses native windows/dwm functions.

Edited by Hadden
Link to comment
Share on other sites


Nope, application cannot crash due to Aero Glass. If some application draws its own frame (and thus bypassing DWM rendering), then it does not call DWM rendering functions and therefore Aero Glass rendering is not executed at all.

Link to comment
Share on other sites

In Windows 7, some applications would disable Aero (or change the Windows theme) automatically if certain conditions were met. This happens to me with Fireworks MX 2004. Does this trigger no longer exist in Windows 10? Or if it still does, perhaps something can be done to disable AeroGlass when a program like that is opened, so as to not cause problems.

Link to comment
Share on other sites

On 5. 7. 2017 at 11:45 PM, Hadden said:

but when it starts to hang, I notice is trying to "paint" a glass frame.

What you're seeing is DWM jumping in and replacing hung app's window with a ghost copy. Ghost copies have standard frame which will have glass effect if Aero Glass is installed. The app would hang irregardless of whether Aero Glass is installed or not. If the app hangs and doesn't process window messages (events) for at least 5 seconds, this happens, otherwise, you wouldn't be able to interact with the window at all, this way, you get to see last visual state in which the app was in before it hung and you can get the window out of the way (move it, minimize it or force close the app). You see the same thing if a modern version of Visual Studio or Office app hangs, which got some people thinking Aero Glass could somehow override the custom frame. Standard frame is there because at that point, the app's code providing custom frame isn't running anymore.

6 hours ago, Hadden said:

Can be aeroglass paused via script? (Just to try without mess with its normal functions)

You can set opacity to maximum with Aero Glass GUI. The only other way is stopping Aero Glass's task via Task Scheduler then forcibly stopping Desktop Window Manager via Task Manager, which restarts it without Aero Glass loaded. There's no function that would unload Aero Glass at will.


As a point of interest for the geeks out there, it is possible to process window messages in a way that makes DWM itself think that the app is not responding, even though it works fine. Old games by Surreal Software have the main loop written somewhat like this (pseudo C code derived from disassembled code):

while (1)
{
  MSG msg;
  BOOL result;

  if (PeekMessage(&msg, NULL, WM_KEYFIRST, WM_KEYLAST, TRUE) || PeekMessage(&msg, NULL, WM_MOUSEFIRST, WM_MOUSELAST, TRUE))
  {
    if (msg.message == WM_QUIT)
      break;

    TranslateMessage(&msg);
    DispatchMessage(&msg);

    continue;
  }

  result = PeekMessage(&msg, NULL, 0, 0, TRUE);

  if (msg.message == WM_QUIT)
    break;

  if (result == TRUE)
    DispatchMessage(&msg);

  Game_Frame();
}

If you run the game in windowed mode, then click outside the window to make it lose focus, it appears frozen after 5 seconds, even though it still runs its loop, can even see what's happening in-game in ghost window, it just doesn't respond to user input. Accent color change event can thaw it. Simplifying the loop to have one PeekMessage call without filtering, then TranslateMessage and DispatchMessage if the result from PeekMessage was positive, then finally running the game frame resolves the issue.

Edited by UCyborg
Link to comment
Share on other sites

  • 4 weeks later...

Yes, it was actually a themed-ghost copy as you pointed out :)

By the way, I lowered the undo value in the app - it was too high - and I'm not experiencing more hangs ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...