[Gtk-sharp-list] Drawing into Caption

Michael Hutchinson m.j.hutchinson at gmail.com
Tue Jan 6 18:21:04 EST 2009

On Tue, Jan 6, 2009 at 6:03 PM, Wolfgang Mauer <W.Mauer at top-soft.info> wrote:
> Hi all,
> is it possible to draw into the caption from a decorated window?

I don't believe so, since the window decorations are drawn by the
window manager, and there are many window managers on Linux with
different behaviours. In the case of compiz, the decorations are drawn
by a separate decoration process, of which there are several

Even if you could find a way to custom-paint into the decoration,
there would be no guarantee of the layout of existing elements within
the decoration, as most window managers have themeable decorations.

You could try hinting the window type as
Gdk.WindowTypeHint.Splashscreen, as these don't usually have
decorations. You'd then have to draw the caption, buttons, resize
handles, and everything yourself. However, you might find that some
window managers would have special behaviours associated with
splashes, e.g. semi-transparency, which obviously wouldn't be
desirable for a normal app.

What exactly is it you're trying to do? I assume it's something like
these: http://blogs.msdn.com/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx

Michael Hutchinson

More information about the Gtk-sharp-list mailing list