Re: How to create layered windows or widgets?



On Jan 24, 2008 12:16 AM, Skee Lin <skee lin gmail com> wrote:
Tristan Van Berkom 写道:
> On Jan 23, 2008 7:03 AM, Skee Lin <skee lin gmail com
> <mailto: skee lin gmail com>> wrote:
>
>     Hi everybody,
>     I'm trying to create a transparent window to show some
>     informations, and
>     it's always on top.
>     Does anybody know how to let the mouse messages through? For instance,
>     when I click on the window, I actually click on the desktop(if
>     there are
>     no other windows).
>
>
> I think you can accomplish this with gdk_window_shape_combine_mask ()
>
> http://library.gnome.org/devel/gdk/unstable/gdk-Windows.html#gdk-window-shape-combine-mask
>
> Cheers,
> -Tristan
>
I really appreciate the helpful reply from Tristan. However, there is
another problem that does irregular window occupy much cup time?
I want to create a window to show lyrics of songs. User can move the
window by clicking on the text while clicking on the other areas will be
send to lower window. I think cairo can convert the text to pixmap mask,
but I'm afraid the nonstop changing of the shape will occupy much cpu time.
Maybe I need to describe my problem more simply: How to show a window
and let all clicking messages through, just like the window is not exist?
Any information would be appreciated.**

Your use case is particular, you said you want the *Desktop* also to recieve
mouse clicks, and other applications too.

You definitely can accomplish this with layered windows in YOUR app,
but once you eat up the gdk events from the X server, I dont know how
you can send them back to the underlying random window.

It might be possible already, anything is surely is possible if you hack
the X server to do it ;-)

Cheers,
                    -Tristan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]