Fix xinerama.

BUG: 152370 


svn path=/trunk/KDE/kdebase/workspace/; revision=739736
This commit is contained in:
Luboš Luňák 2007-11-21 18:50:38 +00:00
parent eb0d793157
commit db06887076

View file

@ -387,7 +387,8 @@ void BoxSwitchEffect::calculateFrameSize()
const int separator_height = 6; const int separator_height = 6;
// Shrink the size until all windows/desktops can fit onscreen // Shrink the size until all windows/desktops can fit onscreen
frame_area.setWidth( frame_margin * 2 + itemcount * item_max_size.width()); frame_area.setWidth( frame_margin * 2 + itemcount * item_max_size.width());
while( frame_area.width() > displayWidth()) QRect screenr = effects->clientArea( PlacementArea, effects->activeScreen(), effects->currentDesktop());
while( frame_area.width() > screenr.width())
{ {
item_max_size /= 2; item_max_size /= 2;
frame_area.setWidth( frame_margin * 2 + itemcount * item_max_size.width()); frame_area.setWidth( frame_margin * 2 + itemcount * item_max_size.width());
@ -396,7 +397,8 @@ void BoxSwitchEffect::calculateFrameSize()
separator_height + text_area.height()); separator_height + text_area.height());
text_area.setWidth( frame_area.width() - frame_margin * 2 ); text_area.setWidth( frame_area.width() - frame_margin * 2 );
frame_area.moveTo(( displayWidth() - frame_area.width()) / 2, ( displayHeight() - frame_area.height()) / 2 ); frame_area.moveTo( screenr.x() + ( screenr.width() - frame_area.width()) / 2,
screenr.y() + ( screenr.height() - frame_area.height()) / 2 );
text_area.moveTo( frame_area.x() + frame_margin, text_area.moveTo( frame_area.x() + frame_margin,
frame_area.y() + frame_margin + item_max_size.height() + separator_height); frame_area.y() + frame_margin + item_max_size.height() + separator_height);
} }