Results 1 to 3 of 3
Hi all I'm a Java programmer who's rather new to Linux. I'm working on some code where I need to create a window similar to the drag images used during ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-29-2008 #1
- Join Date
- Jul 2008
Visually-transparent & Input-transparent Windows
I'm a Java programmer who's rather new to Linux. I'm working on some code where I need to create a window similar to the drag images used during drag and drop on Windows 2000 or Mac OS. In other words, I need to create a window which
- Is visually translucent/transparent. This is the usual alpha blending that composes a foreground image with a background image, while allowing the background image to be visible "through" the foreground image.
- Is transparent to mouse events, in other words the window accepts no mouse events and all such event are passed through to whatever lies underneath.
I know how to do this rather painlessly in Windows (using WS_EX_LAYERED and WS_EX_TRANSPARENT). But I'm really battling to even get started in Linux, because I can't seem to find any documentation! As a complete Linux novice, I admit I'm not quite sure where to look. I have found two leads so far. The first is the window property
which is set on a window with XChangeProperty. I cannot find any hard documentation on what this actually does - all I know is it "makes the window translucent if there is a compositing window manager installed". The second lead is
which is also changed with XChangeProperty. Here things get even more vague, since there are (at least?) 8 window "TYPES" namely
_NET_WM_WINDOW_TYPE_DESKTOP _NET_WM_WINDOW_TYPE_DOCK _NET_WM_WINDOW_TYPE_TOOLBAR _NET_WM_WINDOW_TYPE_MENU _NET_WM_WINDOW_TYPE_UTILITY _NET_WM_WINDOW_TYPE_SPLASH _NET_WM_WINDOW_TYPE_DIALOG _NET_WM_WINDOW_TYPE_NORMAL
What I am really thirsting after is something like the MSDN which simply lays down the
law and describes what happens, but I suspect that is not possible. I have a number of
questions, but they all boil down to the same thing:
- Where can I find detailed documentation on these different window types?
- Will the behaviour of these types be consistent across different X configurations
(window managers, desktop environments, ... )?
- Do any of these types have "mouse transparency"? If not, where else can I go looking
for ways to make a window transparent to mouse events, ie. pass all mouse events through to whatever lies underneath?
- Which entity (window manager, desktop environment, X server, ...) determines how
input events are marshalled along the window hierarchy?
- How can one find out, programmatically, whether a compositing window manager is
installed and whether it supports certain functionality?
- Any other tips/hints/pointers ... ?
Thank you very much for any help you can give.
- 01-07-2010 #2
- Join Date
- Oct 2007
Did you find any document relevant to the use case that u described.
- 01-11-2010 #3
- Join Date
- Jul 2008
The XDnD protocol specifies how "drag over" and "drag under" effects are communicated - by setting (and I think listening for) specific properties on specific windows (I forget the details). The window manager therefore has nothing to do with dnd, apart from drawing the funky transparent drag image (that you have to create). It's all up to the app programmer.