Added checkbox to invert mouse wheel direction in window's titlebar and frame actions.

This resolves issue TDE/tde#64.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/220/head
Michele Calgaro 3 years ago
parent 8665255c0c
commit 11a496c359
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -18,7 +18,7 @@
*/ */
#include <tqlabel.h> #include <tqlabel.h>
#include <tqcombobox.h> #include <tqcheckbox.h>
#include <tqwhatsthis.h> #include <tqwhatsthis.h>
#include <tqlayout.h> #include <tqlayout.h>
#include <tqvgroupbox.h> #include <tqvgroupbox.h>
@ -178,23 +178,28 @@ KTitleBarActionsConfig::KTitleBarActionsConfig (bool _standAlone, TDEConfig *_co
hlayoutW->addWidget(label); hlayoutW->addWidget(label);
txtButton4 = i18n("Handle mouse wheel events"); txtButton4 = i18n("Handle mouse wheel events");
TQWhatsThis::add( label, txtButton4); TQWhatsThis::add( label, txtButton4);
// Titlebar and frame mouse Wheel // Titlebar and frame mouse Wheel
TQComboBox* comboW = new TQComboBox(this); TQComboBox* comboW = new TQComboBox(this);
comboW->insertItem(i18n("Raise/Lower")); comboW->insertItem(i18n("Raise/Lower"));
comboW->insertItem(i18n("Shade/Unshade")); comboW->insertItem(i18n("Shade/Unshade"));
comboW->insertItem(i18n("Maximize/Restore")); comboW->insertItem(i18n("Maximize/Restore"));
comboW->insertItem(i18n("Keep Above/Below")); comboW->insertItem(i18n("Keep Above/Below"));
comboW->insertItem(i18n("Move to Previous/Next Desktop")); comboW->insertItem(i18n("Move to Previous/Next Desktop"));
comboW->insertItem(i18n("Change Opacity")); comboW->insertItem(i18n("Change Opacity"));
comboW->insertItem(i18n("Nothing")); comboW->insertItem(i18n("Nothing"));
comboW->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed)); comboW->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed));
connect(comboW, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); connect(comboW, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
hlayoutW->addWidget(comboW); hlayoutW->addWidget(comboW);
coTiAct4 = comboW; coTiW = comboW;
TQWhatsThis::add(comboW, txtButton4); TQWhatsThis::add(comboW, txtButton4);
label->setBuddy(comboW); label->setBuddy(comboW);
cbTiRevW = new TQCheckBox(i18n("Reverse wheel direction"), this);
connect(cbTiRevW, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
TQWhatsThis::add( cbTiRevW, i18n("Use this to reverse the action of the mouse wheel.") );
hlayoutW->addWidget(cbTiRevW);
/** Titlebar and frame **************/ /** Titlebar and frame **************/
box = new TQVGroupBox( i18n("Titlebar && Frame"), this, "Titlebar and Frame"); box = new TQVGroupBox( i18n("Titlebar && Frame"), this, "Titlebar and Frame");
@ -491,8 +496,8 @@ void KTitleBarActionsConfig::setComboText( TQComboBox* combo, const char*txt )
combo->setCurrentItem( tbl_txt_lookup( tbl_TiAc, txt )); combo->setCurrentItem( tbl_txt_lookup( tbl_TiAc, txt ));
else if( combo == coTiInAct1 || combo == coTiInAct2 || combo == coTiInAct3 ) else if( combo == coTiInAct1 || combo == coTiInAct2 || combo == coTiInAct3 )
combo->setCurrentItem( tbl_txt_lookup( tbl_TiInAc, txt )); combo->setCurrentItem( tbl_txt_lookup( tbl_TiInAc, txt ));
else if( combo == coTiAct4 ) else if( combo == coTiW )
combo->setCurrentItem( tbl_txt_lookup( tbl_TiWAc, txt )); combo->setCurrentItem( tbl_txt_lookup( tbl_TiWAc, txt ));
else if( combo == coMax[0] || combo == coMax[1] || combo == coMax[2] ) else if( combo == coMax[0] || combo == coMax[1] || combo == coMax[2] )
{ {
combo->setCurrentItem( tbl_txt_lookup( tbl_Max, txt )); combo->setCurrentItem( tbl_txt_lookup( tbl_Max, txt ));
@ -538,10 +543,11 @@ void KTitleBarActionsConfig::load()
setComboText(coTiAct1,config->readEntry("CommandActiveTitlebar1","Raise").ascii()); setComboText(coTiAct1,config->readEntry("CommandActiveTitlebar1","Raise").ascii());
setComboText(coTiAct2,config->readEntry("CommandActiveTitlebar2","Lower").ascii()); setComboText(coTiAct2,config->readEntry("CommandActiveTitlebar2","Lower").ascii());
setComboText(coTiAct3,config->readEntry("CommandActiveTitlebar3","Operations menu").ascii()); setComboText(coTiAct3,config->readEntry("CommandActiveTitlebar3","Operations menu").ascii());
setComboText(coTiAct4,config->readEntry("CommandTitlebarWheel","Nothing").ascii());
setComboText(coTiInAct1,config->readEntry("CommandInactiveTitlebar1","Activate and raise").ascii()); setComboText(coTiInAct1,config->readEntry("CommandInactiveTitlebar1","Activate and raise").ascii());
setComboText(coTiInAct2,config->readEntry("CommandInactiveTitlebar2","Activate and lower").ascii()); setComboText(coTiInAct2,config->readEntry("CommandInactiveTitlebar2","Activate and lower").ascii());
setComboText(coTiInAct3,config->readEntry("CommandInactiveTitlebar3","Operations menu").ascii()); setComboText(coTiInAct3,config->readEntry("CommandInactiveTitlebar3","Operations menu").ascii());
setComboText(coTiW,config->readEntry("CommandTitlebarWheel","Nothing").ascii());
cbTiRevW->setChecked(config->readBoolEntry("CommandTitlebarReverseWheel", false));
} }
void KTitleBarActionsConfig::save() void KTitleBarActionsConfig::save()
@ -556,10 +562,11 @@ void KTitleBarActionsConfig::save()
config->writeEntry("CommandActiveTitlebar2", functionTiAc(coTiAct2->currentItem())); config->writeEntry("CommandActiveTitlebar2", functionTiAc(coTiAct2->currentItem()));
config->writeEntry("CommandActiveTitlebar3", functionTiAc(coTiAct3->currentItem())); config->writeEntry("CommandActiveTitlebar3", functionTiAc(coTiAct3->currentItem()));
config->writeEntry("CommandInactiveTitlebar1", functionTiInAc(coTiInAct1->currentItem())); config->writeEntry("CommandInactiveTitlebar1", functionTiInAc(coTiInAct1->currentItem()));
config->writeEntry("CommandTitlebarWheel", functionTiWAc(coTiAct4->currentItem()));
config->writeEntry("CommandInactiveTitlebar2", functionTiInAc(coTiInAct2->currentItem())); config->writeEntry("CommandInactiveTitlebar2", functionTiInAc(coTiInAct2->currentItem()));
config->writeEntry("CommandInactiveTitlebar3", functionTiInAc(coTiInAct3->currentItem())); config->writeEntry("CommandInactiveTitlebar3", functionTiInAc(coTiInAct3->currentItem()));
config->writeEntry("CommandTitlebarWheel", functionTiWAc(coTiW->currentItem()));
config->writeEntry("CommandTitlebarReverseWheel", cbTiRevW->isChecked());
if (standAlone) if (standAlone)
{ {
config->sync(); config->sync();
@ -575,10 +582,11 @@ void KTitleBarActionsConfig::defaults()
setComboText(coTiAct1,"Raise"); setComboText(coTiAct1,"Raise");
setComboText(coTiAct2,"Lower"); setComboText(coTiAct2,"Lower");
setComboText(coTiAct3,"Operations menu"); setComboText(coTiAct3,"Operations menu");
setComboText(coTiAct4,"Nothing");
setComboText(coTiInAct1,"Activate and raise"); setComboText(coTiInAct1,"Activate and raise");
setComboText(coTiInAct2,"Activate and lower"); setComboText(coTiInAct2,"Activate and lower");
setComboText(coTiInAct3,"Operations menu"); setComboText(coTiInAct3,"Operations menu");
setComboText(coTiW,"Nothing");
cbTiRevW->setChecked(false);
for (int t = 0; t < 3; ++t) for (int t = 0; t < 3; ++t)
setComboText(coMax[t], tbl_Max[t]); setComboText(coMax[t], tbl_Max[t]);
} }
@ -676,7 +684,7 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config
TQWhatsThis::add( box, i18n("Here you can customize TDE's behavior when clicking somewhere into" TQWhatsThis::add( box, i18n("Here you can customize TDE's behavior when clicking somewhere into"
" a window while pressing a modifier key.")); " a window while pressing a modifier key."));
grid = new TQGrid(5, Qt::Vertical, box); grid = new TQGrid(6, Qt::Vertical, box);
// Labels // Labels
label = new TQLabel(i18n("Modifier key:"), grid); label = new TQLabel(i18n("Modifier key:"), grid);
@ -716,6 +724,8 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config
" in a window while pressing the modifier key."); " in a window while pressing the modifier key.");
TQWhatsThis::add( label, strAllW); TQWhatsThis::add( label, strAllW);
label = new TQLabel("", grid); // Dummy label to keep grid in order
// Combo's // Combo's
combo = new TQComboBox(grid); combo = new TQComboBox(grid);
combo->insertItem(i18n("Meta")); combo->insertItem(i18n("Meta"));
@ -756,14 +766,18 @@ KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config
combo->insertItem(i18n("Raise/Lower")); combo->insertItem(i18n("Raise/Lower"));
combo->insertItem(i18n("Shade/Unshade")); combo->insertItem(i18n("Shade/Unshade"));
combo->insertItem(i18n("Maximize/Restore")); combo->insertItem(i18n("Maximize/Restore"));
combo->insertItem(i18n("Keep Above/Below")); combo->insertItem(i18n("Keep Above/Below"));
combo->insertItem(i18n("Move to Previous/Next Desktop")); combo->insertItem(i18n("Move to Previous/Next Desktop"));
combo->insertItem(i18n("Change Opacity")); combo->insertItem(i18n("Change Opacity"));
combo->insertItem(i18n("Nothing")); combo->insertItem(i18n("Nothing"));
connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed())); connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
coAllW = combo; coAllW = combo;
TQWhatsThis::add( combo, strAllW ); TQWhatsThis::add( combo, strAllW );
cbAllRevW = new TQCheckBox(i18n("Reverse wheel direction"), grid);
connect(cbAllRevW, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
TQWhatsThis::add( cbAllRevW, i18n("Use this to reverse the action of the mouse wheel.") );
layout->addStretch(); layout->addStretch();
load(); load();
@ -784,7 +798,7 @@ void KWindowActionsConfig::setComboText( TQComboBox* combo, const char*txt )
else if( combo == coAll1 || combo == coAll2 || combo == coAll3 ) else if( combo == coAll1 || combo == coAll2 || combo == coAll3 )
combo->setCurrentItem( tbl_txt_lookup( tbl_All, txt )); combo->setCurrentItem( tbl_txt_lookup( tbl_All, txt ));
else if( combo == coAllW ) else if( combo == coAllW )
combo->setCurrentItem( tbl_txt_lookup( tbl_AllW, txt )); combo->setCurrentItem( tbl_txt_lookup( tbl_AllW, txt ));
else else
abort(); abort();
} }
@ -820,6 +834,7 @@ void KWindowActionsConfig::load()
setComboText(coAll2,config->readEntry("CommandAll2","Toggle raise and lower").ascii()); setComboText(coAll2,config->readEntry("CommandAll2","Toggle raise and lower").ascii());
setComboText(coAll3,config->readEntry("CommandAll3","Resize").ascii()); setComboText(coAll3,config->readEntry("CommandAll3","Resize").ascii());
setComboText(coAllW,config->readEntry("CommandAllWheel","Nothing").ascii()); setComboText(coAllW,config->readEntry("CommandAllWheel","Nothing").ascii());
cbAllRevW->setChecked(config->readBoolEntry("CommandAllReverseWheel", false));
} }
void KWindowActionsConfig::save() void KWindowActionsConfig::save()
@ -833,7 +848,8 @@ void KWindowActionsConfig::save()
config->writeEntry("CommandAll2", functionAll(coAll2->currentItem())); config->writeEntry("CommandAll2", functionAll(coAll2->currentItem()));
config->writeEntry("CommandAll3", functionAll(coAll3->currentItem())); config->writeEntry("CommandAll3", functionAll(coAll3->currentItem()));
config->writeEntry("CommandAllWheel", functionAllW(coAllW->currentItem())); config->writeEntry("CommandAllWheel", functionAllW(coAllW->currentItem()));
config->writeEntry("CommandAllReverseWheel", cbAllRevW->isChecked());
if (standAlone) if (standAlone)
{ {
config->sync(); config->sync();
@ -853,4 +869,5 @@ void KWindowActionsConfig::defaults()
setComboText(coAll2,"Toggle raise and lower"); setComboText(coAll2,"Toggle raise and lower");
setComboText(coAll3,"Resize"); setComboText(coAll3,"Resize");
setComboText(coAllW,"Nothing"); setComboText(coAllW,"Nothing");
cbAllRevW->setChecked(false);
} }

