From 6f272da774aa1f17eee12d74e121c58e17211b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 1 Oct 2003 16:51:19 +0000 Subject: [PATCH] Revert special dialog placement policies. I don't think I need to go that far with overconfigurability. svn path=/trunk/kdebase/kwin/; revision=255440 --- manage.cpp | 2 +- options.cpp | 7 ------- options.h | 3 --- placement.cpp | 13 +------------ 4 files changed, 2 insertions(+), 23 deletions(-) diff --git a/manage.cpp b/manage.cpp index eaab59bd70..e6a11c1c22 100644 --- a/manage.cpp +++ b/manage.cpp @@ -222,7 +222,7 @@ bool Client::manage( Window w, bool isMapped ) } else if( isDialog()) { - if( options->dialog_placement == Options::ObeyApplication ) + if( false ) placementDone = true; // else force using placement policy } diff --git a/options.cpp b/options.cpp index d33294e2ef..90232f3dae 100644 --- a/options.cpp +++ b/options.cpp @@ -90,13 +90,6 @@ unsigned long Options::updateSettings() else if (val == "ZeroCornered") placement = ZeroCornered; else placement = Smart; - val = config->readEntry("DialogPlacement", "ObeyApplication" ); // TODO is this good default? - if( val == "DialogCentered" ) dialog_placement = DialogCentered; - else if( val == "OnMainWindow" ) dialog_placement = OnMainWindow; - else if( val == "UnderMouse" ) dialog_placement = UnderMouse; - else if( val == "DialogPlaced" ) dialog_placement = DialogPlaced; - else dialog_placement = ObeyApplication; - animateShade = config->readBoolEntry("AnimateShade", TRUE ); animateMinimize = config->readBoolEntry("AnimateMinimize", TRUE ); diff --git a/options.h b/options.h index dbd3eaf881..94d1d162f4 100644 --- a/options.h +++ b/options.h @@ -136,9 +136,6 @@ class Options : public KDecorationOptions enum PlacementPolicy { Random, Smart, Cascade, Centered, ZeroCornered }; PlacementPolicy placement; - enum DialogPlacementPolicy { ObeyApplication, DialogCentered, OnMainWindow, UnderMouse, DialogPlaced }; - DialogPlacementPolicy dialog_placement; - bool focusPolicyIsReasonable() { return focusPolicy == ClickToFocus || focusPolicy == FocusFollowsMouse; diff --git a/placement.cpp b/placement.cpp index 29964b0ab2..530bb9092c 100644 --- a/placement.cpp +++ b/placement.cpp @@ -402,21 +402,10 @@ void Placement::placeUtility(Client* c) } -void Placement::placeDialog(Client* c) +void Placement::placeDialog(Client*) { - if( options->dialog_placement == Options::ObeyApplication ) - ; - else if( options->dialog_placement == Options::DialogCentered ) - placeCentered( c ); - else if( options->dialog_placement == Options::OnMainWindow ) - placeOnMainWindow( c ); - else if( options->dialog_placement == Options::UnderMouse ) - placeUnderMouse( c ); - else - placeInternal( c ); // Standard - normal placement policy } - void Placement::placeUnderMouse(Client* c) { QRect geom = c->geometry();