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

List:       kde-devel
Subject:    XBar development , asking for help when restoring top menu
From:       Aaron Lewis <aaron.lewis1989 () gmail ! com>
Date:       2010-08-21 9:15:14
Message-ID: 4C6F9922.9090507 () gmail ! com
[Download RAW message or body]

Hi,
	I'm currently working on a project, plasma-globalmenu , i tried source
code from kde web svn interface , and found it buggy.

So i did a modification ,  Source Code is here

http://kde-apps.org/content/show.php?content=129006

And fired a new wish or bug report :

http://osdir.com/ml/plasma-bugs/2010-08/msg00950.html

Now i'm meeting a problem , when i switched from a GTK application to a
program , without global menu support (like Firefox , OpenOffice ,
written in C++ totally maybe) , top menu won't disappear , while menu
actions was already deactivaed.

// This is a slot connected with KWindowSystem::windowRemoved(WId) , and
it works fine , when windows are closed , top menu restored to plasma.

void GlobalMenu::windowRemoved(WId wid)
{
    kDebug() << QString::number(wid,16);
    // Restore to "plasma" top menu when window closed.
    XBAR_SEND( MSG("unregisterMenu") << (qlonglong)wid );
}

// But another SLOT is called by KDE , but unregister command fails to
work properly , actions removed while menus stays the same

 connect(KWindowSystem::self(),SIGNAL(activeWindowChanged(WId)),
            this,SLOT(activeWindowChanged(WId));

void GlobalMenu::activeWindowChanged(WId wid)
{
..
 	// Thus , when window is not active , remove menu , fall back to
default XBar menu
	if(KWindowSystem::activeWindow() != WId) {
		XBAR_SEND( MSG("unregisterMenu") << (qlonglong)wid );
	}
..
}

Doesn't work , anyone could help ?

Thanks a Lot !

-- 
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4R0NL3WI5 on freenode
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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