diff options
Diffstat (limited to 'kwin/client.cpp')
-rw-r--r-- | kwin/client.cpp | 134 |
1 files changed, 67 insertions, 67 deletions
diff --git a/kwin/client.cpp b/kwin/client.cpp index 0d2c5cfbf..2b7794748 100644 --- a/kwin/client.cpp +++ b/kwin/client.cpp @@ -141,7 +141,7 @@ Client::Client( Workspace *ws ) deleting = false; keep_above = FALSE; keep_below = FALSE; - is_shape = FALSE; + is_tqshape = FALSE; motif_noborder = false; motif_may_move = TRUE; motif_may_resize = TRUE; @@ -286,7 +286,7 @@ void Client::destroyClient() destroyDecoration(); cleanGrouping(); workspace()->removeClient( this, Allowed ); - client = None; // invalidate + client = None; // tqinvalidate XDestroyWindow( qt_xdisplay(), wrapper ); wrapper = None; XDestroyWindow( qt_xdisplay(), frame ); @@ -307,7 +307,7 @@ void Client::updateDecoration( bool check_workspace_pos, bool force ) destroyDecoration(); if( !noBorder()) { - setMask( TQRegion()); // reset shape mask + setMask( TQRegion()); // reset tqshape mask decoration = workspace()->createDecoration( bridge ); // TODO check decoration's minimum size? decoration->init(); @@ -345,7 +345,7 @@ void Client::destroyDecoration() decoration = NULL; TQPoint grav = calculateGravitation( true ); border_left = border_right = border_top = border_bottom = 0; - setMask( TQRegion()); // reset shape mask + setMask( TQRegion()); // reset tqshape mask int save_workarea_diff_x = workarea_diff_x; int save_workarea_diff_y = workarea_diff_y; plainResize( sizeForClientSize( clientSize()), ForceGeometrySet ); @@ -502,32 +502,32 @@ void Client::setUserNoBorder( bool set ) void Client::updateShape() { - // workaround for #19644 - shaped windows shouldn't have decoration - if( shape() && !noBorder()) + // workaround for #19644 - tqshaped windows shouldn't have decoration + if( tqshape() && !noBorder()) { noborder = true; updateDecoration( true ); } updateOpacityCache(); - if ( shape() ) + if ( tqshape() ) { XShapeCombineShape(qt_xdisplay(), frameId(), ShapeBounding, clientPos().x(), clientPos().y(), window(), ShapeBounding, ShapeSet); setShapable(TRUE); } - // !shape() mask setting is done in setMask() when the decoration + // !tqshape() mask setting is done in setMask() when the decoration // calls it or when the decoration is created/destroyed - if( Shape::version() >= 0x11 ) // 1.1, has input shape support + if( Shape::version() >= 0x11 ) // 1.1, has input tqshape support { // There appears to be no way to find out if a window has input - // shape set or not, so always propagate the input shape - // (it's the same like the bounding shape by default). - // Also, build the shape using a helper window, not directly - // in the frame window, because the sequence set-shape-to-frame, - // remove-shape-of-client, add-input-shape-of-client has the problem - // that after the second step there's a hole in the input shape - // until the real shape of the client is added and that can make + // tqshape set or not, so always propagate the input tqshape + // (it's the same like the bounding tqshape by default). + // Also, build the tqshape using a helper window, not directly + // in the frame window, because the sequence set-tqshape-to-frame, + // remove-tqshape-of-client, add-input-tqshape-of-client has the problem + // that after the second step there's a hole in the input tqshape + // until the real tqshape of the client is added and that can make // the window lose focus (which is a problem with mouse focus policies) static Window helper_window = None; if( helper_window == None ) @@ -558,7 +558,7 @@ void Client::setMask( const TQRegion& reg, int mode ) reg.handle(), ShapeSet ); else { - TQMemArray< TQRect > rects = reg.rects(); + TQMemArray< TQRect > rects = reg.tqrects(); XRectangle* xrects = new XRectangle[ rects.count() ]; for( unsigned int i = 0; i < rects.count(); @@ -847,7 +847,7 @@ void Client::setShade( ShadeMode mode ) XSelectInput( qt_xdisplay(), wrapper, ClientWinMask | SubstructureNotifyMask ); //as we hid the unmap event, xcompmgr didn't recognize the client wid has vanished, so we'll extra inform it //done xcompmgr workaround -// FRAME repaint( FALSE ); +// FRAME tqrepaint( FALSE ); // bool wasStaticContents = testWFlags( WStaticContents ); // setWFlags( WStaticContents ); int step = QMAX( 4, QABS( h - s.height() ) / as )+1; @@ -888,7 +888,7 @@ void Client::setShade( ShadeMode mode ) resizeDecoration( TQSize( s.width(), h )); // assume a border // we do not have time to wait for X to send us paint events -// FRAME repaint( 0, h - step-5, width(), step+5, TRUE); +// FRAME tqrepaint( 0, h - step-5, width(), step+5, TRUE); TQApplication::syncX(); } while ( h < s.height() - step ); // if ( !wasStaticContents ) @@ -1051,7 +1051,7 @@ void Client::drawIntersectingShadows() { // active window has a shadow. return; - region = shapeBoundingRegion; + region = tqshapeBoundingRegion; // Generate list of Clients whose shadows need to be redrawn. That is, // those that are currently intersecting or intersected by other windows or @@ -1089,7 +1089,7 @@ void Client::drawOverlappingShadows(bool waitForMe) // active window has a shadow. return; - region = shapeBoundingRegion; + region = tqshapeBoundingRegion; stacking_order = workspace()->stackingOrder(); for (it = stacking_order.fromLast(); it != stacking_order.end(); --it) { @@ -1140,7 +1140,7 @@ void Client::drawOverlappingShadows(bool waitForMe) /*! Draw shadow after some time has elapsed, to give recently exposed windows a - chance to repaint before a shadow gradient is drawn over them. + chance to tqrepaint before a shadow gradient is drawn over them. */ void Client::drawDelayedShadow() { @@ -1163,7 +1163,7 @@ void Client::drawShadowAfter(Client *after) void Client::drawShadow() { Window shadows[2]; - XRectangle *shapes; + XRectangle *tqshapes; int i, count, ordering; // If we are waiting for another Client's shadow to be drawn, stop waiting now @@ -1179,31 +1179,31 @@ void Client::drawShadow() * this type of window. Otherwise, drawIntersectingShadows() won't update * properly when this window is moved/resized/hidden/closed. */ - shapes = XShapeGetRectangles(qt_xdisplay(), frameId(), ShapeBounding, + tqshapes = XShapeGetRectangles(qt_xdisplay(), frameId(), ShapeBounding, &count, &ordering); - if (!shapes) + if (!tqshapes) // XShape extension not supported - shapeBoundingRegion = TQRegion(x(), y(), width(), height()); + tqshapeBoundingRegion = TQRegion(x(), y(), width(), height()); else { - shapeBoundingRegion = TQRegion(); + tqshapeBoundingRegion = TQRegion(); for (i = 0; i < count; i++) { // Translate XShaped window into a TQRegion - TQRegion shapeRectangle(shapes[i].x, shapes[i].y, shapes[i].width, - shapes[i].height); - shapeBoundingRegion += shapeRectangle; + TQRegion tqshapeRectangle(tqshapes[i].x, tqshapes[i].y, tqshapes[i].width, + tqshapes[i].height); + tqshapeBoundingRegion += tqshapeRectangle; } if (isShade()) // Since XResize() doesn't change a window's XShape regions, ensure that - // shapeBoundingRegion is not taller than the window's shaded height, + // tqshapeBoundingRegion is not taller than the window's shaded height, // or the bottom shadow will appear to be missing - shapeBoundingRegion &= TQRegion(0, 0, width(), height()); - shapeBoundingRegion.translate(x(), y()); + tqshapeBoundingRegion &= TQRegion(0, 0, width(), height()); + tqshapeBoundingRegion.translate(x(), y()); } if (!isShadowed() || hidden || isMinimized() || maximizeMode() == MaximizeFull || !options->shadowWindowType(windowType())) { - XFree(shapes); + XFree(tqshapes); // Tell whatever Clients are listening that this Client's shadow has been drawn. // It hasn't, but there's no sense waiting for something that won't happen. @@ -1231,15 +1231,15 @@ void Client::drawShadow() shadowPixmap.resize(shadow.size()); // Create a fake drop-down shadow effect via blended Xwindows - shadowWidget = new TQWidget(0, 0, WStyle_Customize | WX11BypassWM); + shadowWidget = new TQWidget(0, 0, (WFlags)(WStyle_Customize | WX11BypassWM)); shadowWidget->setGeometry(shadow); XSelectInput(qt_xdisplay(), shadowWidget->winId(), ButtonPressMask | ButtonReleaseMask | StructureNotifyMask); shadowWidget->installEventFilter(this); - if (!shapes) { + if (!tqshapes) { // XShape extension not supported - exposedRegion = getExposedRegion(shapeBoundingRegion, shadow.x(), + exposedRegion = getExposedRegion(tqshapeBoundingRegion, shadow.x(), shadow.y(), shadow.width(), shadow.height(), thickness, xOffset, yOffset); shadowRegion.region = exposedRegion; @@ -1247,7 +1247,7 @@ void Client::drawShadow() shadowRegions.append(shadowRegion); if (opacityCache->isNull()) - imposeRegionShadow(shadowPixmap, shapeBoundingRegion, + imposeRegionShadow(shadowPixmap, tqshapeBoundingRegion, exposedRegion, thickness, options->shadowOpacity(isActive())); else @@ -1258,7 +1258,7 @@ void Client::drawShadow() TQMemArray<TQRect>::Iterator it, itEnd; XRectangle *shadowShapes; - exposedRegion = getExposedRegion(shapeBoundingRegion, shadow.x(), + exposedRegion = getExposedRegion(tqshapeBoundingRegion, shadow.x(), shadow.y(), shadow.width(), shadow.height(), thickness, xOffset, yOffset); shadowRegion.region = exposedRegion; @@ -1266,7 +1266,7 @@ void Client::drawShadow() shadowRegions.append(shadowRegion); // XShape the shadow - exposedRects = exposedRegion.rects(); + exposedRects = exposedRegion.tqrects(); i = 0; itEnd = exposedRects.end(); shadowShapes = new XRectangle[exposedRects.count()]; @@ -1284,14 +1284,14 @@ void Client::drawShadow() delete [] shadowShapes; if (opacityCache->isNull()) - imposeRegionShadow(shadowPixmap, shapeBoundingRegion, + imposeRegionShadow(shadowPixmap, tqshapeBoundingRegion, exposedRegion, thickness, options->shadowOpacity(isActive())); else imposeCachedShadow(shadowPixmap, exposedRegion); } - XFree(shapes); + XFree(tqshapes); // Set the background pixmap //shadowPixmap.convertFromImage(shadowImage); @@ -1364,10 +1364,10 @@ TQRegion Client::getExposedRegion(TQRegion occludedRegion, int x, int y, int w, TQMemArray<TQRect>::Iterator it, itEnd; TQRegion shadowRegion; - occludedRects = occludedRegion.rects(); + occludedRects = occludedRegion.tqrects(); itEnd = occludedRects.end(); for (it = occludedRects.begin(); it != itEnd; ++it) { - // Expand each of the occluded region's shape rectangles to contain + // Expand each of the occluded region's tqshape rectangles to contain // where a shadow of the specified thickness will be drawn. Create // a new TQRegion that contains the expanded occluded region it->setTop(it->top() - thickness + yOffset); @@ -1398,7 +1398,7 @@ void Client::imposeCachedShadow(TQPixmap &pixmap, TQRegion exposed) Window rootWindow; int thickness, windowX, windowY, xOffset, yOffset; - rectangles = exposed.rects(); + rectangles = exposed.tqrects(); rootWindow = qt_xrootwin(); thickness = options->shadowThickness(isActive()); windowX = this->x(); @@ -1423,11 +1423,11 @@ void Client::imposeCachedShadow(TQPixmap &pixmap, TQRegion exposed) for (y = 0; y < subH; y++) { opacity = (*(opacityCache))[(zeroY + y) * w + zeroX + x]; pixel = image.pixel(x, y); - pixelRed = qRed(pixel); - pixelGreen = qGreen(pixel); - pixelBlue = qBlue(pixel); + pixelRed = tqRed(pixel); + pixelGreen = tqGreen(pixel); + pixelBlue = tqBlue(pixel); image.setPixel(x, y, - qRgb((int)(pixelRed + (red - pixelRed) * opacity), + tqRgb((int)(pixelRed + (red - pixelRed) * opacity), (int)(pixelGreen + (green - pixelGreen) * opacity), (int)(pixelBlue + (blue - pixelBlue) * opacity))); } @@ -1458,7 +1458,7 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded, Window rootWindow; int windowX, windowY, xOffset, yOffset; - rectangles = exposed.rects(); + rectangles = exposed.tqrects(); rootWindow = qt_xrootwin(); windowX = this->x(); windowY = this->y(); @@ -1515,7 +1515,7 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded, // irTop is not necessarily larger than irBottom and // yIncrement isn't necessarily positive for (i = irLeft; i <= irRight; i++) { - if (occluded.contains(TQPoint(i, j))) + if (occluded.tqcontains(TQPoint(i, j))) intersectCount++; } } @@ -1525,7 +1525,7 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded, intersectCount = 0; for (i = irLeft; i <= irRight; i++) { - if (occluded.contains(TQPoint(i, irBottom))) + if (occluded.tqcontains(TQPoint(i, irBottom))) intersectCount++; } } @@ -1535,16 +1535,16 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded, (*(opacityCache))[(zeroY + y) * w + zeroX + x] = opacity; pixel = image.pixel(x, y); - pixelRed = qRed(pixel); - pixelGreen = qGreen(pixel); - pixelBlue = qBlue(pixel); + pixelRed = tqRed(pixel); + pixelGreen = tqGreen(pixel); + pixelBlue = tqBlue(pixel); image.setPixel(x, y, - qRgb((int)(pixelRed + (red - pixelRed) * opacity), + tqRgb((int)(pixelRed + (red - pixelRed) * opacity), (int)(pixelGreen + (green - pixelGreen) * opacity), (int)(pixelBlue + (blue - pixelBlue) * opacity))); for (i = irLeft; i <= irRight; i++) { - if (occluded.contains(TQPoint(i, irTop))) + if (occluded.tqcontains(TQPoint(i, irTop))) intersectCount--; } @@ -1554,12 +1554,12 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded, irTop += yIncrement; for (j = irTop; j != irBottom; j += yIncrement) { - if (occluded.contains(TQPoint(irLeft, j))) + if (occluded.tqcontains(TQPoint(irLeft, j))) intersectCount--; } irRight++; for (j = irTop; j != irBottom; j += yIncrement) { - if (occluded.contains(TQPoint(irRight, j))) + if (occluded.tqcontains(TQPoint(irRight, j))) intersectCount++; } @@ -2391,7 +2391,7 @@ NET::WindowType Client::windowType( bool direct, int supported_types ) const // TODO change this to rule const char* const oo_prefix = "openoffice.org"; // TQCString has no startsWith() // oo_prefix is lowercase, because resourceClass() is forced to be lowercase - if( qstrncmp( resourceClass(), oo_prefix, strlen( oo_prefix )) == 0 && wt == NET::Dialog ) + if( tqstrncmp( resourceClass(), oo_prefix, strlen( oo_prefix )) == 0 && wt == NET::Dialog ) wt = NET::Normal; // see bug #66065 if( wt == NET::Unknown ) // this is more or less suggested in NETWM spec wt = isTransient() ? NET::Dialog : NET::Normal; @@ -2399,7 +2399,7 @@ NET::WindowType Client::windowType( bool direct, int supported_types ) const } /*! - Sets an appropriate cursor shape for the logical mouse position \a m + Sets an appropriate cursor tqshape for the logical mouse position \a m */ void Client::setCursor( Position m ) @@ -2412,25 +2412,25 @@ void Client::setCursor( Position m ) { case PositionTopLeft: case PositionBottomRight: - setCursor( sizeFDiagCursor ); + setCursor( tqsizeFDiagCursor ); break; case PositionBottomLeft: case PositionTopRight: - setCursor( sizeBDiagCursor ); + setCursor( tqsizeBDiagCursor ); break; case PositionTop: case PositionBottom: - setCursor( sizeVerCursor ); + setCursor( tqsizeVerCursor ); break; case PositionLeft: case PositionRight: - setCursor( sizeHorCursor ); + setCursor( tqsizeHorCursor ); break; default: if( buttonDown && isMovable()) - setCursor( sizeAllCursor ); + setCursor( tqsizeAllCursor ); else - setCursor( arrowCursor ); + setCursor( tqarrowCursor ); break; } } |