Re: Widget Overlays



Alexander Larsson wrote:
On Wed, 2007-04-11 at 12:09 +0200, Tim Janik wrote:
On Mon, 9 Apr 2007, Matthew Bucknall wrote:

I've considered hovering undecorated 'always above' top-level windows
above my main window, but the icons are not rectangular in shape, so I
need to deal with transparency (I don't know how), and I also need to
control their position relative to the main window with pixel precision
otherwise things are just going to look wonky.
see gtk_widget_shape_combine_mask():
   http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget-shape-combine-mask

Using a toplevel window seems unnecessary. Why not just make a custom
container that has two overlapping child windows, put the overlayed
stuff and the shape mask on the upper window and the rest in the lower
window.
It's not always easy to do if child widgets have windows, you
have to maintain z-order manually; all code calls
gdk_window_show() whenever it wants to map. For instance
if a child window is a notebook, it will raise children on switching
tabs. And even if you do raise the on-top windows after children
windows are raised you get nasty blinking.

Best regards,
Yevgen




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