[Top][All Lists]

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

Re: Transparent Windows, WindowMaker and [NSWindow backgroundColor]

From: Eric Wasylishen
Subject: Re: Transparent Windows, WindowMaker and [NSWindow backgroundColor]
Date: Thu, 2 Jun 2011 23:36:47 -0600

Hi Austin,

On 2011-06-02, at 6:40 PM, Austin Clow wrote:

I can't seem to get the transparency to happen. 

I installed cairo, and xcompmgr, rebuilt the latest back, and then set defaults write NSGlobalDomain GSBackend libgnustep-cairo

The application launches fine, and I do notice some *better* drawing, and a few things that draw strangely (I'll report them when I figure out what is going on), but setting the window's backgroundColor with an alpha value (0.5 or otherwise) the window does not become transparent. \

It sounds like the cairo backend is set up properly.

What window manager are you using? I've found xcompmgr only works in conjunction with certain window managers. It doesn't work with WindowMaker. I think it does with OpenBox. Try compiz instead.

Try the transset program. If that doesn't work, it means your window manager / Xserver combination don't support compositing.
If you can get transset to work, it will mean that transparency in GNUstep should also work.

I will try the [NSWindow setAlpha:] that was mentioned by Fred, but on a Mac this makes the window as well as its content transparent, so perhaps this is different on  GNUstep? We'll see. 

There used to be a bug preventing -[NSWindow setBackgroundColor:] from working, but it has been fixed for over a year. It isn't necessary to call -setAlpha:.

Hope this helps.

If there is anything hat I might be missing, please let me know. 

- Austin

On Jun 2, 2011, at 2:31 PM, Fred Kiefer wrote:

On 02.06.2011 20:55, David Chisnall wrote:
On 2 Jun 2011, at 19:44, Austin Clow wrote:

Are transparent windows supported in WindowMaker?

Wrong question.  WindowMaker is a window manager, it has nothing to do with whether transparent windows work, it just controls their positioning and their decorations.

Transparent windows are supported in X11 by a combination of the composite and render extensions.  Applications draw RGBA windows, which are directed off screen.  A compositing manager then draws them onto the display.  GNUstep will draw RGBA windows (with the Cairo back end definitely, I think with libart, and I think not with xlib), but for these to be transparent / translucent you must be running a compositing manager.  X.org comes with a simple compositing manager, xcompmgr, which should work (it can also draw shadows, but little else).  Alternatively, you can run a more complex one, like Compiz, which adds other effects.

You may have to set the alpha value of the window as well. But I haven't tested that feature recently. When we added support to RGBA windows in the cairo backend this was needed.

Discuss-gnustep mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]