From 7074d14fe9568eb697d2b71a03c680dcd0c84612 Mon Sep 17 00:00:00 2001 From: George Staikos Date: Tue, 18 Feb 2003 04:34:53 +0000 Subject: [PATCH] Move Xinerama settings over to Xinerama KControl module, activate it and enable it in the build. I think there are some bugs in kwin though. I must investigate now. It seems to be ignoring the settings and just always using xinerama support svn path=/trunk/kdebase/kcontrol/; revision=207605 --- kcmkwin/kwinoptions/windows.cpp | 46 --------------------------------- kcmkwin/kwinoptions/windows.h | 9 +------ kwin.upd | 11 ++++++++ options.cpp | 7 +++-- 4 files changed, 17 insertions(+), 56 deletions(-) diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp index af0a926934..f73834b443 100644 --- a/kcmkwin/kwinoptions/windows.cpp +++ b/kcmkwin/kwinoptions/windows.cpp @@ -66,10 +66,6 @@ #define KWIN_ROLL_OVER_DESKTOPS "RollOverDesktops" #define KWIN_SHADEHOVER "ShadeHover" #define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval" -#define KWIN_XINERAMA "XineramaEnabled" -#define KWIN_XINERAMA_MOVEMENT "XineramaMovementEnabled" -#define KWIN_XINERAMA_PLACEMENT "XineramaPlacementEnabled" -#define KWIN_XINERAMA_MAXIMIZE "XineramaMaximizeEnabled" // kwm config keywords #define KWM_ELECTRIC_BORDER "ElectricBorders" @@ -488,20 +484,6 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, KConfig *_config, QWidget *p connect(shadeHoverOn, SIGNAL(toggled(bool)), SLOT(changed())); connect(shadeHover, SIGNAL(valueChanged(int)), SLOT(changed())); - xineramaBox = new QVButtonGroup(i18n("Multiple Monitor Support"), this); - xineramaBox->setEnabled(QApplication::desktop()->isVirtualDesktop()); - xineramaEnable = new QCheckBox(i18n("Enable multiple monitor support"), xineramaBox); - QWhatsThis::add(xineramaEnable, i18n("Enable support for multiple monitors merged to form a single desktop.")); - connect(xineramaEnable, SIGNAL(toggled(bool)), this, SLOT(setXinerama(bool))); - xineramaMovementEnable = new QCheckBox(i18n("Enable window resistance support"), xineramaBox); - QWhatsThis::add(xineramaMovementEnable, i18n("Turn on resistance when moving a window from one physical screen to the other.")); - xineramaPlacementEnable = new QCheckBox(i18n("Enable window placement support"), xineramaBox); - QWhatsThis::add(xineramaPlacementEnable, i18n("This option opens new windows on the physical screen on which the cursor is present.")); - xineramaMaximizeEnable = new QCheckBox(i18n("Enable window maximize support"), xineramaBox); - QWhatsThis::add(xineramaMaximizeEnable, i18n("When this option is turned on, windows will only maximize up to the physical screen size.")); - - lay->addWidget(xineramaBox); - electricBox = new QVButtonGroup(i18n("Active Desktop Borders"), this); electricBox->setMargin(15); @@ -531,12 +513,6 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, KConfig *_config, QWidget *p lay->addStretch(); load(); - connect( xineramaEnable, SIGNAL(clicked()), SLOT(changed())); - connect( xineramaMovementEnable, SIGNAL(clicked()), SLOT(changed())); - connect( xineramaPlacementEnable, SIGNAL(clicked()), SLOT(changed())); - connect( xineramaMaximizeEnable, SIGNAL(clicked()), SLOT(changed())); - - } void KAdvancedConfig::setShadeHover(bool on) { @@ -557,17 +533,6 @@ void KAdvancedConfig::shadeHoverChanged(bool a) { shadeHover->setEnabled(a); } -void KAdvancedConfig::setXinerama(bool on) { - if (KApplication::desktop()->isVirtualDesktop()) - xineramaEnable->setChecked(on); - else - xineramaEnable->setEnabled(false); - - xineramaMovementEnable->setEnabled(on); - xineramaPlacementEnable->setEnabled(on); - xineramaMaximizeEnable->setEnabled(on); -} - void KAdvancedConfig::setAnimateShade(bool a) { animateShade->setChecked(a); } @@ -580,11 +545,6 @@ void KAdvancedConfig::load( void ) setShadeHover(config->readBoolEntry(KWIN_SHADEHOVER, false)); setShadeHoverInterval(config->readNumEntry(KWIN_SHADEHOVER_INTERVAL, 250)); - setXinerama(config->readBoolEntry(KWIN_XINERAMA, false)); - xineramaMovementEnable->setChecked( config->readBoolEntry(KWIN_XINERAMA_MOVEMENT, false)); - xineramaPlacementEnable->setChecked(config->readBoolEntry(KWIN_XINERAMA_PLACEMENT, false)); - xineramaMaximizeEnable->setChecked(config->readBoolEntry(KWIN_XINERAMA_MAXIMIZE, false)); - setElectricBorders(config->readNumEntry(KWM_ELECTRIC_BORDER, false)); setElectricBorderDelay(config->readNumEntry(KWM_ELECTRIC_BORDER_DELAY, 150)); } @@ -604,11 +564,6 @@ void KAdvancedConfig::save( void ) if (v<0) v = 0; config->writeEntry(KWIN_SHADEHOVER_INTERVAL, v); - config->writeEntry(KWIN_XINERAMA, xineramaEnable->isChecked()); - config->writeEntry(KWIN_XINERAMA_MOVEMENT, xineramaMovementEnable->isChecked()); - config->writeEntry(KWIN_XINERAMA_PLACEMENT, xineramaPlacementEnable->isChecked()); - config->writeEntry(KWIN_XINERAMA_MAXIMIZE, xineramaMaximizeEnable->isChecked()); - config->writeEntry(KWM_ELECTRIC_BORDER, getElectricBorders()); config->writeEntry(KWM_ELECTRIC_BORDER_DELAY,getElectricBorderDelay()); @@ -626,7 +581,6 @@ void KAdvancedConfig::defaults() setAnimateShade(true); setShadeHover(false); setShadeHoverInterval(250); - setXinerama(false); setElectricBorders(0); setElectricBorderDelay(150); } diff --git a/kcmkwin/kwinoptions/windows.h b/kcmkwin/kwinoptions/windows.h index 4629f442ac..91d28a1c6b 100644 --- a/kcmkwin/kwinoptions/windows.h +++ b/kcmkwin/kwinoptions/windows.h @@ -186,8 +186,7 @@ private slots: //copied from kcontrol/konq/kwindesktop, aleXXX void setEBorders(); - void setXinerama(bool); - void changed() { emit KCModule::changed(true); } + void changed() { emit KCModule::changed(true); } private: @@ -201,12 +200,6 @@ private: QCheckBox *shadeHoverOn; KIntNumInput *shadeHover; - QButtonGroup *xineramaBox; - QCheckBox *xineramaEnable; - QCheckBox *xineramaMovementEnable; - QCheckBox *xineramaPlacementEnable; - QCheckBox *xineramaMaximizeEnable; - KConfig *config; bool standAlone; diff --git a/kwin.upd b/kwin.upd index 1595442cd9..d93cefb4d1 100644 --- a/kwin.upd +++ b/kwin.upd @@ -2,3 +2,14 @@ Id=kde3.0r1 File=kwinrc Options=overwrite Script=pluginlibFix.pl,perl + +# Xinerama fixups +Id=kde3.2Xinerama +File=kwinrc,kdeglobals +Group=Windows +Key=XineramaEnabled +Key=XineramaMovementEnabled +Key=XineramaPlacementEnabled +Key=XineramaMaximizeEnabled +RemoveGroup=Windows + diff --git a/options.cpp b/options.cpp index c00e7aca25..080d8ef668 100644 --- a/options.cpp +++ b/options.cpp @@ -191,8 +191,11 @@ void Options::reload() rollOverDesktops = config->readBoolEntry("RollOverDesktops", TRUE); - xineramaEnabled = config->readBoolEntry ("XineramaEnabled", FALSE ) && - KApplication::desktop()->isVirtualDesktop(); + KConfig *gc = KGlobal::config(); + bool isVirtual = KApplication::desktop()->isVirtualDesktop(); + gc->setGroup("Windows"); + xineramaEnabled = gc->readBoolEntry ("XineramaEnabled", isVirtual ) && + isVirtual; if (xineramaEnabled) { xineramaPlacementEnabled = config->readBoolEntry ("XineramaPlacementEnabled", FALSE); xineramaMovementEnabled = config->readBoolEntry ("XineramaMovementEnabled", FALSE);