Hi--
I'm using Growl/Snarl[1] to post notifications from Squeak. Of course, they're somewhat annoying when Squeak is already the active host application. Is there some way to tell whether Squeak is in the foreground or background, as far as the host window system is concerned? I only care about getting the user's attention when some other host application's GUI is active (and thus possibly obscuring Squeak's GUI).
thanks!
-C
Hi Craig,
In windows you could just compare the window handle to the GetTopWindow handle http://msdn.microsoft.com/en-us/library/ms633514(VS.85).aspx.
You could also check GetWindow to see if a previous (in Z-Order) window exists. http://msdn.microsoft.com/en-us/library/ms633515(VS.85).aspx
Ron
-----Original Message----- From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- bounces@lists.squeakfoundation.org] On Behalf Of Craig Latta Sent: Tuesday, August 26, 2008 7:34 PM To: squeak-dev@lists.squeakfoundation.org Subject: [squeak-dev] how to tell when Squeak's GUI is active?
Hi--
I'm using Growl/Snarl[1] to post notifications from Squeak. Of
course, they're somewhat annoying when Squeak is already the active host application. Is there some way to tell whether Squeak is in the foreground or background, as far as the host window system is concerned? I only care about getting the user's attention when some other host application's GUI is active (and thus possibly obscuring Squeak's GUI).
thanks!
-C
squeak-dev@lists.squeakfoundation.org