[Gtk-sharp-list] Drawing into Caption

Wolfgang Mauer W.Mauer at top-soft.info
Sat Jan 31 04:33:49 EST 2009


I try'd this, but on my opensuse 11 (kde 3.5) this do not work!
If i set the Decorated Property to false the caption and border will not be shown, 
but with SetDecorations nothing happens.

>Am Freitag, 30. Januar 2009 23:33:02 schrieb Michael Hutchinson:
> On Tue, Jan 6, 2009 at 6:21 PM, Michael Hutchinson
> <m.j.hutchinson at gmail.com> wrote:
> > 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
> > varieties.
> >
> > 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.
> 
> Update: rather than hinting the window as a SplashScreen, instead
> access the Window's GdkWindow. This lets you alter the decorations
> elements that are drawn, and also invoke the minimise, maximise, etc.
> actions.
> So you could do GdkWindow.SetDecorations
> (WMDecoration.Border|WMDecoration.Resizeh) and draw a full custom
> window decoration at the top part of your app.
> 



-- 
Top-Soft
Softwareentwicklung
Inhaber: Wolfgang Mauer
Reitersweg 9, 96103 Hallstadt
Tel.: +49 (0)951 / 2221520
Fax: +49 (0)951 / 2221521


More information about the Gtk-sharp-list mailing list