Summary: | libtaskmanager allocates kwin_module on load, making it rather hard to use -- w/ fix | ||
---|---|---|---|
Product: | [Plasma] kicker | Reporter: | cbiffle |
Component: | general | Assignee: | cbiffle |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sane_purushottam |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | FreeBSD Ports | ||
OS: | FreeBSD | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
Patch to kdebase/kicker/taskmanager/taskmanager.cpp
Revision of earlier patch, now with comments. |
Description
cbiffle
2003-03-22 20:04:42 UTC
Created attachment 1218 [details]
Patch to kdebase/kicker/taskmanager/taskmanager.cpp
Adds lazy creation of kwin_module object. Prevents it from being allocated
before linking apps can do their initialization.
Thanks for the patch; looks good, please apply and update the comment above the declaration with the reasoning for the new behavior. I've attached a new patch that revises the comments in the area to reflect the new behavior. Created attachment 1219 [details]
Revision of earlier patch, now with comments.
Subject: kdebase/kicker/taskmanager CVS commit by firebaugh: Lazily allocate the kwin module. CCMAIL: 56251-done@bugs.kde.org M +5 -2 taskmanager.cpp 1.59 --- kdebase/kicker/taskmanager/taskmanager.cpp #1.58:1.59 @@ -47,9 +47,12 @@ template class QPtrList<Task>; // So, we'll leak a little memory, but it's better than crashing. // The real problem is that KWinModule should be a singleton. -KWinModule* kwin_module = new KWinModule(); +KWinModule* kwin_module = NULL; TaskManager::TaskManager(QObject *parent, const char *name) : QObject(parent, name), _active(0), _startup_info( NULL ) { + if ( kwin_module == NULL ) + kwin_module = new KWinModule(); + KGlobal::locale()->insertCatalogue("libtaskmanager"); connect(kwin_module, SIGNAL(windowAdded(WId)), SLOT(windowAdded(WId))); |