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

List:       kde-core-devel
Subject:    Re: applyMainWindowSettings bug?
From:       David Faure <faure () kde ! org>
Date:       2008-05-06 23:32:18
Message-ID: 200805070132.19136.faure () kde ! org
[Download RAW message or body]

On Monday 05 May 2008, Lubos Lunak wrote:
> On Friday 02 of May 2008, Vladimir Prus wrote:
> > Lubos Lunak wrote:
> > >  No. If  memory serves me well, that's actually what happens and what is
> > > causing the problem. The resizing in your step 2. actually happens
> > > _after_ the window is shown and maximized by the window manager, because
> > > of Qt's delayed layout activation (or whatever it is exactly that
> > > triggers it so late).
> >
> > In the real KDevelop case, it's indeed QLayout::activate that calls
> > setMinimumSize.
> >
> > > So the window is first maximized by the window manager and then the
> > > application immediatelly asks to be resized again (and width()/height()
> > > still return old size because of X being asynchronous).
> >
> > Is there no way to sync with X? Any possible workarounds?
> 
>  Probably not simpler than actually fixing. I'd expect this to be fixed by 
> just processing posted events for the window before it's shown.

If this is about "resizing immediately before showing", then it's more complicated,
see sendAllPendingResizeEvents in kdebase/apps/konqueror/src/tests/konqviewmgrtest.cpp
(Yes this is ugly and should somehow be in Qt IMHO)

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
[prev in list] [next in list] [prev in thread] [next in thread] 

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