[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: how to use KWin::setOpacity correctly?
From:       LiuCougar <liucougar () gmail ! com>
Date:       2005-03-28 2:41:34
Message-ID: 95580678050327184112990e12 () mail ! gmail ! com
[Download RAW message or body]

Ok, I am sure this is a bug in kdelibs:

in the function KWin::setOpacity, kwin_net_create_atoms is not called,
and so the function XChangeProperty will generate the error mentioned
in my first email in this thread.

After adding kwin_net_create_atoms() to the KWin::setOpacity, no error
will occur, but I have to kill kompmgr once for my widget to be set
transparent. It seems I need a way to notify kompmgr to set my
widget...

Any comments are welcomed: do you think this is a bug? 

Regards,
Cougar

On Mon, 28 Mar 2005 02:05:17 +0000, LiuCougar <liucougar@gmail.com> wrote:
> I copied the XChangeProperty line from transset, and other related
> stuff into my widget, and start xcompmgr, my widget is successfully
> set transparent.
> 
> I assume that there is something wrong down into the kdelibs. Could
> anyone enlighten me if I am wrong?
> 
> Regards,
> Cougar
> 
> On Mon, 28 Mar 2005 01:26:28 +0000, LiuCougar <liucougar@gmail.com> wrote:
> > Hi,
> > I just discovered the handy API in kdecore KWin::setOpacity for
> > setting my own apps tranparency. However, when I use it, I always
> > receive the error:
> > X Error: BadAtom (invalid Atom parameter) 5
> >   Major opcode:  19
> >   Minor opcode:  0
> >   Resource id:  0x0
> >
> > I did start kompmgr (tried xcompmgr too)
> >
> > The code I use is:
> > KWin::setOpacity(winId(), 75);
> > (I only wanted to set a (toplevel) widget itself to .75 opacity)
> >
> > And I did try to put the line above after the widget was shown, but
> > without any lucky either.
> >
> > Any one could tell me what's the correct way to use it in my own app?
> >
> > Thanks a lot.
> > Regards,
> > Cougar
> >
> > --
> > "People's characters are strengthened through struggle against
> > difficulties; they are weakened by comfort."
> > - Old Chinese adage
> >
> 
> --
> "People's characters are strengthened through struggle against
> difficulties; they are weakened by comfort."
> - Old Chinese adage
> 


-- 
"People's characters are strengthened through struggle against
difficulties; they are weakened by comfort."
- Old Chinese adage
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic