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

List:       kde-core-devel
Subject:    Re: Alien widgets and flickering
From:       Fredrik =?iso-8859-1?q?H=F6glund?= <fredrik () kde ! org>
Date:       2008-03-20 23:15:27
Message-ID: 200803210015.28000.fredrik () kde ! org
[Download RAW message or body]

On Thursday 20 March 2008 18:32, Louai Al-Khanji wrote:
> On Thu, Mar 20, 2008 at 6:50 PM, Fredrik Höglund <fredrik@kde.org> wrote:
> > On Wednesday 19 March 2008 07:34, Louai Al-Khanji wrote:
> >  > On Tuesday 18 March 2008 19:57:40 Robert Knight wrote:
> >  > > Hi,
> >  > >
> >  > > > Does anyone object to this patch to systemsettings then?
> >  > >
> >  > > Please try to make sure there are no unnecessary calls to
> >  > > QWidget::winId() first.  Apart from the screensaver module which you
> >  > > mentioned, I cannot see why other modules need it.
> >  > >
> >  > > > and I assume it won't be simple for kwin or style
> >  > > > kcm's either.
> >  > >
> >  > > I'm not sure why that would be the case.  What does the style KCM need
> >  > > a winId for?
> >  > >
> >  >
> >  > I just noticed gmail didn't send my reply to David to the list. Basically,
> >  > probably all other kcm's can be fixed, but not the screensaver previews. The
> >  > whole screensaver infrastructure under X currently works based on reparenting
> >  > X windows.
> >
> >  Is there a reason you can't reparent the screensaver window to the
> >  toplevel window, and adjust the coordinates?
> 
> I guess that is feasible. Of course that means handling window
> resizes, moves etc. yourself. And there would still be the
> accessibility, kwin, kxkb, and randr kcm's to fix as well. And those
> are just the ones I know of.

You have to do that anyway.  Foreign windows don't magically
start caring about Qt layouts when you reparent them to one of
your windows.

This problem is also easy to solve since you can create a container
QWidget for the foreign window, that resizes it to its own geometry
in its resizeEvent().

Of the KCM's you listed, the only one that calls XReparentWindow()
is the screensaver KCM.  The other KCM's call winId() for other reasons,
and most (all?) of them only do it on toplevel QWidgets that are
already native windows.

Regards,
Fredrik

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

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