From 6c821aba019229da2b334db1deb1f33951ad52cf Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 22 Oct 2005 11:35:06 +0000 Subject: [PATCH] some more compiling svn path=/trunk/KDE/kdebase/workspace/; revision=473006 --- client.cpp | 2 +- events.cpp | 8 -------- geometry.cpp | 16 ++++++++-------- kcmkwin/kwindecoration/preview.cpp | 4 ++-- kcmkwin/kwinoptions/windows.cpp | 2 +- lib/kdecoration.cpp | 12 ++++++------ manage.cpp | 2 +- options.cpp | 2 +- 8 files changed, 20 insertions(+), 28 deletions(-) diff --git a/client.cpp b/client.cpp index 7432c636b1..45c157a1b5 100644 --- a/client.cpp +++ b/client.cpp @@ -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; diff --git a/events.cpp b/events.cpp index 27b859d72a..bc3e4a58eb 100644 --- a/events.cpp +++ b/events.cpp @@ -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; } diff --git a/geometry.cpp b/geometry.cpp index c83e8885d9..49fa22d0b3 100644 --- a/geometry.cpp +++ b/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; diff --git a/kcmkwin/kwindecoration/preview.cpp b/kcmkwin/kwindecoration/preview.cpp index 3cb43731c1..582aba2a70 100644 --- a/kcmkwin/kwindecoration/preview.cpp +++ b/kcmkwin/kwindecoration/preview.cpp @@ -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 diff --git a/kcmkwin/kwinoptions/windows.cpp b/kcmkwin/kwinoptions/windows.cpp index 9b0283952c..7eb95af9df 100644 --- a/kcmkwin/kwinoptions/windows.cpp +++ b/kcmkwin/kwinoptions/windows.cpp @@ -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); } diff --git a/lib/kdecoration.cpp b/lib/kdecoration.cpp index fa91739e20..b63ccf149c 100644 --- a/lib/kdecoration.cpp +++ b/lib/kdecoration.cpp @@ -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; diff --git a/manage.cpp b/manage.cpp index d0279b6b4c..11fb3ec63b 100644 --- a/manage.cpp +++ b/manage.cpp @@ -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 diff --git a/options.cpp b/options.cpp index 415c5a19e7..3f59619d4a 100644 --- a/options.cpp +++ b/options.cpp @@ -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;