--Boundary-00=_K6MIA3OnMLJSE44 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed February 4 2004 08:27, Bo Thorsen wrote: > I have a 2560x1024 desktop and two 1024x768 desktops, and I have learned > simply not to run KDE with the same .kde between these :-( Just try > setting reasonable background images on these to see the immediate > problem.=20 I don't have such setup so if you can tell what the problem is that would b= e=20 more helpful. > After that, you will notice that the location of kicker buttons=20 > and applets will be completely screwed up when you go back to the > xinerama screen. To make matters worse, I have the xinerama support on > kicker set up so the panel only shows on one monitor. This doesn't > exactly work well when I log in on the smaller desktops. Does the attached patch help? Cheers, Waldo =2D --=20 bastian@kde.org -=3D|[ SUSE, The Linux Desktop Experts ]|=3D- bastian@suse.= com =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAIM6KN4pvrENfboIRAoUqAJwL248wCaC7QNWD65sLMqyCdu0eMACdE9lx idzenCW7XNMx8WxqhMMdSq4=3D =3DL4Yr =2D----END PGP SIGNATURE----- --Boundary-00=_K6MIA3OnMLJSE44 Content-Type: text/x-diff; charset="iso-8859-1"; name="kicker_desktop_sizes.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kicker_desktop_sizes.patch" Index: core/container_base.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_base.cpp,v retrieving revision 1.17 diff -u -p -r1.17 container_base.cpp --- core/container_base.cpp 7 Feb 2003 14:57:42 -0000 1.17 +++ core/container_base.cpp 4 Feb 2004 10:45:09 -0000 @@ -31,6 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE #include "panel.h" #include "appletop_mnu.h" +#include "container_panel.h" #include "container_base.h" #include "container_base.moc" @@ -54,7 +55,25 @@ BaseContainer::~BaseContainer() void BaseContainer::loadConfiguration( KConfigGroup& group ) { - setFreeSpace( QMIN( group.readDoubleNumEntry( "FreeSpace", 0 ), 1 ) ); + QWidget *parent = parentWidget(); + while(parent && !parent->inherits("PanelContainer")) + parent = parent->parentWidget(); +qWarning("BaseContainer::loadConfiguration parent = %p this = %p", parent, this); + + QString key; + PanelContainer *container = dynamic_cast(parent); + if (container) + { + key = QString("FreeSpace %1").arg(container->desktopWidth()); + if (!group.hasKey(key)) + key = "FreeSpace"; + } + else + { + key = "FreeSpace"; + } + + setFreeSpace( QMIN( group.readDoubleNumEntry( key, 0 ), 1 ) ); doLoadConfiguration( group ); } @@ -62,6 +81,18 @@ void BaseContainer::saveConfiguration( K bool layoutOnly ) const { // write positioning info + QWidget *parent = parentWidget(); + while(parent && !parent->inherits("PanelContainer")) + parent = parent->parentWidget(); +qWarning("BaseContainer::saveConfiguration parent = %p this = %p", parent, this); + + PanelContainer *container = dynamic_cast(parent); + if (container) + { + QString key = QString("FreeSpace %1").arg(container->desktopWidth()); + group.writeEntry( key, freeSpace() ); + } + group.writeEntry( "FreeSpace", freeSpace() ); // write type specific info doSaveConfiguration( group, layoutOnly ); Index: core/container_panel.cpp =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_panel.cpp,v retrieving revision 1.86 diff -u -p -r1.86 container_panel.cpp --- core/container_panel.cpp 11 Nov 2003 16:50:36 -0000 1.86 +++ core/container_panel.cpp 4 Feb 2004 10:45:09 -0000 @@ -111,7 +111,6 @@ void PanelSettings::readConfig( KConfig _hideAnimSpeed = c->readNumEntry( "HideAnimationSpeed", _hideAnimSpeed); _unhideLocation = static_cast( c->readNumEntry( "UnhideLocation", _unhideLocation)); - _sizePercentage = c->readNumEntry( "SizePercentage", _sizePercentage ); _expandSize = c->readBoolEntry( "ExpandSize", _expandSize ); _resizeablehandle = c->readBoolEntry( "ResizeableHandle", false ); int sizeSetting = c->readNumEntry( "Size", static_cast(_size)); @@ -126,8 +125,6 @@ void PanelSettings::readConfig( KConfig if (_HBwidth < 3) _HBwidth = 3; else if (_HBwidth > 24) _HBwidth = 24; - if ( _sizePercentage < 1 ) _sizePercentage = 1; - else if ( _sizePercentage > 100 ) _sizePercentage = 100; } void PanelSettings::writeConfig( KConfig *c ) { @@ -144,7 +141,6 @@ void PanelSettings::writeConfig( KConfig c->writeEntry( "HideAnimation", _hideAnim); c->writeEntry( "HideAnimationSpeed", _hideAnimSpeed); c->writeEntry( "UnhideLocation", static_cast(_unhideLocation)); - c->writeEntry( "SizePercentage", _sizePercentage ); c->writeEntry( "ExpandSize", _expandSize ); c->writeEntry( "ResizeableHandle", _resizeablehandle ); c->writeEntry( "Size", static_cast(_size)); @@ -234,6 +230,11 @@ int PanelContainer::xineramaScreen() con return QApplication::desktop()->primaryScreen(); } +int PanelContainer::desktopWidth() +{ + return QApplication::desktop()->screenGeometry(xineramaScreen()).width(); +} + void PanelContainer::setMainWidget( QWidget* main ) { main->reparent( this, QPoint( 0,0 ) ); @@ -258,6 +259,14 @@ void PanelContainer::readConfig( KConfig _settings = defaultSettings(); _settings.readConfig( config ); + QString key = QString("SizePercentage %1").arg(desktopWidth()); + if (!config->hasKey(key)) + key = "SizePercentage"; + _settings._sizePercentage = config->readNumEntry( key, _settings._sizePercentage ); + + if ( _settings._sizePercentage < 1 ) _settings._sizePercentage = 1; + else if ( _settings._sizePercentage > 100 ) _settings._sizePercentage = 100; + emit positionChange( position() ); emit alignmentChange( alignment() ); emit sizeChange( _settings._size, _settings._customSize ); @@ -294,6 +303,8 @@ void PanelContainer::writeConfig( KConfi // kdDebug(1210) << "PanelContainer::writeConfig()" << endl; _settings.writeConfig( config ); + config->writeEntry( "SizePercentage", _settings._sizePercentage ); + config->writeEntry( QString("SizePercentage %1").arg(desktopWidth()), _settings._sizePercentage ); } void PanelContainer::arrange( Position p, Alignment a, int XineramaScreen ) Index: core/container_panel.h =================================================================== RCS file: /home/kde/kdebase/kicker/core/container_panel.h,v retrieving revision 1.34 diff -u -p -r1.34 container_panel.h --- core/container_panel.h 27 Nov 2002 21:50:31 -0000 1.34 +++ core/container_panel.h 4 Feb 2004 10:45:09 -0000 @@ -83,6 +83,8 @@ public: int xineramaScreen() const; void setXineramaScreen(int screen) { arrange(position(),alignment(), screen); } + int desktopWidth(); + bool resizeablehandle() const { return _settings._resizeablehandle; }; void setResizeableHandle( bool resizeablehandle=true ); void setSize(Size size, int customSize = 0); --Boundary-00=_K6MIA3OnMLJSE44--