Add a hidden option for the ping timeout before the dialog offering

killing the app appears (for #69211).

svn path=/trunk/kdebase/kwin/; revision=319659
icc-effect-5.14.5
Luboš Luňák 2004-06-11 15:01:18 +00:00
parent e27084eb80
commit 33b11f1f07
4 changed files with 9 additions and 1 deletions

View File

@ -973,11 +973,13 @@ void Client::pingWindow()
{
if( !Pping )
return; // can't ping :(
if( options->killPingTimeout == 0 )
return; // turned off
if( ping_timer != NULL )
return; // pinging already
ping_timer = new QTimer( this );
connect( ping_timer, SIGNAL( timeout()), SLOT( pingTimeout()));
ping_timer->start( 5000, true ); // give it 5 seconds
ping_timer->start( options->killPingTimeout, true );
ping_timestamp = qt_x_time;
workspace()->sendPingToWindow( window(), ping_timestamp );
}

View File

@ -55,6 +55,7 @@
<entry key="ElectricBorders" type="Int" />
<entry key="ElectricBorderDelay" type="Int" />
<entry key="IgnorePositionClasses" type="StringList" />
<entry key="KillPingTimeout" type="Int" />
</group>
<group name="WM" >
<entry key="frame" type="Color" />

View File

@ -141,6 +141,8 @@ unsigned long Options::updateSettings()
++it )
(*it) = (*it).lower();
killPingTimeout = config->readNumEntry( "KillPingTimeout", 5000 );
// Mouse bindings
config->setGroup( "MouseBindings");
CmdActiveTitlebar1 = mouseCommand(config->readEntry("CommandActiveTitlebar1","Raise"), true );

View File

@ -252,6 +252,9 @@ class Options : public KDecorationOptions
bool topMenuEnabled() const { return topmenus; }
bool desktopTopMenu() const { return desktop_topmenu; }
// timeout before non-responding application will be killed after attempt to close
int killPingTimeout;
private:
WindowOperation OpTitlebarDblClick;