diff options
Diffstat (limited to 'twin/options.cpp')
-rw-r--r-- | twin/options.cpp | 43 |
1 files changed, 32 insertions, 11 deletions
diff --git a/twin/options.cpp b/twin/options.cpp index ce35f6d06..46c557b4a 100644 --- a/twin/options.cpp +++ b/twin/options.cpp @@ -31,8 +31,8 @@ namespace KWinInternal #ifndef KCMRULES Options::Options() - : electric_borders( 0 ), - electric_border_delay(0) + : active_borders( 0 ), + active_border_delay(0) { d = new KDecorationOptionsPrivate; d->defaultKWinSettings(); @@ -51,9 +51,11 @@ unsigned long Options::updateSettings() changed |= d->updateKWinSettings( config ); // read decoration settings config->setGroup( "Windows" ); - moveMode = stringToMoveResizeMode( config->readEntry("MoveMode", "Opaque" )); - resizeMode = stringToMoveResizeMode( config->readEntry("ResizeMode", "Opaque" )); + moveMode = stringToMoveResizeMode(config->readEntry("MoveMode", "Opaque")); + resizeMode = stringToMoveResizeMode(config->readEntry("ResizeMode", "Opaque")); + tilingMode = stringToMoveResizeMode(config->readEntry("TilingMode", "Opaque")); show_geometry_tip = config->readBoolEntry("GeometryTip", false); + reset_maximized_window_geometry = config->readBoolEntry("ResetMaximizedWindowGeometry", false); tabboxOutline = config->readBoolEntry("TabboxOutline", true); TQString val; @@ -125,8 +127,17 @@ unsigned long Options::updateSettings() borderSnapZone = config->readNumEntry("BorderSnapZone", 10); windowSnapZone = config->readNumEntry("WindowSnapZone", 10); snapOnlyWhenOverlapping=config->readBoolEntry("SnapOnlyWhenOverlapping",FALSE); - electric_borders = config->readNumEntry("ElectricBorders", 0); - electric_border_delay = config->readNumEntry("ElectricBorderDelay", 150); + + // active borders: compatibility with old option names (Electric*) + active_borders = config->readNumEntry("ActiveBorders", -1); + if (active_borders == -1) { + active_borders = config->readNumEntry("ElectricBorders", 0); + } + active_border_delay = config->readNumEntry("ActiveBorderDelay", -1); + if (active_border_delay == -1) { + active_border_delay = config->readNumEntry("ElectricBorderDelay", 150); + } + active_border_distance = config->readNumEntry("ActiveBorderDistance", 10); OpTitlebarDblClick = windowOperation( config->readEntry("TitlebarDoubleClickCommand", "Shade"), true ); d->OpMaxButtonLeftClick = windowOperation( config->readEntry("MaximizeButtonLeftClickCommand", "Maximize"), true ); @@ -163,7 +174,7 @@ unsigned long Options::updateSettings() CmdWindow1 = mouseCommand(config->readEntry("CommandWindow1","Activate, raise and pass click"), false ); CmdWindow2 = mouseCommand(config->readEntry("CommandWindow2","Activate and pass click"), false ); CmdWindow3 = mouseCommand(config->readEntry("CommandWindow3","Activate and pass click"), false ); - CmdAllModKey = (config->readEntry("CommandAllKey","Alt") == "Meta") ? Qt::Key_Meta : Qt::Key_Alt; + CmdAllModKey = (config->readEntry("CommandAllKey","Alt") == "Meta") ? TQt::Key_Meta : TQt::Key_Alt; CmdAll1 = mouseCommand(config->readEntry("CommandAll1","Move"), false ); CmdAll2 = mouseCommand(config->readEntry("CommandAll2","Toggle raise and lower"), false ); CmdAll3 = mouseCommand(config->readEntry("CommandAll3","Resize"), false ); @@ -308,6 +319,11 @@ bool Options::showGeometryTip() return show_geometry_tip; } +bool Options::resetMaximizedWindowGeometry() + { + return reset_maximized_window_geometry; + } + TQColor &Options::shadowColour(bool active) { return active ? shadow_colour : shadow_inactive_colour; @@ -373,14 +389,19 @@ int Options::shadowYOffset(bool active) return active ? shadow_y_offset : shadow_inactive_y_offset; } -int Options::electricBorders() +int Options::activeBorders() + { + return active_borders; + } + +int Options::activeBorderDelay() { - return electric_borders; + return active_border_delay; } -int Options::electricBorderDelay() +int Options::borderActivationDistance() { - return electric_border_delay; + return active_border_distance; } bool Options::checkIgnoreFocusStealing( const Client* c ) |