@ -22,6 +22,7 @@
#ifndef __KKWMMOUSECONFIG_H__ #ifndef __KKWMMOUSECONFIG_H__
#define __KKWMMOUSECONFIG_H__ #define __KKWMMOUSECONFIG_H__
class TQCheckBox;
class TDEConfig; class TDEConfig;
#include <tqwidget.h> #include <tqwidget.h>
@ -33,7 +34,7 @@ class TDEConfig;
class ToolTipComboBox: public TQComboBox class ToolTipComboBox: public TQComboBox
{ {
Q_OBJECT Q_OBJECT
public: public:
ToolTipComboBox(TQWidget * owner, char const * const * toolTips_) ToolTipComboBox(TQWidget * owner, char const * const * toolTips_)
: TQComboBox(owner) : TQComboBox(owner)
@ -62,18 +63,18 @@ public:
void defaults(); void defaults();
public slots: public slots:
void changed() { emit TDECModule::changed(true); } void changed() { emit TDECModule::changed(true); }
private: private:
TQComboBox* coTiDbl; TQComboBox* coTiDbl;
TQComboBox* coTiAct1; TQComboBox* coTiAct1;
TQComboBox* coTiAct2; TQComboBox* coTiAct2;
TQComboBox* coTiAct3; TQComboBox* coTiAct3;
TQComboBox* coTiAct4;
TQComboBox* coTiInAct1; TQComboBox* coTiInAct1;
TQComboBox* coTiInAct2; TQComboBox* coTiInAct2;
TQComboBox* coTiInAct3; TQComboBox* coTiInAct3;
TQComboBox* coTiW;
TQCheckBox* cbTiRevW;
ToolTipComboBox * coMax[3]; ToolTipComboBox * coMax[3];
@ -82,7 +83,7 @@ private:
const char* functionTiDbl(int); const char* functionTiDbl(int);
const char* functionTiAc(int); const char* functionTiAc(int);
const char* functionTiWAc(int); const char* functionTiWAc(int);
const char* functionTiInAc(int); const char* functionTiInAc(int);
const char* functionMax(int); const char* functionMax(int);
@ -108,7 +109,7 @@ public:
void defaults(); void defaults();
public slots: public slots:
void changed() { emit TDECModule::changed(true); } void changed() { emit TDECModule::changed(true); }
private: private:
TQComboBox* coWin1; TQComboBox* coWin1;
@ -120,6 +121,7 @@ private:
TQComboBox* coAll2; TQComboBox* coAll2;
TQComboBox* coAll3; TQComboBox* coAll3;
TQComboBox* coAllW; TQComboBox* coAllW;
TQCheckBox* cbAllRevW;
TDEConfig *config; TDEConfig *config;
bool standAlone; bool standAlone;

@ -71,12 +71,12 @@ unsigned long Options::updateSettings()
altTabStyle = KDE; // what a default :-) altTabStyle = KDE; // what a default :-)
if ( val == "CDE" ) if ( val == "CDE" )
altTabStyle = CDE; altTabStyle = CDE;
separateScreenFocus = config->readBoolEntry( "SeparateScreenFocus", false ); separateScreenFocus = config->readBoolEntry( "SeparateScreenFocus", false );
activeMouseScreen = config->readBoolEntry( "ActiveMouseScreen", focusPolicy != ClickToFocus ); activeMouseScreen = config->readBoolEntry( "ActiveMouseScreen", focusPolicy != ClickToFocus );
rollOverDesktops = config->readBoolEntry("RollOverDesktops", TRUE); rollOverDesktops = config->readBoolEntry("RollOverDesktops", TRUE);
// focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 2 ); // focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 2 );
// TODO use low level for now // TODO use low level for now
focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 1 ); focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 1 );
@ -101,14 +101,14 @@ unsigned long Options::updateSettings()
animateMinimize = config->readBoolEntry("AnimateMinimize", TRUE ); animateMinimize = config->readBoolEntry("AnimateMinimize", TRUE );
animateMinimizeSpeed = config->readNumEntry("AnimateMinimizeSpeed", 5 ); animateMinimizeSpeed = config->readNumEntry("AnimateMinimizeSpeed", 5 );
if( focusPolicy == ClickToFocus ) if( focusPolicy == ClickToFocus )
{ {
autoRaise = false; autoRaise = false;
autoRaiseInterval = 0; autoRaiseInterval = 0;
delayFocus = false; delayFocus = false;
delayFocusInterval = 0; delayFocusInterval = 0;
} }
else else
{ {
autoRaise = config->readBoolEntry("AutoRaise", FALSE ); autoRaise = config->readBoolEntry("AutoRaise", FALSE );
autoRaiseInterval = config->readNumEntry("AutoRaiseInterval", 0 ); autoRaiseInterval = config->readNumEntry("AutoRaiseInterval", 0 );
@ -159,6 +159,7 @@ unsigned long Options::updateSettings()
CmdInactiveTitlebar2 = mouseCommand(config->readEntry("CommandInactiveTitlebar2","Activate and lower"), true ); CmdInactiveTitlebar2 = mouseCommand(config->readEntry("CommandInactiveTitlebar2","Activate and lower"), true );
CmdInactiveTitlebar3 = mouseCommand(config->readEntry("CommandInactiveTitlebar3","Operations menu"), true ); CmdInactiveTitlebar3 = mouseCommand(config->readEntry("CommandInactiveTitlebar3","Operations menu"), true );
CmdTitlebarWheel = mouseWheelCommand(config->readEntry("CommandTitlebarWheel","Nothing")); CmdTitlebarWheel = mouseWheelCommand(config->readEntry("CommandTitlebarWheel","Nothing"));
CmdTitlebarRevWheel = config->readBoolEntry("CommandTitlebarReverseWheel", false);
CmdWindow1 = mouseCommand(config->readEntry("CommandWindow1","Activate, raise and pass click"), false ); CmdWindow1 = mouseCommand(config->readEntry("CommandWindow1","Activate, raise and pass click"), false );
CmdWindow2 = mouseCommand(config->readEntry("CommandWindow2","Activate and pass click"), false ); CmdWindow2 = mouseCommand(config->readEntry("CommandWindow2","Activate and pass click"), false );
CmdWindow3 = mouseCommand(config->readEntry("CommandWindow3","Activate and pass click"), false ); CmdWindow3 = mouseCommand(config->readEntry("CommandWindow3","Activate and pass click"), false );
@ -167,6 +168,7 @@ unsigned long Options::updateSettings()
CmdAll2 = mouseCommand(config->readEntry("CommandAll2","Toggle raise and lower"), false ); CmdAll2 = mouseCommand(config->readEntry("CommandAll2","Toggle raise and lower"), false );
CmdAll3 = mouseCommand(config->readEntry("CommandAll3","Resize"), false ); CmdAll3 = mouseCommand(config->readEntry("CommandAll3","Resize"), false );
CmdAllWheel = mouseWheelCommand(config->readEntry("CommandAllWheel","Nothing")); CmdAllWheel = mouseWheelCommand(config->readEntry("CommandAllWheel","Nothing"));
CmdAllRevWheel = config->readBoolEntry("CommandAllReverseWheel", false);
//translucency settings //translucency settings
config->setGroup( "Notification Messages" ); config->setGroup( "Notification Messages" );
@ -193,7 +195,7 @@ unsigned long Options::updateSettings()
resetKompmgr = config->readBoolEntry("ResetKompmgr", false); resetKompmgr = config->readBoolEntry("ResetKompmgr", false);
if (resetKompmgr) if (resetKompmgr)
config->writeEntry("ResetKompmgr",FALSE); config->writeEntry("ResetKompmgr",FALSE);
// window drop shadows // window drop shadows
config->setGroup("Style"); config->setGroup("Style");
shadow_colour = config->readColorEntry("ShadowColour", &TQt::black); shadow_colour = config->readColorEntry("ShadowColour", &TQt::black);
@ -213,7 +215,7 @@ unsigned long Options::updateSettings()
shadow_x_offset = config->readNumEntry("ShadowXOffset", 0); shadow_x_offset = config->readNumEntry("ShadowXOffset", 0);
shadow_y_offset = config->readNumEntry("ShadowYOffset", 10); shadow_y_offset = config->readNumEntry("ShadowYOffset", 10);
// Read button tooltip animation effect from kdeglobals // Read button tooltip animation effect from kdeglobals
// Since we want to allow users to enable window decoration tooltips // Since we want to allow users to enable window decoration tooltips
// and not tdestyle tooltips and vise-versa, we don't read the // and not tdestyle tooltips and vise-versa, we don't read the
@ -227,7 +229,7 @@ unsigned long Options::updateSettings()
desktop_topmenu = kdesktopcfg.readBoolEntry( "ShowMenubar", false ); desktop_topmenu = kdesktopcfg.readBoolEntry( "ShowMenubar", false );
if( desktop_topmenu ) if( desktop_topmenu )
topmenus = true; topmenus = true;
TQToolTip::setGloballyEnabled( d->show_tooltips ); TQToolTip::setGloballyEnabled( d->show_tooltips );
return changed; return changed;
@ -386,8 +388,12 @@ bool Options::checkIgnoreFocusStealing( const Client* c )
return ignoreFocusStealingClasses.contains(TQString::fromLatin1(c->resourceClass())); return ignoreFocusStealingClasses.contains(TQString::fromLatin1(c->resourceClass()));
} }
Options::MouseCommand Options::wheelToMouseCommand( MouseWheelCommand com, int delta ) Options::MouseCommand Options::wheelToMouseCommand( MouseWheelCommand com, int delta, bool revDir )
{
if (revDir)
{ {
delta = -delta;
}
switch( com ) switch( com )
{ {
case MouseWheelRaiseLower: case MouseWheelRaiseLower:

@ -25,7 +25,7 @@ namespace KWinInternal
class Client; class Client;
class Options : public KDecorationOptions class Options : public KDecorationOptions
{ {
public: public:
@ -124,7 +124,7 @@ class Options : public KDecorationOptions
*/ */
enum AltTabStyle { KDE, CDE }; enum AltTabStyle { KDE, CDE };
AltTabStyle altTabStyle; AltTabStyle altTabStyle;
// whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client) // whether to see Xinerama screens separately for focus (in Alt+Tab, when activating next client)
bool separateScreenFocus; bool separateScreenFocus;
// whether active Xinerama screen is the one with mouse (or with the active window) // whether active Xinerama screen is the one with mouse (or with the active window)
@ -138,7 +138,7 @@ class Options : public KDecorationOptions
bool xineramaMovementEnabled; bool xineramaMovementEnabled;
bool xineramaMaximizeEnabled; bool xineramaMaximizeEnabled;
bool xineramaFullscreenEnabled; bool xineramaFullscreenEnabled;
// number, or -1 = active screen (Workspace::activeScreen()) // number, or -1 = active screen (Workspace::activeScreen())
int xineramaPlacementScreen; int xineramaPlacementScreen;
@ -149,13 +149,13 @@ class Options : public KDecorationOptions
MoveResizeMode resizeMode; MoveResizeMode resizeMode;
MoveResizeMode moveMode; MoveResizeMode moveMode;
static MoveResizeMode stringToMoveResizeMode( const TQString& s ); static MoveResizeMode stringToMoveResizeMode( const TQString& s );
static const char* moveResizeModeToString( MoveResizeMode mode ); static const char* moveResizeModeToString( MoveResizeMode mode );
Placement::Policy placement; Placement::Policy placement;
bool focusPolicyIsReasonable() bool focusPolicyIsReasonable()
{ {
return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse; return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse;
} }
@ -190,7 +190,7 @@ class Options : public KDecorationOptions
* Animation speed (0 .. 10 ) * Animation speed (0 .. 10 )
*/ */
int animateMinimizeSpeed; int animateMinimizeSpeed;
bool showDesktopIsMinimizeAll; bool showDesktopIsMinimizeAll;
/** /**
@ -205,12 +205,12 @@ class Options : public KDecorationOptions
* List of window classes to ignore PPosition size hint * List of window classes to ignore PPosition size hint
*/ */
TQStringList ignorePositionClasses; TQStringList ignorePositionClasses;
bool checkIgnoreFocusStealing( const Client* c ); bool checkIgnoreFocusStealing( const Client* c );
WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; } WindowOperation operationTitlebarDblClick() { return OpTitlebarDblClick; }
enum MouseCommand enum MouseCommand
{ {
MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower, MouseRaise, MouseLower, MouseOperationsMenu, MouseToggleRaiseAndLower,
MouseActivateAndRaise, MouseActivateAndLower, MouseActivate, MouseActivateAndRaise, MouseActivateAndLower, MouseActivate,
@ -225,7 +225,7 @@ class Options : public KDecorationOptions
MouseOpacityMore, MouseOpacityLess, MouseOpacityMore, MouseOpacityLess,
MouseNothing MouseNothing
}; };
enum MouseWheelCommand enum MouseWheelCommand
{ {
MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore, MouseWheelRaiseLower, MouseWheelShadeUnshade, MouseWheelMaximizeRestore,
@ -236,11 +236,11 @@ class Options : public KDecorationOptions
MouseCommand operationTitlebarMouseWheel( int delta ) MouseCommand operationTitlebarMouseWheel( int delta )
{ {
return wheelToMouseCommand( CmdTitlebarWheel, delta ); return wheelToMouseCommand( CmdTitlebarWheel, delta, CmdTitlebarRevWheel );
} }
MouseCommand operationWindowMouseWheel( int delta ) MouseCommand operationWindowMouseWheel( int delta )
{ {
return wheelToMouseCommand( CmdAllWheel, delta ); return wheelToMouseCommand( CmdAllWheel, delta, CmdAllRevWheel );
} }
MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; } MouseCommand commandActiveTitlebar1() { return CmdActiveTitlebar1; }
@ -319,13 +319,13 @@ class Options : public KDecorationOptions
* @returns the activation delay for electric borders in milliseconds. * @returns the activation delay for electric borders in milliseconds.
*/ */
int electricBorderDelay(); int electricBorderDelay();
bool topMenuEnabled() const { return topmenus; } bool topMenuEnabled() const { return topmenus; }
bool desktopTopMenu() const { return desktop_topmenu; } bool desktopTopMenu() const { return desktop_topmenu; }
// timeout before non-responding application will be killed after attempt to close // timeout before non-responding application will be killed after attempt to close
int killPingTimeout; int killPingTimeout;
// Whether to hide utility windows for inactive applications. // Whether to hide utility windows for inactive applications.
bool hideUtilityWindowsForInactive; bool hideUtilityWindowsForInactive;
@ -362,6 +362,7 @@ class Options : public KDecorationOptions
MouseCommand CmdInactiveTitlebar2; MouseCommand CmdInactiveTitlebar2;
MouseCommand CmdInactiveTitlebar3; MouseCommand CmdInactiveTitlebar3;
MouseWheelCommand CmdTitlebarWheel; MouseWheelCommand CmdTitlebarWheel;
bool CmdTitlebarRevWheel;
MouseCommand CmdWindow1; MouseCommand CmdWindow1;
MouseCommand CmdWindow2; MouseCommand CmdWindow2;
MouseCommand CmdWindow3; MouseCommand CmdWindow3;
@ -369,6 +370,7 @@ class Options : public KDecorationOptions
MouseCommand CmdAll2; MouseCommand CmdAll2;
MouseCommand CmdAll3; MouseCommand CmdAll3;
MouseWheelCommand CmdAllWheel; MouseWheelCommand CmdAllWheel;
bool CmdAllRevWheel;
uint CmdAllModKey; uint CmdAllModKey;
int electric_borders; int electric_borders;
@ -395,7 +397,7 @@ class Options : public KDecorationOptions
// List of window classes for which not to use focus stealing prevention // List of window classes for which not to use focus stealing prevention
TQStringList ignoreFocusStealingClasses; TQStringList ignoreFocusStealingClasses;
MouseCommand wheelToMouseCommand( MouseWheelCommand com, int delta ); MouseCommand wheelToMouseCommand( MouseWheelCommand com, int delta, bool revDir );
}; };
extern Options* options; extern Options* options;

Loading…
Cancel
Save