diff options
Diffstat (limited to 'chalk/plugins/viewplugins/screenshot/ksnapshot.cpp')
-rw-r--r-- | chalk/plugins/viewplugins/screenshot/ksnapshot.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/chalk/plugins/viewplugins/screenshot/ksnapshot.cpp b/chalk/plugins/viewplugins/screenshot/ksnapshot.cpp index dad0ee01..6e942c38 100644 --- a/chalk/plugins/viewplugins/screenshot/ksnapshot.cpp +++ b/chalk/plugins/viewplugins/screenshot/ksnapshot.cpp @@ -58,8 +58,8 @@ #include <kglobal.h> -KSnapshot::KSnapshot(TQWidget *tqparent, const char *name) - : super(tqparent, name, false, TQString(), Ok|Cancel) +KSnapshot::KSnapshot(TQWidget *parent, const char *name) + : super(parent, name, false, TQString(), Ok|Cancel) { grabber = new TQWidget( 0, 0, WStyle_Customize | WX11BypassWM ); Q_CHECK_PTR(grabber); @@ -319,11 +319,11 @@ Window findRealWindow( Window w, int depth = 0 ) if( type != None ) return w; } - Window root, tqparent; + Window root, parent; Window* tqchildren; unsigned int ntqchildren; Window ret = None; - if( XQueryTree( qt_xdisplay(), w, &root, &tqparent, &tqchildren, &ntqchildren ) != 0 ) { + if( XQueryTree( qt_xdisplay(), w, &root, &parent, &tqchildren, &ntqchildren ) != 0 ) { for( unsigned int i = 0; i < ntqchildren && ret == None; ++i ) @@ -343,11 +343,11 @@ void KSnapshot::performGrab() if ( mainWidget->mode() == WindowUnderCursor ) { Window root; Window child; - uint tqmask; + uint mask; int rootX, rootY, winX, winY; XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, &rootX, &rootY, &winX, &winY, - &tqmask); + &mask); if( child == None ) child = qt_xrootwin(); if( !mainWidget->includeDecorations()) { @@ -364,16 +364,16 @@ void KSnapshot::performGrab() w += 2 * border; h += 2 * border; - Window tqparent; + Window parent; Window* tqchildren; unsigned int ntqchildren; - if( XQueryTree( qt_xdisplay(), child, &root, &tqparent, + if( XQueryTree( qt_xdisplay(), child, &root, &parent, &tqchildren, &ntqchildren ) != 0 ) { if( tqchildren != NULL ) XFree( tqchildren ); int newx, newy; Window dummy; - if( XTranslateCoordinates( qt_xdisplay(), tqparent, qt_xrootwin(), + if( XTranslateCoordinates( qt_xdisplay(), parent, qt_xrootwin(), x, y, &newx, &newy, &dummy )) { x = newx; y = newy; @@ -385,8 +385,8 @@ void KSnapshot::performGrab() #ifdef HAVE_X11_EXTENSIONS_SHAPE_H //No XShape - no work. if (haveXShape) { - TQBitmap tqmask(w, h); - //As the first step, get the tqmask from XShape. + TQBitmap mask(w, h); + //As the first step, get the mask from XShape. int count, order; XRectangle* rects = XShapeGetRectangles( qt_xdisplay(), child, ShapeBounding, &count, &order); @@ -395,7 +395,7 @@ void KSnapshot::performGrab() //Since the border area is part of the window, we use bounding // to limit our work region if (rects) { - //Create a TQRegion from the rectangles describing the bounding tqmask. + //Create a TQRegion from the rectangles describing the bounding mask. TQRegion contents; for (int pos = 0; pos < count; pos++) contents += TQRegion(rects[pos].x, rects[pos].y, @@ -417,14 +417,14 @@ void KSnapshot::performGrab() TQRegion maskedAway = bbox - contents; TQMemArray<TQRect> maskedAwayRects = maskedAway.rects(); - //Construct a bitmap tqmask from the rectangles - TQPainter p(&tqmask); + //Construct a bitmap mask from the rectangles + TQPainter p(&mask); p.fillRect(0, 0, w, h, TQt::color1); for (uint pos = 0; pos < maskedAwayRects.count(); pos++) p.fillRect(maskedAwayRects[pos], TQt::color0); p.end(); - snapshot.setMask(tqmask); + snapshot.setMask(mask); } } #endif |