diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2012-02-25 00:21:37 -0600 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2012-02-25 00:21:37 -0600 |
commit | 4b55c92774c89da479f4c63593f81963be3c4e35 (patch) | |
tree | 46b577907e7b22726c601f8b6671b317188e47f3 | |
parent | fc2650816b4b95f21750c53c0d45daeff31510d6 (diff) | |
parent | b45137ace06b893d9ff65b2d45fba978cb4f26ce (diff) | |
download | tdebase-4b55c92774c89da479f4c63593f81963be3c4e35.tar.gz tdebase-4b55c92774c89da479f4c63593f81963be3c4e35.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdebase
-rw-r--r-- | kdesktop/lock/main.cc | 3 | ||||
-rw-r--r-- | twin/client.cpp | 33 | ||||
-rw-r--r-- | twin/resumer/resumer.cpp | 4 |
3 files changed, 36 insertions, 4 deletions
diff --git a/kdesktop/lock/main.cc b/kdesktop/lock/main.cc index 4edd1b321..93206951d 100644 --- a/kdesktop/lock/main.cc +++ b/kdesktop/lock/main.cc @@ -53,6 +53,9 @@ bool in_internal_mode = FALSE; bool MyApp::x11EventFilter( XEvent *ev ) { + if (ev->type == ButtonPress || ev->type == ButtonRelease || ev->type == MotionNotify) { + emit mouseInteraction(ev); + } if (ev->type == XKeyPress || ev->type == ButtonPress) { emit activity(); } diff --git a/twin/client.cpp b/twin/client.cpp index 56b92e699..e6bb2b720 100644 --- a/twin/client.cpp +++ b/twin/client.cpp @@ -1841,6 +1841,9 @@ void Client::killProcess( bool ask, Time timestamp ) bool Client::isSuspendable() const { + bool cansuspend = true; + if( skipTaskbar() || skipPager() ) + return false; TQCString machine = wmClientMachine( true ); pid_t pid = info->pid(); if( pid <= 0 || machine.isEmpty()) // needed properties missing @@ -1872,7 +1875,30 @@ bool Client::isSuspendable() const if( state != 'T' ) { fclose(procfile); - return true; + // Make sure no windows of this process are special + for ( ClientList::ConstIterator it = workspace()->clients.begin(); it != workspace()->clients.end(); ++it) + { + Client* nextclient = *it; + pid_t nextpid = nextclient->info->pid(); + TQCString nextmachine = nextclient->wmClientMachine( true ); + if( nextpid > 0 && (!nextmachine.isEmpty())) + { + if( ( nextmachine == "localhost" ) && ( pid == nextpid ) ) + { + if( nextclient->skipTaskbar() || nextclient->skipPager() ) + cansuspend = false; + } + } + } + // Process exception list + TQString execname(tcomm); + execname.truncate(execname.length()-1); + execname = execname.remove(0,1); + // FIXME This list should not be hardcoded + if( (execname == "kdesktop") || (execname == "kicker") ) + return false; + else + return cansuspend; } else { @@ -1935,6 +1961,7 @@ bool Client::queryUserSuspendedResume() { return false; } + // FIXME We should display a busy cursor until twin_resumer_helper loads process_resumer = new KProcess( this ); *process_resumer << KStandardDirs::findExe( "twin_resumer_helper" ) << "--pid" << TQCString().setNum( info->pid() ) << "--hostname" << wmClientMachine( true ) @@ -2035,7 +2062,8 @@ void Client::processKillerExited() void Client::processResumerExited() { kdDebug( 1212 ) << "Resumer exited" << endl; - if (process_resumer->exitStatus() == 0) + // 0 means the user clicked Resume; 2 means that the resumer dialog failed to launch somehow + if ((process_resumer->exitStatus() == 0) || (process_resumer->exitStatus() == 2)) { resumeWindow(); takeFocus( Allowed ); @@ -2672,6 +2700,7 @@ void Client::setCursor( Position m ) } // TODO mit nejake checkCursor(), ktere se zavola v manage() a pri vecech, kdy by se kurzor mohl zmenit? +// TRANSLATION: TODO: have a checkCursor() function, which is called both in manage() and in cases where the cursor might change void Client::setCursor( const TQCursor& c ) { if( c.handle() == cursor.handle()) diff --git a/twin/resumer/resumer.cpp b/twin/resumer/resumer.cpp index d503e49a7..6a3477bb0 100644 --- a/twin/resumer/resumer.cpp +++ b/twin/resumer/resumer.cpp @@ -59,9 +59,9 @@ int main( int argc, char* argv[] ) Window id = args->getOption( "wid" ).toULong( &id_ok ); args->clear(); if( !pid_ok || pid == 0 || !id_ok || id == None - || hostname.isEmpty() || caption.isEmpty() || appname.isEmpty()) + || hostname.isEmpty() || caption.isEmpty()) { - KCmdLineArgs::usage( i18n( "This helper utility is not supposed to be called directly." )); + printf("%s\n", i18n( "This helper utility is not supposed to be called directly." ).ascii()); return 2; } TQString question = i18n( |