On Sat, 10 Nov 2001, Daniel Secrieru wrote:
> In Win32 there is the following function:
>
> int SetBkMode(
> HDC hdc, // handle of device context
> int iBkMode // flag specifying background mode
> );
>
> Parameters:
> hdc - Handle to the device context.
> iBkMode - Specifies the background mode.
>
> This parameter can be either of the following values:
>
> OPAQUE - Background is filled with the current background color before the
> text, hatched brush, or pen is drawn.
> TRANSPARENT - Background remains untouched.
>
> Is there anything similar in X11? Maybe in the GC - XGCValues functions?
> Which of the functions could apply to TRANSPARENT/OPAQUE?
GCs have nothing to do with window backgrounds. In X, the
window background is what the window gets cleared to before sending
Expose events to the client (if the client requests them).
This is an attribute of the Window (see the man page on
XSetWindowAttributes).
Options are a solid color, a tile (pixmap with a pattern),
None (no automatic clear by the server), and ParentRelative
which means it inherits the background from the parent.
ParentRelative might not work like you'd think with some
window managers because your parent isn't the root window
but the window manager's decorations. If the window manager's
decorations aren't ParentRelative (at least fvwm's aren't)
your window will not pick up the root window pattern but that
of the window manager's decorations.
You have to be careful with ParentRelative if you
are creating window with something other than the default visual.
If the parent is not of the same depth, it is an error.
From the description it sounds more like Win32's TRANSPARENT
is actually more like X11's None than X11's "transparent"
ParentRelative option.
Mark.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert