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

List:       kde-games-devel
Subject:    Re: [Kde-games-devel] Extra resize events from KXmlGuiWindow
From:       Ian Wadham <ianw2 () optusnet ! com ! au>
Date:       2009-03-24 4:46:13
Message-ID: 200903241546.13168.ianw2 () optusnet ! com ! au
[Download RAW message or body]

On Tue, 24 Mar 2009 1:30:41 pm Parker Coates wrote:
> In the KDEGames camp we've run into a small bit of trouble with
> KXmlGuiWindow generating an extra resize event on startup. An extra
> resize event may seem trivial enough, but because our games now all
> have resizable SVG based interfaces, a single extra resize event can
> mean extra SVG rendering, cache lookups, layout logic and a noticeable
> increase in start up time.
>
There are several threads on this problem in the KDE Games list about
15 months to a year ago.  There can actually be 1, 2 or 3 resize events
from KXmlGuiWindow, depending on the user's previous setup, and it
is apparently not possible to determine which is the "last" one.  The
following thread discusses the workaround I used in KGoldrunner:

http://lists.kde.org/?l=kde-games-devel&m=120071267328984&w=2

It also describes the various behaviors of KXMlGuiWindow with respect
to resize events and AFAIK still represents the state of play in KXmlGW.

><snip>
> So my questions are: Would it be possible to insert the menu bar at
> the same time as the tool and status bars so that the main widget is
> resized only once? If not, do you have any suggestions on how to avoid
> these resize events without relying on timers? I've had a look at the
> xmlgui code, but I'll quickly admit that most of it was over my head
> and I really didn't know what I was looking for.
>
I'm with Parker on this.  I think KXmlGuiWindow should only ever issue
*one* resize event - then the app need only ever need to do one setup
of the graphics in its central widget and one load of SVG.  Some SVG
theme-files are very large and can take a while to load and render.

Cheers, Ian W.
_______________________________________________
kde-games-devel mailing list
kde-games-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-games-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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