Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » how to recognize that SWT windows are covered by other transparent windows?
how to recognize that SWT windows are covered by other transparent windows? [message #467218] Thu, 26 January 2006 16:20 Go to next message
Eclipse UserFriend
Originally posted by: mckaot.gmx.net

here a question that differs from all the others concerning transparency:

I know how to check if somebody painted directly into "my" SWT window area.
I also know how to find out if "my" SWT window is covered (partly or
completely) by an other window - as long as this window is a "normal" one
- but if it uses Microsoft's UpdateLayeredWindow(..) or SetWindowLong(..)
with GWL_EXSTYLE I don't "see" it, even if its transparency is set to 255!

Is there a way to discover such things within SWT?

best regards
Re: how to recognize that SWT windows are covered by other transparent wind [message #467243 is a reply to message #467218] Fri, 27 January 2006 02:53 Go to previous messageGo to next message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
There's no way to get this information directly in SWT, especially with a platform specific feature like transparent or translucent windows. If there's a way to do this in the Windows API, then you can use JNI to get there. Other than that, my best suggestion is to moniter repaint events (through a repaint listener) and write an algorithm to determine if and when the repaints stop when they should be continuing (possibly by monitering window size and position for changes). Then, when the repaints stop when they should be continuing, you know that something is blocking the composite or widget you are monitering. Note, the repaint events will only be blocked if *all* of the widget/composite is obscured.
Re: how to recognize that SWT windows are covered by other transparent wind [message #467273 is a reply to message #467243] Fri, 27 January 2006 14:37 Go to previous message
Eclipse UserFriend
Originally posted by: mckaot.gmx.net

Monitoring paint events is exactly what I do to determine that "my" window is covered: if it's covered completely, "my" paints are blocked, otherwise paint event's gc is clipped.
I also can read back paint event's gc content and compare it with "my" contents (which I placed there myself during last paint!).

BUT: if the window actually covering "my" window is able to be transparent (even if the alpha value is 255) these tricks don't help.. What can I do (maybe via JNI) to correct that habit.. any idea?

best regards
Previous Topic:Using OverlayLayout with SWT_AWT bridge
Next Topic:Add existing java project from command line
Goto Forum:
  


Current Time: Sun Jul 21 21:24:40 GMT 2019

Powered by FUDForum. Page generated in 0.01236 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top