From 4f4c4cca8d0cf6d2d2d6cc739148bfa4f7fc7941 Mon Sep 17 00:00:00 2001 From: Matthias Ettrich Date: Tue, 22 Aug 2000 10:35:22 +0000 Subject: [PATCH] MoveResizeMaximizedWindows option. Default is 'false' svn path=/trunk/kdebase/kwin/; revision=61666 --- client.cpp | 13 +++++++------ options.cpp | 1 + options.h | 5 +++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/client.cpp b/client.cpp index 9aecd6d644..95d5c8b373 100644 --- a/client.cpp +++ b/client.cpp @@ -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 diff --git a/options.cpp b/options.cpp index 21714287c1..b8956dc53d 100644 --- a/options.cpp +++ b/options.cpp @@ -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; diff --git a/options.h b/options.h index 0575cc28fa..67ddd82345 100644 --- a/options.h +++ b/options.h @@ -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.