diff options
Diffstat (limited to 'kstart/kstart.cpp')
-rw-r--r-- | kstart/kstart.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kstart/kstart.cpp b/kstart/kstart.cpp index f3be8e607..d9b8b5e0b 100644 --- a/kstart/kstart.cpp +++ b/kstart/kstart.cpp @@ -56,7 +56,7 @@ KStart::KStart() else { // connect to window add to get the NEW windows connect(kwinmodule, TQT_SIGNAL(windowAdded(WId)), TQT_SLOT(windowAdded(WId))); - if (windowtitle) + if (windowtitle != 0) kwinmodule->doNotManage( windowtitle ); } // propagate the app startup notification info to the started app @@ -70,7 +70,7 @@ KStart::KStart() data.addPid( proc.pid() ); TQCString bin = proc.args().first(); data.setName( bin ); - data.setBin( bin.mid( bin.findRev( '/' ) + 1 )); + data.setBin( bin.mid( bin.tqfindRev( '/' ) + 1 )); KStartupInfo::sendChange( id, data ); } else @@ -82,14 +82,14 @@ KStart::KStart() void KStart::sendRule() { KXMessages msg; TQCString message; - if( windowtitle ) + if( windowtitle != 0 ) message += "title=" + windowtitle + "\ntitlematch=3\n"; // 3 = regexp match - if( windowclass ) + if( windowclass != 0 ) message += "wmclass=" + windowclass + "\nwmclassmatch=1\n" // 1 = exact match + "wmclasscomplete=" // if windowclass contains a space (i.e. 2 words, use whole WM_CLASS) - + ( windowclass.contains( ' ' ) ? "true" : "false" ) + "\n"; - if( windowtitle || windowclass ) { + + ( windowclass.tqcontains( ' ' ) ? "true" : "false" ) + "\n"; + if( (windowtitle != 0) || (windowclass != 0) ) { // always ignore these window types message += "types=" + TQCString().setNum( -1U & ~( NET::TopMenuMask | NET::ToolbarMask | NET::DesktopMask | NET::SplashMask | NET::MenuMask )) + "\n"; @@ -143,17 +143,17 @@ void KStart::windowAdded(WId w){ || info.windowType( SUPPORTED_WINDOW_TYPES_MASK ) == NET::Desktop ) return; - if ( windowtitle ) { + if ( windowtitle != 0 ) { TQString title = info.name().lower(); TQRegExp r( windowtitle.lower()); if (r.match(title) == -1) return; // no match } - if ( windowclass ) { + if ( windowclass != 0 ) { XClassHint hint; if( !XGetClassHint( qt_xdisplay(), w, &hint )) return; - TQCString cls = windowclass.contains( ' ' ) + TQCString cls = windowclass.tqcontains( ' ' ) ? TQCString( hint.res_name ) + ' ' + hint.res_class : TQCString( hint.res_class ); cls = cls.lower(); XFree( hint.res_name ); @@ -161,7 +161,7 @@ void KStart::windowAdded(WId w){ if( cls != windowclass ) return; } - if( !windowtitle && !windowclass ) { + if( (windowtitle == 0) && (windowclass == 0) ) { // accept only "normal" windows if( info.windowType( SUPPORTED_WINDOW_TYPES_MASK ) != NET::Unknown && info.windowType( SUPPORTED_WINDOW_TYPES_MASK ) != NET::Normal @@ -185,7 +185,7 @@ static bool wstate_withdrawn( WId winid ) &length, &after, &data ); bool withdrawn = TRUE; if ( r == Success && data && format == 32 ) { - Q_UINT32 *wstate = (Q_UINT32*)data; + TQ_UINT32 *wstate = (TQ_UINT32*)data; withdrawn = (*wstate == WithdrawnState ); XFree( (char *)data ); } @@ -322,7 +322,7 @@ int main( int argc, char *argv[] ) windowtitle = args->getOption( "window" ); windowclass = args->getOption( "windowclass" ); - if( windowclass ) + if( windowclass != 0 ) windowclass = windowclass.lower(); if( windowtitle.isEmpty() && windowclass.isEmpty()) |