discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Shadow and translucency support in NSWindow


From: Fred Kiefer
Subject: Re: Shadow and translucency support in NSWindow
Date: Tue, 14 Aug 2007 10:05:00 +0200
User-agent: Thunderbird 1.5.0.12 (X11/20060911)

Yen-Ju Chen wrote:
> Shadow and translucency is not supported in GNUstep,
> but we have a way to do so in Etoile.
> Here is a screenshot:
> https://mail.gna.org/public/etoile-discuss/2007-08/pngcVHU5SBJso.png
> 
> In order to achieve this visual effect, GNUstep has to implement these
> missing part:
> 
> First, for – setHasShadow: and -hasShadow in NSWindow,
> GNUstep has to push it into backend.
> Since there is no EWMH standard for shadow,
> GNUstep can probably add it in _GNUSTEP_WM_ATTR,
> just like GSDocumentEditedFlag.
> - invalidateShadow has no effect on X because shadow is always calculated.
> 

I just googled for X11 shadow handling and found that there has been an
atom in use for this for some time: _KDE_WM_WINDOW_SHADOW. Recently this
seems to get replaced by _NET_WM_WINDOW_SHADOW, but this still isn't
very common. Which one should we choose? I would go for the later one
and hope for window managers to catch up.

> Second, for – setAlphaValue, -alphaValue, -setOpaque, -opaque,
> GNUstep has it, but the number in backend is not right if I remember
> it correctly.
> There is a non-offficial EWMH property for that:
> _NET_WM_WINDOW_OPACITY (opaque is 0xffffffff)
> As long as GNUstep can push this property, like what it does on window level
> (XGServerwindow -setwindowlevel:) with XChangeProperty() and XSendEvent(),
> then we probably can make it work.
> But I think the first thing is to be sure the correct alpha value is
> passed to backend.
> 

GNUstep has supported this property for a long time already. I just
looked through the code of other projects and there seems to be a small
change in the way it gets used, you now have to send a message instead
of changing the property directly. I will adopt our code to this.
And maybe add some more of the new NET_WM stuff as well...


> Because it involes the intergration between gui and back, I cannot
> provide a patch.
> If anyone who knows the interface between gui and back can do it
> and push the correct values into backend, I can help from that.
> Since both of these properties (alpha and translucency) are not in
> EWMH standard,
> it should not have effect on other window manager.
> In another word, it will not break anything.
> 
> By the way, -setAlphaValue: seems to change the translucency of the
> whole window.
> If I want to have a transparent background but opaque foreground,
> how do I do it with GNUstep/Cocoa ?
> For example, some terminal emulator has transparent background, but
> the text is opaque.
> I don't see how it can be done with standard GNUstep/Cocoa methods.





reply via email to

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