[squeak-dev] how to tell when Squeak's GUI is active?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] how to tell when Squeak's GUI is active?

ccrraaiigg

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

[1] http://en.wikipedia.org/wiki/Growl_(software)



Reply | Threaded
Open this post in threaded view
|

RE: [squeak-dev] how to tell when Squeak's GUI is active?

Ron Teitelbaum
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: [hidden email] [mailto:squeak-dev-
> [hidden email]] On Behalf Of Craig Latta
> Sent: Tuesday, August 26, 2008 7:34 PM
> To: [hidden email]
> 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
>
> [1] http://en.wikipedia.org/wiki/Growl_(software)
>
>