--Boundary-00=_Y2kW+A4E2uwnf3t Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Monday 24 of February 2003 13:25, Melchior FRANZ wrote: > * Lubos Lunak -- Monday 24 February 2003 13:03: > > KGet works fine here. > > try kscd I don't have kscd in my test build *mumble* . Hmms, I see. QWidget::isActiveWindow() seems to be lying. I'll note that somewhere down in my TODO, but for now, KWinModule doesn't lie. The attached patch seems to work, and I'll commit it unless somebody can explain what those strange things I removed were good for. > > > Does it work better with the attached patch? That's how I think it > > should be done correctly. > > Would it fix the systray bug for "Focus (Strictly) Under Mouse"? No, it doesn't fix the systray bug for the focus bug ... oops, did I say it loud? There must be some kwin bugreport which requires a fix that should fix also this, but I cannot find it right now. -- Lubos Lunak KDE developer --------------------------------------------------------------------- SuSE CR, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org Drahobejlova 27 tel: +420 2 9654 2373 190 00 Praha 9 fax: +420 2 9654 2374 Czech Republic http://www.suse.cz/ --Boundary-00=_Y2kW+A4E2uwnf3t Content-Type: text/x-diff; charset="iso-8859-1"; name="ksystemtray.cpp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ksystemtray.cpp.patch" --- ksystemtray.cpp.sav 2003-01-02 13:00:58.000000000 +0100 +++ ksystemtray.cpp 2003-02-24 17:51:01.000000000 +0100 @@ -187,33 +187,23 @@ void KSystemTray::toggleMinimizeRestore( KWin::Info info = KWin::info( pw->winId() ); bool visible = (info.mappingState == NET::Visible); - if ( visible && !pw->isActiveWindow() ) // may be obscured -> raise it + // hack for KWin's non-compliant WM_STATE handling + visible = visible && ( info.desktop == KWin::currentDesktop()); + // SELI using !pw->isActiveWindow() should be enough here, + // but it doesn't work - e.g. with kscd, the "active" window + // is the widget docked in Kicker + if ( visible && ( KWinModule().activeWindow() != pw->winId() )) // visible not active -> activate { - KWinModule mod; - if ( mod.stackingOrder().last() != pw->winId() ) - { - if ( info.desktop == KWin::currentDesktop() ) - { - KWin::setActiveWindow( pw->winId() ); - return; - } - else - visible = false; - } + KWin::setActiveWindow( pw->winId() ); + return; } if ( !visible ) { - if ( info.mappingState != NET::Iconic ) - { - pw->hide(); // KWin::setOnDesktop( parentWidget()->winId(), KWin::currentDesktop() ); -#ifndef Q_WS_QWS //FIXME - pw->move( info.geometry.topLeft() ); -#endif - pw->show(); #ifndef Q_WS_QWS //FIXME - } - KWin::deIconifyWindow( pw->winId() ); + // TODO what to do with OnAllDesktops windows? (#32783) + KWin::setOnDesktop( pw->winId(), KWin::currentDesktop()); + pw->show(); KWin::setActiveWindow( pw->winId() ); #endif } else { --Boundary-00=_Y2kW+A4E2uwnf3t--