MoveResizeMaximizedWindows option. Default is 'false'

svn path=/trunk/kdebase/kwin/; revision=61666
This commit is contained in:
Matthias Ettrich 2000-08-22 10:35:22 +00:00
parent 8f25bbb351
commit 4f4c4cca8d
3 changed files with 13 additions and 6 deletions

View file

@ -1612,12 +1612,13 @@ void Client::maximize( MaximizeMode m)
QRect r = QRect(clientArea.topLeft(), adjustedSize(clientArea.size()));
// hide right and left border of maximized windows
if ( r.left() == 0 )
r.setLeft( r.left() - windowWrapper()->x() );
if ( r.right() == workspace()->geometry().right() )
r.setRight( r.right() + width() - windowWrapper()->geometry().right() );
if ( !options->moveResizeMaximizedWindows ) {
if ( r.left() == 0 )
r.setLeft( r.left() - windowWrapper()->x() );
if ( r.right() == workspace()->geometry().right() )
r.setRight( r.right() + width() - windowWrapper()->geometry().right() );
}
setGeometry( r );
info->setState( NET::Max, NET::Max );
} break;
default:
@ -2362,7 +2363,7 @@ bool Client::isMovable() const
{
return may_move &&
( windowType() == NET::Normal || windowType() == NET::Toolbar ) &&
( !isMaximized() || max_mode != MaximizeFull );
( !isMaximized() || ( options->moveResizeMaximizedWindows || max_mode != MaximizeFull ) );
}
bool Client::isDesktop() const

View file

@ -137,6 +137,7 @@ void Options::reload()
config->setGroup( "Windows" );
moveMode = config->readEntry("MoveMode", "Opaque" ) == "Opaque"?Opaque:Transparent;
resizeMode = config->readEntry("ResizeMode", "Opaque" ) == "Opaque"?Opaque:Transparent;
moveResizeMaximizedWindows = config->readBoolEntry("MoveResizeMaximizedWindows", FALSE );
QString val;

View file

@ -101,6 +101,11 @@ public:
MoveResizeMode resizeMode;
MoveResizeMode moveMode;
/**
* Can maximized windows be moved or resized
*/
bool moveResizeMaximizedWindows;
/**
* Placement policies. How workspace decides the way windows get positioned
* on the screen. The better the policy, the heavier the resource use.