From d160a6fc0101dd094195f8d0782e8aefcf94d376 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 20 Feb 2012 02:24:32 -0600 Subject: Update twin with initial framework for application suspend/resume This needs some additional work before it can be enabled --- twin/useractions.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'twin/useractions.cpp') diff --git a/twin/useractions.cpp b/twin/useractions.cpp index a265a1784..6542cdb99 100644 --- a/twin/useractions.cpp +++ b/twin/useractions.cpp @@ -68,6 +68,10 @@ TQPopupMenu* Workspace::clientPopup() advanced_popup->insertItem( i18n("Shad&ow"), Options::ShadowOp ); advanced_popup->insertItem( SmallIconSet("key_bindings"), i18n("Window &Shortcut...")+'\t'+keys->shortcut("Setup Window Shortcut").seq(0).toString(), Options::SetupWindowShortcutOp ); +// FIXME +// Uncomment these actions when twin can handle suspended applications in a user friendly manner +// advanced_popup->insertItem( SmallIconSet( "suspend" ), i18n("&Suspend Application"), Options::SuspendWindowOp ); +// advanced_popup->insertItem( SmallIconSet( "exec" ), i18n("&Resume Application"), Options::ResumeWindowOp ); advanced_popup->insertItem( SmallIconSet( "wizard" ), i18n("&Special Window Settings..."), Options::WindowRulesOp ); advanced_popup->insertItem( SmallIconSet( "wizard" ), i18n("&Special Application Settings..."), Options::ApplicationRulesOp ); @@ -171,6 +175,8 @@ void Workspace::clientPopupAboutToShow() advanced_popup->setItemChecked( Options::KeepBelowOp, active_popup_client->keepBelow() ); advanced_popup->setItemChecked( Options::FullScreenOp, active_popup_client->isFullScreen() ); advanced_popup->setItemEnabled( Options::FullScreenOp, active_popup_client->userCanSetFullScreen() ); + advanced_popup->setItemEnabled( Options::SuspendWindowOp, active_popup_client->isSuspendable() ); + advanced_popup->setItemEnabled( Options::ResumeWindowOp, active_popup_client->isResumeable() ); advanced_popup->setItemChecked( Options::NoBorderOp, active_popup_client->noBorder() ); advanced_popup->setItemEnabled( Options::NoBorderOp, active_popup_client->userCanSetNoBorder() ); @@ -436,6 +442,12 @@ void Workspace::performWindowOperation( Client* c, Options::WindowOperation op ) case Options::OperationsOp: c->performMouseCommand( Options::MouseShade, TQCursor::pos()); break; + case Options::SuspendWindowOp: + c->suspendWindow(); + break; + case Options::ResumeWindowOp: + c->resumeWindow(); + break; case Options::WindowRulesOp: editWindowRules( c, false ); break; @@ -991,6 +1003,22 @@ void Workspace::slotKillWindow() kill.start(); } +/*! + Suspend Window feature + */ +void Workspace::slotSuspendWindow() + { + active_popup_client->suspendWindow(); + } + +/*! + Resume Window feature + */ +void Workspace::slotResumeWindow() + { + active_popup_client->resumeWindow(); + } + /*! Sends the popup client to desktop \a desk -- cgit v1.2.1