From 678a1ce18acb674cccae8d93be06f06fe4f31459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 8 Aug 2005 14:22:52 +0000 Subject: [PATCH] Placement policy 'maximizing'. svn path=/trunk/KDE/kdebase/kwin/; revision=444046 --- client.h | 6 +++--- kcmkwin/kwinoptions/windows.cpp | 9 ++++++++- kcmkwin/kwinoptions/windows.h | 13 +++++++------ kcmkwin/kwinrules/ruleswidget.cpp | 14 ++++++++------ kcmkwin/kwinrules/ruleswidgetbase.ui | 5 +++++ placement.cpp | 24 +++++++++++++++++++++++- placement.h | 4 +++- 7 files changed, 57 insertions(+), 18 deletions(-) diff --git a/client.h b/client.h index 7b26d91d50..4b40ac02eb 100644 --- a/client.h +++ b/client.h @@ -204,6 +204,9 @@ class Client : public QObject, public KDecorationDefines // plainResize() simply resizes void plainResize( int w, int h, ForceGeometry_t force = NormalGeometrySet ); void plainResize( const QSize& s, ForceGeometry_t force = NormalGeometrySet ); + // resizeWithChecks() resizes according to gravity, and checks workarea position + void resizeWithChecks( int w, int h, ForceGeometry_t force = NormalGeometrySet ); + void resizeWithChecks( const QSize& s, ForceGeometry_t force = NormalGeometrySet ); void keepInArea( QRect area, bool partial = false ); void growHorizontal(); @@ -376,9 +379,6 @@ class Client : public QObject, public KDecorationDefines void checkDirection( int new_diff, int old_diff, QRect& rect, const QRect& area ); static int computeWorkareaDiff( int left, int right, int a_left, int a_right ); void configureRequest( int value_mask, int rx, int ry, int rw, int rh, int gravity, bool from_tool ); - // resizeWithChecks() resizes according to gravity, and checks workarea position - void resizeWithChecks( int w, int h, ForceGeometry_t force = NormalGeometrySet ); - void resizeWithChecks( const QSize& s, ForceGeometry_t force = NormalGeometrySet ); NETExtendedStrut strut() const; bool hasStrut() const; int checkShadeGeometry( int w, int h ); diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp index b45b8b8683..85bc7e4a6f 100644 --- a/kcmkwin/kwinoptions/windows.cpp +++ b/kcmkwin/kwinoptions/windows.cpp @@ -848,6 +848,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *paren placementCombo = new QComboBox(false, windowsBox); placementCombo->insertItem(i18n("Smart"), SMART_PLACEMENT); + placementCombo->insertItem(i18n("Maximizing"), MAXIMIZING_PLACEMENT); placementCombo->insertItem(i18n("Cascade"), CASCADE_PLACEMENT); placementCombo->insertItem(i18n("Random"), RANDOM_PLACEMENT); placementCombo->insertItem(i18n("Centered"), CENTERED_PLACEMENT); @@ -862,6 +863,9 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, QWidget *paren " will appear on the desktop." "