applyMainWindowSettings bug?

David Faure faure at kde.org
Wed May 7 00:32:18 BST 2008


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 at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list