some more compiling
svn path=/trunk/KDE/kdebase/workspace/; revision=473006
This commit is contained in:
parent
a3c86fb4e4
commit
6c821aba01
8 changed files with 20 additions and 28 deletions
|
@ -1171,7 +1171,7 @@ void Client::setModal( bool m )
|
|||
void Client::setDesktop( int desktop )
|
||||
{
|
||||
if( desktop != NET::OnAllDesktops ) // do range check
|
||||
desktop = KMAX( 1, KMIN( workspace()->numberOfDesktops(), desktop ));
|
||||
desktop = qMax( 1, qMin( workspace()->numberOfDesktops(), desktop ));
|
||||
desktop = rules()->checkDesktop( desktop );
|
||||
if( desk == desktop )
|
||||
return;
|
||||
|
|
|
@ -1065,17 +1065,9 @@ int qtToX11State( Qt::ButtonState state )
|
|||
if( state & Qt::ControlButton )
|
||||
ret |= ControlMask;
|
||||
if( state & Qt::AltButton )
|
||||
#ifdef QT3_SUPPORT
|
||||
ret |= KKeyNative::modX(KKey::ALT);
|
||||
#else
|
||||
ret |= KKeyNative::modXAlt();
|
||||
#endif
|
||||
if( state & Qt::MetaButton )
|
||||
#ifdef QT3_SUPPORT
|
||||
ret |= KKeyNative::modX(KKey::WIN);
|
||||
#else
|
||||
ret |= KKeyNative::modXWin();
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
16
geometry.cpp
16
geometry.cpp
|
@ -1232,8 +1232,8 @@ void Client::getWmNormalHints()
|
|||
}
|
||||
if( xSizeHint.flags & PResizeInc )
|
||||
{
|
||||
xSizeHint.width_inc = kMax( xSizeHint.width_inc, 1 );
|
||||
xSizeHint.height_inc = kMax( xSizeHint.height_inc, 1 );
|
||||
xSizeHint.width_inc = qMax( xSizeHint.width_inc, 1 );
|
||||
xSizeHint.height_inc = qMax( xSizeHint.height_inc, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1242,8 +1242,8 @@ void Client::getWmNormalHints()
|
|||
}
|
||||
if( xSizeHint.flags & PAspect )
|
||||
{ // no dividing by zero
|
||||
xSizeHint.min_aspect.y = kMax( xSizeHint.min_aspect.y, 1 );
|
||||
xSizeHint.max_aspect.y = kMax( xSizeHint.max_aspect.y, 1 );
|
||||
xSizeHint.min_aspect.y = qMax( xSizeHint.min_aspect.y, 1 );
|
||||
xSizeHint.max_aspect.y = qMax( xSizeHint.max_aspect.y, 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2301,8 +2301,8 @@ void Client::checkUnrestrictedMoveResize()
|
|||
int left_marge, right_marge, top_marge, bottom_marge, titlebar_marge;
|
||||
// restricted move/resize - keep at least part of the titlebar always visible
|
||||
// how much must remain visible when moved away in that direction
|
||||
left_marge = KMIN( 100 + border_right, moveResizeGeom.width());
|
||||
right_marge = KMIN( 100 + border_left, moveResizeGeom.width());
|
||||
left_marge = qMin( 100 + border_right, moveResizeGeom.width());
|
||||
right_marge = qMin( 100 + border_left, moveResizeGeom.width());
|
||||
// width/height change with opaque resizing, use the initial ones
|
||||
titlebar_marge = initialMoveResizeGeom.height();
|
||||
top_marge = border_bottom;
|
||||
|
@ -2378,8 +2378,8 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root )
|
|||
else // restricted move/resize - keep at least part of the titlebar always visible
|
||||
{
|
||||
// how much must remain visible when moved away in that direction
|
||||
left_marge = KMIN( 100 + border_right, moveResizeGeom.width());
|
||||
right_marge = KMIN( 100 + border_left, moveResizeGeom.width());
|
||||
left_marge = qMin( 100 + border_right, moveResizeGeom.width());
|
||||
right_marge = qMin( 100 + border_left, moveResizeGeom.width());
|
||||
// width/height change with opaque resizing, use the initial ones
|
||||
titlebar_marge = initialMoveResizeGeom.height();
|
||||
top_marge = border_bottom;
|
||||
|
|
|
@ -126,8 +126,8 @@ void KDecorationPreview::positionPreviews()
|
|||
deco[Active]->borders( dummy1, dummy2, titleBarHeight, dummy3 );
|
||||
deco[Inactive]->borders( leftBorder, rightBorder, dummy1, dummy2 );
|
||||
|
||||
titleBarHeight = kMin( int( titleBarHeight * .9 ), 30 );
|
||||
xoffset = kMin( kMax( 10, QApplication::reverseLayout()
|
||||
titleBarHeight = qMin( int( titleBarHeight * .9 ), 30 );
|
||||
xoffset = qMin( qMax( 10, QApplication::reverseLayout()
|
||||
? leftBorder : rightBorder ), 30 );
|
||||
|
||||
// Resize the active window
|
||||
|
|
|
@ -655,7 +655,7 @@ void KAdvancedConfig::setAnimateShade(bool a) {
|
|||
}
|
||||
|
||||
void KAdvancedConfig::setFocusStealing(int l) {
|
||||
l = KMAX( 0, KMIN( 4, l ));
|
||||
l = qMax( 0, qMin( 4, l ));
|
||||
focusStealing->setCurrentItem(l);
|
||||
}
|
||||
|
||||
|
|
|
@ -333,7 +333,7 @@ KDecoration::Position KDecoration::mousePosition( const QPoint& p ) const
|
|||
const int range = 16;
|
||||
int bleft, bright, btop, bbottom;
|
||||
borders( bleft, bright, btop, bbottom );
|
||||
btop = KMIN( btop, 4 ); // otherwise whole titlebar would have resize cursor
|
||||
btop = qMin( btop, 4 ); // otherwise whole titlebar would have resize cursor
|
||||
|
||||
Position m = PositionCenter;
|
||||
|
||||
|
@ -341,14 +341,14 @@ KDecoration::Position KDecoration::mousePosition( const QPoint& p ) const
|
|||
&& ( p.y() > btop && p.y() < widget()->height() - bbottom ) )
|
||||
return PositionCenter;
|
||||
|
||||
if ( p.y() <= KMAX( range, btop ) && p.x() <= KMAX( range, bleft ))
|
||||
if ( p.y() <= qMax( range, btop ) && p.x() <= qMax( range, bleft ))
|
||||
m = PositionTopLeft;
|
||||
else if ( p.y() >= widget()->height()- KMAX( range, bbottom )
|
||||
&& p.x() >= widget()->width()- KMAX( range, bright ))
|
||||
else if ( p.y() >= widget()->height()- qMax( range, bbottom )
|
||||
&& p.x() >= widget()->width()- qMax( range, bright ))
|
||||
m = PositionBottomRight;
|
||||
else if ( p.y() >= widget()->height()- KMAX( range, bbottom ) && p.x() <= KMAX( range, bleft ))
|
||||
else if ( p.y() >= widget()->height()- qMax( range, bbottom ) && p.x() <= qMax( range, bleft ))
|
||||
m = PositionBottomLeft;
|
||||
else if ( p.y() <= KMAX( range, btop ) && p.x() >= widget()->width()- KMAX( range, bright ))
|
||||
else if ( p.y() <= qMax( range, btop ) && p.x() >= widget()->width()- qMax( range, bright ))
|
||||
m = PositionTopRight;
|
||||
else if ( p.y() <= btop )
|
||||
m = PositionTop;
|
||||
|
|
|
@ -184,7 +184,7 @@ bool Client::manage( Window w, bool isMapped )
|
|||
desk = workspace()->currentDesktop();
|
||||
desk = rules()->checkDesktop( desk, !isMapped );
|
||||
if( desk != NET::OnAllDesktops ) // do range check
|
||||
desk = KMAX( 1, KMIN( workspace()->numberOfDesktops(), desk ));
|
||||
desk = qMax( 1, qMin( workspace()->numberOfDesktops(), desk ));
|
||||
info->setDesktop( desk );
|
||||
workspace()->updateOnAllDesktopsOfTransients( this ); // SELI
|
||||
// onAllDesktopsChange(); decoration doesn't exist here yet
|
||||
|
|
|
@ -77,7 +77,7 @@ unsigned long Options::updateSettings()
|
|||
// focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 2 );
|
||||
// TODO use low level for now
|
||||
focusStealingPreventionLevel = config->readNumEntry( "FocusStealingPreventionLevel", 1 );
|
||||
focusStealingPreventionLevel = KMAX( 0, KMIN( 4, focusStealingPreventionLevel ));
|
||||
focusStealingPreventionLevel = qMax( 0, qMin( 4, focusStealingPreventionLevel ));
|
||||
if( !focusPolicyIsReasonable()) // #48786, comments #7 and later
|
||||
focusStealingPreventionLevel = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue