diff --git a/kcmkwin/kwinoptions/mouse.cpp b/kcmkwin/kwinoptions/mouse.cpp index e974f84ef0..19096f4b1b 100644 --- a/kcmkwin/kwinoptions/mouse.cpp +++ b/kcmkwin/kwinoptions/mouse.cpp @@ -273,8 +273,9 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf << i18n("Lower") << i18n("Operations Menu") << i18n("Toggle Raise & Lower") - << i18n("Nothing") - << i18n("Shade"); + << i18n("Shade") + << i18n("Close") + << i18n("Nothing"); combo = new QComboBox(box); combo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); @@ -316,6 +317,7 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, KConfig *_conf << i18n("Operations Menu") << i18n("Raise") << i18n("Lower") + << i18n("Close") << i18n("Nothing"); combo = new QComboBox(box); @@ -419,8 +421,9 @@ const char* const tbl_TiAc[] = { "Lower", "Operations menu", "Toggle raise and lower", - "Nothing", "Shade", + "Close", + "Nothing", "" }; const char* const tbl_TiInAc[] = { @@ -431,6 +434,7 @@ const char* const tbl_TiInAc[] = { "Operations menu", "Raise", "Lower", + "Close", "Nothing", "" }; diff --git a/options.cpp b/options.cpp index 0c381e643e..946b91e3bc 100644 --- a/options.cpp +++ b/options.cpp @@ -319,6 +319,7 @@ Options::MouseCommand Options::mouseCommand(const QString &name, bool restricted if (lowerName == "resize") return restricted ? MouseResize : MouseUnrestrictedResize; if (lowerName == "shade") return MouseShade; if (lowerName == "minimize") return MouseMinimize; + if (lowerName == "close") return MouseClose; if (lowerName == "nothing") return MouseNothing; return MouseNothing; } diff --git a/options.h b/options.h index 3cab87d025..6f727855d5 100644 --- a/options.h +++ b/options.h @@ -224,6 +224,7 @@ class Options : public KDecorationOptions MouseNextDesktop, MousePreviousDesktop, MouseAbove, MouseBelow, MouseOpacityMore, MouseOpacityLess, + MouseClose, MouseNothing }; diff --git a/useractions.cpp b/useractions.cpp index 5966c3fb85..9748b8a2fc 100644 --- a/useractions.cpp +++ b/useractions.cpp @@ -734,6 +734,9 @@ bool Client::performMouseCommand( Options::MouseCommand command, const QPoint &g if( !isDesktop() ) // No point in changing the opacity of the desktop setOpacity( qMax( opacity() - 0.1, 0.1 )); break; + case Options::MouseClose: + closeWindow(); + break; case Options::MouseNothing: replay = true; break;