Re: Background pixmap
- From: Owen Taylor <otaylor redhat com>
- To: gtk-list redhat com
- Subject: Re: Background pixmap
- Date: 04 Jan 2000 16:04:41 -0500
Dennis Bj|rklund <dennisb@cs.chalmers.se> writes:
> Hi!
>
> I'm trying to reduce the flicker that comes when you opaque resize a
> windows. One thing that reduces the flicker is if you can stop the
> widgets from clearing the background first. If you later on is going to
> paint the entire widget, then it doesn't help to clear the background
> anyway.
>
> It works for most widgets but I can't get it to work for the toplevel
> windows. I do it by setting the pixmap (all five of them) of the widget
> to GDK_PARENT_RELATIVE which I guess sets the background pixmap to
> None with X is supposed to interpret as don't paint background??
>
> I read the gtk-source to find out what GDK_PARENT_RELATIVE do. The
> biggest problem with GTK is still that there is no documentation.
>
> I guess that I have missunderstod something since I cant get it to
> work.
>
> I would be very happy if someone could show me some code that opens a
> toplevel windows where there is NO painting going on at all. So that
> when you open it you see a window-frame (from the WM) and in the
> interior you see whatever was there before.
To set the background of a GdkWindow to None, do:
gdk_window_set_back_pixmap (window, NULL, FALSE);
You can't do this from a RC file, because it isn't a difference
in appearance.
However, to do this for a GtkWindow and have it stick, you have
to tell GTK+ not to touch the background. You can do this
using:
void gtk_widget_set_app_paintable (GtkWidget *widget,
gboolean app_paintable);
Look at the last few months of the gtk-devel-list archives
if you want more information on the subject of opaque resizing,
etc.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]