diff options
Diffstat (limited to 'twin')
-rw-r--r-- | twin/activation.cpp | 2 | ||||
-rw-r--r-- | twin/atoms.cpp | 2 | ||||
-rw-r--r-- | twin/client.cpp | 158 | ||||
-rw-r--r-- | twin/clients/b2/b2client.cpp | 6 | ||||
-rw-r--r-- | twin/clients/keramik/keramik.cpp | 4 | ||||
-rw-r--r-- | twin/events.cpp | 106 | ||||
-rw-r--r-- | twin/geometry.cpp | 48 | ||||
-rw-r--r-- | twin/geometrytip.cpp | 2 | ||||
-rw-r--r-- | twin/group.cpp | 8 | ||||
-rw-r--r-- | twin/kcmtwin/twindecoration/preview.cpp | 4 | ||||
-rw-r--r-- | twin/kcmtwin/twinrules/detectwidget.cpp | 8 | ||||
-rw-r--r-- | twin/killer/killer.cpp | 2 | ||||
-rw-r--r-- | twin/killwindow.cpp | 16 | ||||
-rw-r--r-- | twin/layers.cpp | 4 | ||||
-rw-r--r-- | twin/lib/kcommondecoration.cpp | 4 | ||||
-rw-r--r-- | twin/main.cpp | 24 | ||||
-rw-r--r-- | twin/manage.cpp | 36 | ||||
-rw-r--r-- | twin/popupinfo.cpp | 2 | ||||
-rw-r--r-- | twin/tabbox.cpp | 100 | ||||
-rw-r--r-- | twin/tools/decobenchmark/preview.cpp | 4 | ||||
-rw-r--r-- | twin/utils.cpp | 42 | ||||
-rw-r--r-- | twin/workspace.cpp | 164 |
22 files changed, 373 insertions, 373 deletions
diff --git a/twin/activation.cpp b/twin/activation.cpp index d0212def2..f54b37232 100644 --- a/twin/activation.cpp +++ b/twin/activation.cpp @@ -687,7 +687,7 @@ Time Client::readUserCreationTime() const unsigned long extra = 0; unsigned char *data = 0; KXErrorHandler handler; // ignore errors? - status = XGetWindowProperty( qt_xdisplay(), window(), + status = XGetWindowProperty( tqt_xdisplay(), window(), atoms->kde_net_wm_user_creation_time, 0, 10000, FALSE, XA_CARDINAL, &type, &format, &nitems, &extra, &data ); if (status == Success ) diff --git a/twin/atoms.cpp b/twin/atoms.cpp index aa6e82ea2..0d4ee6195 100644 --- a/twin/atoms.cpp +++ b/twin/atoms.cpp @@ -103,7 +103,7 @@ Atoms::Atoms() assert( n <= max ); - XInternAtoms( qt_xdisplay(), names, n, FALSE, atoms_return ); + XInternAtoms( tqt_xdisplay(), names, n, FALSE, atoms_return ); for (int i = 0; i < n; i++ ) *atoms[i] = atoms_return[i]; } diff --git a/twin/client.cpp b/twin/client.cpp index 8a8745664..749942643 100644 --- a/twin/client.cpp +++ b/twin/client.cpp @@ -38,9 +38,9 @@ License. See the file "COPYING" for the exact licensing terms. // put all externs before the namespace statement to allow the linker // to resolve them properly -extern Atom qt_wm_state; -extern Atom qt_window_role; -extern Atom qt_sm_client_id; +extern Atom tqt_wm_state; +extern Atom tqt_window_role; +extern Atom tqt_sm_client_id; // wait 200 ms before drawing shadow after move/resize static const int SHADOW_DELAY = 200; @@ -227,7 +227,7 @@ void Client::releaseWindow( bool on_shutdown ) hidden = true; // so that it's not considered visible anymore (can't use hideClient(), it would set flags) if( !on_shutdown ) workspace()->clientHidden( this ); - XUnmapWindow( qt_xdisplay(), frameId()); // destroying decoration would cause ugly visual effect + XUnmapWindow( tqt_xdisplay(), frameId()); // destroying decoration would cause ugly visual effect destroyDecoration(); cleanGrouping(); if( !on_shutdown ) @@ -239,27 +239,27 @@ void Client::releaseWindow( bool on_shutdown ) desk = 0; info->setState( 0, info->state()); // reset all state flags } - XDeleteProperty( qt_xdisplay(), client, atoms->kde_net_wm_user_creation_time); - XDeleteProperty( qt_xdisplay(), client, atoms->net_frame_extents ); - XDeleteProperty( qt_xdisplay(), client, atoms->kde_net_wm_frame_strut ); - XReparentWindow( qt_xdisplay(), client, workspace()->rootWin(), x(), y()); - XRemoveFromSaveSet( qt_xdisplay(), client ); - XSelectInput( qt_xdisplay(), client, NoEventMask ); + XDeleteProperty( tqt_xdisplay(), client, atoms->kde_net_wm_user_creation_time); + XDeleteProperty( tqt_xdisplay(), client, atoms->net_frame_extents ); + XDeleteProperty( tqt_xdisplay(), client, atoms->kde_net_wm_frame_strut ); + XReparentWindow( tqt_xdisplay(), client, workspace()->rootWin(), x(), y()); + XRemoveFromSaveSet( tqt_xdisplay(), client ); + XSelectInput( tqt_xdisplay(), client, NoEventMask ); if( on_shutdown ) { // map the window, so it can be found after another WM is started - XMapWindow( qt_xdisplay(), client ); + XMapWindow( tqt_xdisplay(), client ); // TODO preserve minimized, shaded etc. state? } else { // Make sure it's not mapped if the app unmapped it (#65279). The app // may do map+unmap before we initially map the window by calling rawShow() from manage(). - XUnmapWindow( qt_xdisplay(), client ); + XUnmapWindow( tqt_xdisplay(), client ); } client = None; - XDestroyWindow( qt_xdisplay(), wrapper ); + XDestroyWindow( tqt_xdisplay(), wrapper ); wrapper = None; - XDestroyWindow( qt_xdisplay(), frame ); + XDestroyWindow( tqt_xdisplay(), frame ); frame = None; --postpone_geometry_updates; // don't use GeometryUpdatesBlocker, it would now set the geometry checkNonExistentClients(); @@ -288,9 +288,9 @@ void Client::destroyClient() cleanGrouping(); workspace()->removeClient( this, Allowed ); client = None; // invalidate - XDestroyWindow( qt_xdisplay(), wrapper ); + XDestroyWindow( tqt_xdisplay(), wrapper ); wrapper = None; - XDestroyWindow( qt_xdisplay(), frame ); + XDestroyWindow( tqt_xdisplay(), frame ); frame = None; --postpone_geometry_updates; // don't use GeometryUpdatesBlocker, it would now set the geometry checkNonExistentClients(); @@ -313,7 +313,7 @@ void Client::updateDecoration( bool check_workspace_pos, bool force ) // TODO check decoration's minimum size? decoration->init(); decoration->widget()->installEventFilter( this ); - XReparentWindow( qt_xdisplay(), decoration->widget()->winId(), frameId(), 0, 0 ); + XReparentWindow( tqt_xdisplay(), decoration->widget()->winId(), frameId(), 0, 0 ); decoration->widget()->lower(); decoration->borders( border_left, border_right, border_top, border_bottom ); options->onlyDecoTranslucent ? @@ -507,7 +507,7 @@ bool Client::isModalSystemNotification() const Atom actual; int format, result; unsigned long n, left; - result = XGetWindowProperty(qt_xdisplay(), window(), atoms->net_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); + result = XGetWindowProperty(tqt_xdisplay(), window(), atoms->net_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data != None && format == 32 ) { return TRUE; @@ -526,7 +526,7 @@ void Client::updateShape() updateOpacityCache(); if ( shape() ) { - XShapeCombineShape(qt_xdisplay(), frameId(), ShapeBounding, + XShapeCombineShape(tqt_xdisplay(), frameId(), ShapeBounding, clientPos().x(), clientPos().y(), window(), ShapeBounding, ShapeSet); setShapable(TRUE); @@ -546,18 +546,18 @@ void Client::updateShape() // the window lose focus (which is a problem with mouse focus policies) static Window helper_window = None; if( helper_window == None ) - helper_window = XCreateSimpleWindow( qt_xdisplay(), qt_xrootwin(), + helper_window = XCreateSimpleWindow( tqt_xdisplay(), tqt_xrootwin(), 0, 0, 1, 1, 0, 0, 0 ); - XResizeWindow( qt_xdisplay(), helper_window, width(), height()); - XShapeCombineShape( qt_xdisplay(), helper_window, ShapeInput, 0, 0, + XResizeWindow( tqt_xdisplay(), helper_window, width(), height()); + XShapeCombineShape( tqt_xdisplay(), helper_window, ShapeInput, 0, 0, frameId(), ShapeBounding, ShapeSet ); - XShapeCombineShape( qt_xdisplay(), helper_window, ShapeInput, + XShapeCombineShape( tqt_xdisplay(), helper_window, ShapeInput, clientPos().x(), clientPos().y(), window(), ShapeBounding, ShapeSubtract ); - XShapeCombineShape( qt_xdisplay(), helper_window, ShapeInput, + XShapeCombineShape( tqt_xdisplay(), helper_window, ShapeInput, clientPos().x(), clientPos().y(), window(), ShapeInput, ShapeUnion ); - XShapeCombineShape( qt_xdisplay(), frameId(), ShapeInput, 0, 0, + XShapeCombineShape( tqt_xdisplay(), frameId(), ShapeInput, 0, 0, helper_window, ShapeInput, ShapeSet ); } } @@ -566,10 +566,10 @@ void Client::setMask( const TQRegion& reg, int mode ) { _mask = reg; if( reg.isNull()) - XShapeCombineMask( qt_xdisplay(), frameId(), ShapeBounding, 0, 0, + XShapeCombineMask( tqt_xdisplay(), frameId(), ShapeBounding, 0, 0, None, ShapeSet ); else if( mode == X::Unsorted ) - XShapeCombineRegion( qt_xdisplay(), frameId(), ShapeBounding, 0, 0, + XShapeCombineRegion( tqt_xdisplay(), frameId(), ShapeBounding, 0, 0, reg.handle(), ShapeSet ); else { @@ -584,7 +584,7 @@ void Client::setMask( const TQRegion& reg, int mode ) xrects[ i ].width = rects[ i ].width(); xrects[ i ].height = rects[ i ].height(); } - XShapeCombineRectangles( qt_xdisplay(), frameId(), ShapeBounding, 0, 0, + XShapeCombineRectangles( tqt_xdisplay(), frameId(), ShapeBounding, 0, 0, xrects, rects.count(), ShapeSet, mode ); delete[] xrects; } @@ -601,7 +601,7 @@ TQRegion Client::mask() const void Client::setShapable(bool b) { long tmp = b?1:0; - XChangeProperty(qt_xdisplay(), frameId(), atoms->net_wm_window_shapable, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &tmp, 1L); + XChangeProperty(tqt_xdisplay(), frameId(), atoms->net_wm_window_shapable, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &tmp, 1L); } void Client::hideClient( bool hide ) @@ -767,7 +767,7 @@ void Client::animateMinimizeOrUnminimize( bool minimize ) if (area2 != area) { pm = animationPixmap( area.width() ); - pm2 = TQPixmap::grabWindow( qt_xrootwin(), area.x(), area.y(), area.width(), area.height() ); + pm2 = TQPixmap::grabWindow( tqt_xrootwin(), area.x(), area.y(), area.width(), area.height() ); p.drawPixmap( area.x(), area.y(), pm ); if ( need_to_clear ) { @@ -776,8 +776,8 @@ void Client::animateMinimizeOrUnminimize( bool minimize ) } area2 = area; } - XFlush(qt_xdisplay()); - XSync( qt_xdisplay(), FALSE ); + XFlush(tqt_xdisplay()); + XSync( tqt_xdisplay(), FALSE ); diff = t.elapsed(); if (diff > step) diff = step; @@ -867,16 +867,16 @@ void Client::setShade( ShadeMode mode ) { // shade_mode == ShadeNormal // we're about to shade, texx xcompmgr to prepare long _shade = 1; - XChangeProperty(qt_xdisplay(), frameId(), atoms->net_wm_window_shade, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &_shade, 1L); + XChangeProperty(tqt_xdisplay(), frameId(), atoms->net_wm_window_shade, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &_shade, 1L); // shade int h = height(); shade_geometry_change = true; TQSize s( sizeForClientSize( TQSize( clientSize()))); s.setHeight( border_top + border_bottom ); - XSelectInput( qt_xdisplay(), wrapper, ClientWinMask ); // avoid getting UnmapNotify - XUnmapWindow( qt_xdisplay(), wrapper ); - XUnmapWindow( qt_xdisplay(), client ); - XSelectInput( qt_xdisplay(), wrapper, ClientWinMask | SubstructureNotifyMask ); + XSelectInput( tqt_xdisplay(), wrapper, ClientWinMask ); // avoid getting UnmapNotify + XUnmapWindow( tqt_xdisplay(), wrapper ); + XUnmapWindow( tqt_xdisplay(), client ); + XSelectInput( tqt_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 ); @@ -886,7 +886,7 @@ void Client::setShade( ShadeMode mode ) do { h -= step; - XResizeWindow( qt_xdisplay(), frameId(), s.width(), h ); + XResizeWindow( tqt_xdisplay(), frameId(), s.width(), h ); resizeDecoration( TQSize( s.width(), h )); TQApplication::syncX(); } while ( h > s.height() + step ); @@ -903,7 +903,7 @@ void Client::setShade( ShadeMode mode ) } // tell xcompmgr shade's done _shade = 2; - XChangeProperty(qt_xdisplay(), frameId(), atoms->net_wm_window_shade, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &_shade, 1L); + XChangeProperty(tqt_xdisplay(), frameId(), atoms->net_wm_window_shade, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &_shade, 1L); } else { @@ -916,7 +916,7 @@ void Client::setShade( ShadeMode mode ) do { h += step; - XResizeWindow( qt_xdisplay(), frameId(), s.width(), h ); + XResizeWindow( tqt_xdisplay(), frameId(), s.width(), h ); resizeDecoration( TQSize( s.width(), h )); // assume a border // we do not have time to wait for X to send us paint events @@ -929,9 +929,9 @@ void Client::setShade( ShadeMode mode ) plainResize( s ); if( shade_mode == ShadeHover || shade_mode == ShadeActivated ) setActive( TRUE ); - XMapWindow( qt_xdisplay(), wrapperId()); - XMapWindow( qt_xdisplay(), window()); - XDeleteProperty (qt_xdisplay(), client, atoms->net_wm_window_shade); + XMapWindow( tqt_xdisplay(), wrapperId()); + XMapWindow( tqt_xdisplay(), window()); + XDeleteProperty (tqt_xdisplay(), client, atoms->net_wm_window_shade); if (options->shadowEnabled(false)) { for (ClientList::ConstIterator it = transients().begin(); @@ -1211,7 +1211,7 @@ 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, + shapes = XShapeGetRectangles(tqt_xdisplay(), frameId(), ShapeBounding, &count, &ordering); if (!shapes) // XShape extension not supported @@ -1265,7 +1265,7 @@ void Client::drawShadow() // Create a fake drop-down shadow effect via blended Xwindows shadowWidget = new TQWidget(0, 0, (WFlags)(WStyle_Customize | WX11BypassWM)); shadowWidget->setGeometry(shadow); - XSelectInput(qt_xdisplay(), shadowWidget->winId(), + XSelectInput(tqt_xdisplay(), shadowWidget->winId(), ButtonPressMask | ButtonReleaseMask | StructureNotifyMask); shadowWidget->installEventFilter(this); @@ -1309,7 +1309,7 @@ void Client::drawShadow() shadowShapes[i].height = (*it).height(); i++; } - XShapeCombineRectangles(qt_xdisplay(), shadowWidget->winId(), + XShapeCombineRectangles(tqt_xdisplay(), shadowWidget->winId(), ShapeBounding, -x() + thickness - xOffset, -y() + thickness - yOffset, shadowShapes, i, ShapeSet, Unsorted); @@ -1347,11 +1347,11 @@ void Client::drawShadow() shadows[1] = shadowWidget->winId(); } - XRestackWindows(qt_xdisplay(), shadows, 2); + XRestackWindows(tqt_xdisplay(), shadows, 2); // Don't use TQWidget::show() so we don't confuse QEffects, thus causing // broken focus. - XMapWindow(qt_xdisplay(), shadowWidget->winId()); + XMapWindow(tqt_xdisplay(), shadowWidget->winId()); // Tell whatever Clients are listening that this Client's shadow has been drawn. emit shadowDrawn(); @@ -1431,7 +1431,7 @@ void Client::imposeCachedShadow(TQPixmap &pixmap, TQRegion exposed) int thickness, windowX, windowY, xOffset, yOffset; rectangles = exposed.rects(); - rootWindow = qt_xrootwin(); + rootWindow = tqt_xrootwin(); thickness = options->shadowThickness(isActive()); windowX = this->x(); windowY = this->y(); @@ -1491,7 +1491,7 @@ void Client::imposeRegionShadow(TQPixmap &pixmap, TQRegion occluded, int windowX, windowY, xOffset, yOffset; rectangles = exposed.rects(); - rootWindow = qt_xrootwin(); + rootWindow = tqt_xrootwin(); windowX = this->x(); windowY = this->y(); xOffset = options->shadowXOffset(isActive()); @@ -1623,7 +1623,7 @@ void Client::setMappingState(int s) mapping_state = s; if( mapping_state == WithdrawnState ) { - XDeleteProperty( qt_xdisplay(), window(), qt_wm_state ); + XDeleteProperty( tqt_xdisplay(), window(), tqt_wm_state ); return; } assert( s == NormalState || s == IconicState ); @@ -1631,7 +1631,7 @@ void Client::setMappingState(int s) unsigned long data[2]; data[0] = (unsigned long) s; data[1] = (unsigned long) None; - XChangeProperty(qt_xdisplay(), window(), qt_wm_state, qt_wm_state, 32, + XChangeProperty(tqt_xdisplay(), window(), tqt_wm_state, tqt_wm_state, 32, PropModeReplace, (unsigned char *)data, 2); if( was_unmanaged ) // manage() did postpone_geometry_updates = 1, now it's ok to finally set the geometry @@ -1646,11 +1646,11 @@ void Client::rawShow() { if( decoration != NULL ) decoration->widget()->show(); // not really necessary, but let it know the state - XMapWindow( qt_xdisplay(), frame ); + XMapWindow( tqt_xdisplay(), frame ); if( !isShade()) { - XMapWindow( qt_xdisplay(), wrapper ); - XMapWindow( qt_xdisplay(), client ); + XMapWindow( tqt_xdisplay(), wrapper ); + XMapWindow( tqt_xdisplay(), client ); } if (options->shadowEnabled(isActive())) drawDelayedShadow(); @@ -1671,11 +1671,11 @@ void Client::rawHide() // here. removeShadow(); drawIntersectingShadows(); - XSelectInput( qt_xdisplay(), wrapper, ClientWinMask ); // avoid getting UnmapNotify - XUnmapWindow( qt_xdisplay(), frame ); - XUnmapWindow( qt_xdisplay(), wrapper ); - XUnmapWindow( qt_xdisplay(), client ); - XSelectInput( qt_xdisplay(), wrapper, ClientWinMask | SubstructureNotifyMask ); + XSelectInput( tqt_xdisplay(), wrapper, ClientWinMask ); // avoid getting UnmapNotify + XUnmapWindow( tqt_xdisplay(), frame ); + XUnmapWindow( tqt_xdisplay(), wrapper ); + XUnmapWindow( tqt_xdisplay(), client ); + XSelectInput( tqt_xdisplay(), wrapper, ClientWinMask | SubstructureNotifyMask ); if( decoration != NULL ) decoration->widget()->hide(); // not really necessary, but let it know the state workspace()->clientHidden( this ); @@ -1697,9 +1697,9 @@ void Client::sendClientMessage(Window w, Atom a, Atom protocol, long data1, long ev.xclient.data.l[3] = data2; ev.xclient.data.l[4] = data3; mask = 0L; - if (w == qt_xrootwin()) + if (w == tqt_xrootwin()) mask = SubstructureRedirectMask; /* magic! */ - XSendEvent(qt_xdisplay(), w, False, mask, &ev); + XSendEvent(tqt_xdisplay(), w, False, mask, &ev); } /* @@ -1753,7 +1753,7 @@ void Client::killWindow() Notify::raise( Notify::Delete ); killProcess( false ); // always kill this client at the server - XKillClient(qt_xdisplay(), window() ); + XKillClient(tqt_xdisplay(), window() ); destroyClient(); } @@ -2206,7 +2206,7 @@ void Client::takeFocus( allowed_t ) #endif if ( rules()->checkAcceptFocus( input )) { - XSetInputFocus( qt_xdisplay(), window(), RevertToPointerRoot, GET_QT_X_TIME() ); + XSetInputFocus( tqt_xdisplay(), window(), RevertToPointerRoot, GET_QT_X_TIME() ); } if ( Ptakefocus ) sendClientMessage(window(), atoms->wm_protocols, atoms->wm_take_focus); @@ -2340,7 +2340,7 @@ TQString Client::caption( bool full ) const void Client::getWMHints() { - XWMHints *hints = XGetWMHints(qt_xdisplay(), window() ); + XWMHints *hints = XGetWMHints(tqt_xdisplay(), window() ); input = true; window_group = None; urgency = false; @@ -2431,7 +2431,7 @@ void Client::getWindowProtocols() Pcontexthelp = 0; Pping = 0; - if (XGetWMProtocols(qt_xdisplay(), window(), &p, &n)) + if (XGetWMProtocols(tqt_xdisplay(), window(), &p, &n)) { for (i = 0; i < n; i++) if (p[i] == atoms->wm_delete_window) @@ -2459,7 +2459,7 @@ static int nullErrorHandler(Display *, XErrorEvent *) */ TQCString Client::staticWindowRole(WId w) { - return getStringProperty(w, qt_window_role).lower(); + return getStringProperty(w, tqt_window_role).lower(); } /*! @@ -2467,7 +2467,7 @@ TQCString Client::staticWindowRole(WId w) */ TQCString Client::staticSessionId(WId w) { - return getStringProperty(w, qt_sm_client_id); + return getStringProperty(w, tqt_sm_client_id); } /*! @@ -2490,7 +2490,7 @@ Window Client::staticWmClientLeader(WId w) unsigned char *data = 0; Window result = w; XErrorHandler oldHandler = XSetErrorHandler(nullErrorHandler); - status = XGetWindowProperty( qt_xdisplay(), w, atoms->wm_client_leader, 0, 10000, + status = XGetWindowProperty( tqt_xdisplay(), w, atoms->wm_client_leader, 0, 10000, FALSE, XA_WINDOW, &type, &format, &nitems, &extra, &data ); XSetErrorHandler(oldHandler); @@ -2708,7 +2708,7 @@ void Client::setCursor( const TQCursor& c ) cursor = c; if( decoration != NULL ) decoration->widget()->setCursor( cursor ); - XDefineCursor( qt_xdisplay(), frameId(), cursor.handle()); + XDefineCursor( tqt_xdisplay(), frameId(), cursor.handle()); } Client::Position Client::mousePosition( const TQPoint& p ) const @@ -2763,21 +2763,21 @@ void Client::setOpacity(bool translucent, uint opacity) { if (isDesktop()) return; // xcompmgr does not like non solid desktops and the user could set it accidently by mouse scrolling -// tqWarning("setting opacity for %d",qt_xdisplay()); +// tqWarning("setting opacity for %d",tqt_xdisplay()); //rule out activated translulcency with 100% opacity if (!translucent || opacity == 0xFFFFFFFF) { opacity_ = 0xFFFFFFFF; - XDeleteProperty (qt_xdisplay(), frameId(), atoms->net_wm_window_opacity); - XDeleteProperty (qt_xdisplay(), window(), atoms->net_wm_window_opacity); // ??? frameId() is necessary for visible changes, window() is the winId() that would be set by apps - we set both to be sure the app knows what's currently displayd + XDeleteProperty (tqt_xdisplay(), frameId(), atoms->net_wm_window_opacity); + XDeleteProperty (tqt_xdisplay(), window(), atoms->net_wm_window_opacity); // ??? frameId() is necessary for visible changes, window() is the winId() that would be set by apps - we set both to be sure the app knows what's currently displayd } else{ if(opacity == opacity_) return; opacity_ = opacity; long data = opacity; // 32bit XChangeProperty needs long - XChangeProperty(qt_xdisplay(), frameId(), atoms->net_wm_window_opacity, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &data, 1L); - XChangeProperty(qt_xdisplay(), window(), atoms->net_wm_window_opacity, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &data, 1L); + XChangeProperty(tqt_xdisplay(), frameId(), atoms->net_wm_window_opacity, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &data, 1L); + XChangeProperty(tqt_xdisplay(), window(), atoms->net_wm_window_opacity, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &data, 1L); } } @@ -2786,7 +2786,7 @@ void Client::setShadowSize(uint shadowSize) // ignoring all individual settings - if we control a window, we control it's shadow // TODO somehow handle individual settings for docks (besides custom sizes) long data = shadowSize; - XChangeProperty(qt_xdisplay(), frameId(), atoms->net_wm_window_shadow, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &data, 1L); + XChangeProperty(tqt_xdisplay(), frameId(), atoms->net_wm_window_shadow, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &data, 1L); } void Client::updateOpacity() @@ -2974,7 +2974,7 @@ bool Client::getWindowOpacity() //query translucency settings from X, returns tr Atom actual; int format, result; unsigned long n, left; - result = XGetWindowProperty(qt_xdisplay(), window(), atoms->net_wm_window_opacity, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); + result = XGetWindowProperty(tqt_xdisplay(), window(), atoms->net_wm_window_opacity, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data != None && format == 32 ) { opacity_ = *reinterpret_cast< long* >( data ); @@ -3021,12 +3021,12 @@ void Client::setDecoHashProperty(uint topHeight, uint rightWidth, uint bottomHei (rightWidth < 255 ? rightWidth : 255) << 16 | (bottomHeight < 255 ? bottomHeight : 255) << 8 | (leftWidth < 255 ? leftWidth : 255); - XChangeProperty(qt_xdisplay(), frameId(), atoms->net_wm_window_decohash, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &data, 1L); + XChangeProperty(tqt_xdisplay(), frameId(), atoms->net_wm_window_decohash, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &data, 1L); } void Client::unsetDecoHashProperty() { - XDeleteProperty( qt_xdisplay(), frameId(), atoms->net_wm_window_decohash); + XDeleteProperty( tqt_xdisplay(), frameId(), atoms->net_wm_window_decohash); } #ifndef NDEBUG diff --git a/twin/clients/b2/b2client.cpp b/twin/clients/b2/b2client.cpp index 8e62360a6..027987b9c 100644 --- a/twin/clients/b2/b2client.cpp +++ b/twin/clients/b2/b2client.cpp @@ -440,8 +440,8 @@ bool B2Client::isModalSystemNotification() int format, result; unsigned long n, left; Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(qt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); - result = XGetWindowProperty(qt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data != None && format == 32 ) { return TRUE; @@ -1324,7 +1324,7 @@ bool B2Titlebar::x11Event(XEvent *e) { if (!set_x11mask) { set_x11mask = true; - XSelectInput(qt_xdisplay(), winId(), + XSelectInput(tqt_xdisplay(), winId(), KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | KeymapStateMask | diff --git a/twin/clients/keramik/keramik.cpp b/twin/clients/keramik/keramik.cpp index 121861865..2ffbbdfee 100644 --- a/twin/clients/keramik/keramik.cpp +++ b/twin/clients/keramik/keramik.cpp @@ -1031,8 +1031,8 @@ bool KeramikClient::isModalSystemNotification() int format, result; unsigned long n, left; Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(qt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); - result = XGetWindowProperty(qt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data != None && format == 32 ) { return TRUE; diff --git a/twin/events.cpp b/twin/events.cpp index 72047bffc..c7472cdaf 100644 --- a/twin/events.cpp +++ b/twin/events.cpp @@ -30,7 +30,7 @@ License. See the file "COPYING" for the exact licensing terms. #include <X11/Xatom.h> #include <stdlib.h> -extern Atom qt_window_role; +extern Atom tqt_window_role; namespace KWinInternal { @@ -197,7 +197,7 @@ bool Workspace::workspaceEvent( XEvent * e ) if ( mouse_emulation && (e->type == ButtonPress || e->type == ButtonRelease ) ) { mouse_emulation = FALSE; - XUngrabKeyboard( qt_xdisplay(), GET_QT_X_TIME() ); + XUngrabKeyboard( tqt_xdisplay(), GET_QT_X_TIME() ); } if( e->type == PropertyNotify || e->type == ClientMessage ) @@ -293,7 +293,7 @@ bool Workspace::workspaceEvent( XEvent * e ) { // see comments for allowClientActivation() Time my_qtx_time = GET_QT_X_TIME(); - XChangeProperty(qt_xdisplay(), e->xcreatewindow.window, + XChangeProperty(tqt_xdisplay(), e->xcreatewindow.window, atoms->kde_net_wm_user_creation_time, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&my_qtx_time, 1); SET_QT_X_TIME(my_qtx_time); @@ -314,12 +314,12 @@ bool Workspace::workspaceEvent( XEvent * e ) // window. XEvent ev; WId w = e->xunmap.window; - if ( XCheckTypedWindowEvent (qt_xdisplay(), w, + if ( XCheckTypedWindowEvent (tqt_xdisplay(), w, ReparentNotify, &ev) ) { if ( ev.xreparent.parent != root ) { - XReparentWindow( qt_xdisplay(), w, root, 0, 0 ); + XReparentWindow( tqt_xdisplay(), w, root, 0, 0 ); addSystemTrayWin( w ); } } @@ -364,13 +364,13 @@ bool Workspace::workspaceEvent( XEvent * e ) if ( addSystemTrayWin( e->xmaprequest.window ) ) return TRUE; c = createClient( e->xmaprequest.window, false ); - if ( c != NULL && root != qt_xrootwin() ) + if ( c != NULL && root != tqt_xrootwin() ) { // TODO what is this? // TODO may use TQWidget::create - XReparentWindow( qt_xdisplay(), c->frameId(), root, 0, 0 ); + XReparentWindow( tqt_xdisplay(), c->frameId(), root, 0, 0 ); } if( c == NULL ) // refused to manage, simply map it (most probably override redirect) - XMapRaised( qt_xdisplay(), e->xmaprequest.window ); + XMapRaised( tqt_xdisplay(), e->xmaprequest.window ); return true; } if( c ) @@ -417,7 +417,7 @@ bool Workspace::workspaceEvent( XEvent * e ) wc.stack_mode = Above; unsigned int value_mask = e->xconfigurerequest.value_mask & ( CWX | CWY | CWWidth | CWHeight | CWBorderWidth ); - XConfigureWindow( qt_xdisplay(), e->xconfigurerequest.window, value_mask, &wc ); + XConfigureWindow( tqt_xdisplay(), e->xconfigurerequest.window, value_mask, &wc ); return true; } break; @@ -434,10 +434,10 @@ bool Workspace::workspaceEvent( XEvent * e ) if( e->xfocus.window == rootWin() && TQCString( getenv("TDE_MULTIHEAD")).lower() != "true" && ( e->xfocus.detail == NotifyDetailNone || e->xfocus.detail == NotifyPointerRoot )) { - updateXTime(); // focusToNull() uses qt_x_time, which is old now (FocusIn has no timestamp) + updateXTime(); // focusToNull() uses tqt_x_time, which is old now (FocusIn has no timestamp) Window focus; int revert; - XGetInputFocus( qt_xdisplay(), &focus, &revert ); + XGetInputFocus( tqt_xdisplay(), &focus, &revert ); if( focus == None || focus == PointerRoot ) { //kdWarning( 1212 ) << "X focus set to None/PointerRoot, reseting focus" << endl; @@ -712,7 +712,7 @@ void Client::unmapNotifyEvent( XUnmapEvent* e ) case NormalState: // maybe we will be destroyed soon. Check this first. XEvent ev; - if( XCheckTypedWindowEvent (qt_xdisplay(), window(), + if( XCheckTypedWindowEvent (tqt_xdisplay(), window(), DestroyNotify, &ev) ) // TODO I don't like this much { destroyClient(); // deletes this @@ -808,7 +808,7 @@ void Client::configureRequestEvent( XConfigureRequestEvent* e ) wc.border_width = 0; value_mask = CWBorderWidth; - XConfigureWindow( qt_xdisplay(), window(), value_mask, & wc ); + XConfigureWindow( tqt_xdisplay(), window(), value_mask, & wc ); } if( e->value_mask & ( CWX | CWY | CWHeight | CWWidth )) @@ -859,7 +859,7 @@ void Client::propertyNotifyEvent( XPropertyEvent* e ) getWindowProtocols(); else if (e->atom == atoms->wm_client_leader ) getWmClientLeader(); - else if( e->atom == qt_window_role ) + else if( e->atom == tqt_window_role ) window_role = staticWindowRole( window()); else if( e->atom == atoms->motif_wm_hints ) getMotifHints(); @@ -939,7 +939,7 @@ void Client::leaveNotifyEvent( XCrossingEvent* e ) int d1, d2, d3, d4; unsigned int d5; Window w, child; - if( XQueryPointer( qt_xdisplay(), frameId(), &w, &child, &d1, &d2, &d3, &d4, &d5 ) == False + if( XQueryPointer( tqt_xdisplay(), frameId(), &w, &child, &d1, &d2, &d3, &d4, &d5 ) == False || child == None ) lostMouse = true; // really lost the mouse } @@ -972,7 +972,7 @@ void Client::grabButton( int modifier ) for( int i = 0; i < 8; ++i ) - XGrabButton( qt_xdisplay(), AnyButton, + XGrabButton( tqt_xdisplay(), AnyButton, modifier | mods[ i ], wrapperId(), FALSE, ButtonPressMask, GrabModeSync, GrabModeAsync, None, None ); @@ -989,7 +989,7 @@ void Client::ungrabButton( int modifier ) for( int i = 0; i < 8; ++i ) - XUngrabButton( qt_xdisplay(), AnyButton, + XUngrabButton( tqt_xdisplay(), AnyButton, modifier | mods[ i ], wrapperId()); } #undef XCapL @@ -1006,7 +1006,7 @@ void Client::updateMouseGrab() { if( workspace()->globalShortcutsDisabled()) { - XUngrabButton( qt_xdisplay(), AnyButton, AnyModifier, wrapperId()); + XUngrabButton( tqt_xdisplay(), AnyButton, AnyModifier, wrapperId()); // keep grab for the simple click without modifiers if needed (see below) bool not_obscured = workspace()->topClientOnDesktop( workspace()->currentDesktop(), true, false ) == this; if( !( !options->clickRaise || not_obscured )) @@ -1016,7 +1016,7 @@ void Client::updateMouseGrab() if( isActive() && !workspace()->forcedGlobalMouseGrab()) // see Workspace::establishTabBoxGrab() { // first grab all modifier combinations - XGrabButton(qt_xdisplay(), AnyButton, AnyModifier, wrapperId(), FALSE, + XGrabButton(tqt_xdisplay(), AnyButton, AnyModifier, wrapperId(), FALSE, ButtonPressMask, GrabModeSync, GrabModeAsync, None, None ); @@ -1035,9 +1035,9 @@ void Client::updateMouseGrab() } else { - XUngrabButton( qt_xdisplay(), AnyButton, AnyModifier, wrapperId()); + XUngrabButton( tqt_xdisplay(), AnyButton, AnyModifier, wrapperId()); // simply grab all modifier combinations - XGrabButton(qt_xdisplay(), AnyButton, AnyModifier, wrapperId(), FALSE, + XGrabButton(tqt_xdisplay(), AnyButton, AnyModifier, wrapperId(), FALSE, ButtonPressMask, GrabModeSync, GrabModeAsync, None, None ); @@ -1108,8 +1108,8 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) // find the window under the cursor that should receive the // simulated events - root_window = qt_xrootwin(); - XQueryPointer(qt_xdisplay(), root_window, &root_window, + root_window = tqt_xrootwin(); + XQueryPointer(tqt_xdisplay(), root_window, &root_window, &pointer_window, &x_root, &y_root, &x, &y, &mask); if (pointer_window != None) @@ -1119,7 +1119,7 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) // the immediate descendant of a window's window decoration, // which causes KWin to refocus windows properly parent_window = pointer_window; - XQueryPointer(qt_xdisplay(), parent_window, &root_window, + XQueryPointer(tqt_xdisplay(), parent_window, &root_window, &pointer_window, &x_root, &y_root, &x, &y, &mask); inner_window = pointer_window; @@ -1130,7 +1130,7 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) // the subsequent query. When no child window is left, we've // found the child that will receive the simulated event parent_window = pointer_window; - XQueryPointer(qt_xdisplay(), parent_window, &root_window, + XQueryPointer(tqt_xdisplay(), parent_window, &root_window, &pointer_window, &x_root, &y_root, &x, &y, &mask); } pointer_window = parent_window; @@ -1140,8 +1140,8 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) // simulate a mouse button press xe.type = ButtonPress; - xe.display = qt_xdisplay(); - xe.root = qt_xrootwin(); + xe.display = tqt_xdisplay(); + xe.root = tqt_xrootwin(); xe.subwindow = None; xe.time = CurrentTime; xe.x = x; @@ -1154,17 +1154,17 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) if (inner_window != None && inner_window != pointer_window) { xe.window = inner_window; - XSendEvent(qt_xdisplay(), inner_window, True, ButtonPressMask, + XSendEvent(tqt_xdisplay(), inner_window, True, ButtonPressMask, (XEvent *)&xe); } xe.window = pointer_window; - XSendEvent(qt_xdisplay(), pointer_window, True, ButtonPressMask, + XSendEvent(tqt_xdisplay(), pointer_window, True, ButtonPressMask, (XEvent *)&xe); // simulate a mouse button release xe.type = ButtonRelease; - xe.display = qt_xdisplay(); - xe.root = qt_xrootwin(); + xe.display = tqt_xdisplay(); + xe.root = tqt_xrootwin(); xe.subwindow = None; xe.time = CurrentTime; xe.x = x; @@ -1177,11 +1177,11 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) if (inner_window != None && inner_window != pointer_window) { xe.window = inner_window; - XSendEvent(qt_xdisplay(), inner_window, True, ButtonReleaseMask, + XSendEvent(tqt_xdisplay(), inner_window, True, ButtonReleaseMask, (XEvent *)&xe); } xe.window = pointer_window; - XSendEvent(qt_xdisplay(), pointer_window, True, ButtonReleaseMask, + XSendEvent(tqt_xdisplay(), pointer_window, True, ButtonReleaseMask, (XEvent *)&xe); drawDelayedShadow(); @@ -1206,8 +1206,8 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) // find the window under the cursor that should receive the // simulated events - root_window = qt_xrootwin(); - XQueryPointer(qt_xdisplay(), root_window, &root_window, + root_window = tqt_xrootwin(); + XQueryPointer(tqt_xdisplay(), root_window, &root_window, &pointer_window, &x_root, &y_root, &x, &y, &mask); if (pointer_window != None) @@ -1217,7 +1217,7 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) // the immediate descendant of a window's window decoration, // which causes KWin to refocus windows properly parent_window = pointer_window; - XQueryPointer(qt_xdisplay(), parent_window, &root_window, + XQueryPointer(tqt_xdisplay(), parent_window, &root_window, &pointer_window, &x_root, &y_root, &x, &y, &mask); inner_window = pointer_window; @@ -1228,7 +1228,7 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) // the subsequent query. When no child window is left, we've // found the child that will receive the simulated event parent_window = pointer_window; - XQueryPointer(qt_xdisplay(), parent_window, &root_window, + XQueryPointer(tqt_xdisplay(), parent_window, &root_window, &pointer_window, &x_root, &y_root, &x, &y, &mask); } pointer_window = parent_window; @@ -1238,8 +1238,8 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) // simulate a mouse button press xe.type = ButtonPress; - xe.display = qt_xdisplay(); - xe.root = qt_xrootwin(); + xe.display = tqt_xdisplay(); + xe.root = tqt_xrootwin(); xe.subwindow = None; xe.time = CurrentTime; xe.x = x; @@ -1252,18 +1252,18 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) { xe.button = buttonPressed; xe.window = inner_window; - XSendEvent(qt_xdisplay(), inner_window, True, ButtonPressMask, + XSendEvent(tqt_xdisplay(), inner_window, True, ButtonPressMask, (XEvent *)&xe); } xe.button = buttonPressed; xe.window = pointer_window; - XSendEvent(qt_xdisplay(), pointer_window, True, ButtonPressMask, + XSendEvent(tqt_xdisplay(), pointer_window, True, ButtonPressMask, (XEvent *)&xe); // simulate a mouse button release xe.type = ButtonRelease; - xe.display = qt_xdisplay(); - xe.root = qt_xrootwin(); + xe.display = tqt_xdisplay(); + xe.root = tqt_xrootwin(); xe.subwindow = None; xe.time = CurrentTime; xe.x = x; @@ -1276,13 +1276,13 @@ bool Client::eventFilter( TQObject* o, TQEvent* e ) xe.window = inner_window; xe.state = buttonMask; xe.button = buttonPressed; - XSendEvent(qt_xdisplay(), inner_window, True, ButtonReleaseMask, + XSendEvent(tqt_xdisplay(), inner_window, True, ButtonReleaseMask, (XEvent *)&xe); } xe.state = buttonMask; xe.button = buttonPressed; xe.window = pointer_window; - XSendEvent(qt_xdisplay(), pointer_window, True, ButtonReleaseMask, + XSendEvent(tqt_xdisplay(), pointer_window, True, ButtonReleaseMask, (XEvent *)&xe); drawDelayedShadow(); @@ -1339,7 +1339,7 @@ bool Client::buttonPressEvent( Window w, int button, int state, int x, int y, in if (buttonDown) { if( w == wrapperId()) - XAllowEvents(qt_xdisplay(), SyncPointer, CurrentTime ); //qt_x_time); + XAllowEvents(tqt_xdisplay(), SyncPointer, CurrentTime ); //tqt_x_time); return true; } @@ -1358,7 +1358,7 @@ bool Client::buttonPressEvent( Window w, int button, int state, int x, int y, in { // hide splashwindow if the user clicks on it hideClient( true ); if( w == wrapperId()) - XAllowEvents(qt_xdisplay(), SyncPointer, CurrentTime ); //qt_x_time); + XAllowEvents(tqt_xdisplay(), SyncPointer, CurrentTime ); //tqt_x_time); return true; } @@ -1423,14 +1423,14 @@ bool Client::buttonPressEvent( Window w, int button, int state, int x, int y, in replay = TRUE; if( w == wrapperId()) // these can come only from a grab - XAllowEvents(qt_xdisplay(), replay? ReplayPointer : SyncPointer, CurrentTime ); //qt_x_time); + XAllowEvents(tqt_xdisplay(), replay? ReplayPointer : SyncPointer, CurrentTime ); //tqt_x_time); return true; } } if( w == wrapperId()) // these can come only from a grab { - XAllowEvents(qt_xdisplay(), ReplayPointer, CurrentTime ); //qt_x_time); + XAllowEvents(tqt_xdisplay(), ReplayPointer, CurrentTime ); //tqt_x_time); return true; } if( w == decorationId()) @@ -1503,7 +1503,7 @@ bool Client::buttonReleaseEvent( Window w, int /*button*/, int state, int x, int return false; if( w == wrapperId()) { - XAllowEvents(qt_xdisplay(), SyncPointer, CurrentTime ); //qt_x_time); + XAllowEvents(tqt_xdisplay(), SyncPointer, CurrentTime ); //tqt_x_time); return true; } if( w != frameId() && w != decorationId() && w != moveResizeGrabWindow()) @@ -1553,9 +1553,9 @@ static bool waitingMotionEvent() && timestampCompare( GET_QT_X_TIME(), next_motion_time ) < 0 ) return true; was_motion = false; - XSync( qt_xdisplay(), False ); // this helps to discard more MotionNotify events + XSync( tqt_xdisplay(), False ); // this helps to discard more MotionNotify events XEvent dummy; - XCheckIfEvent( qt_xdisplay(), &dummy, motion_predicate, NULL ); + XCheckIfEvent( tqt_xdisplay(), &dummy, motion_predicate, NULL ); return was_motion; } @@ -1648,7 +1648,7 @@ static bool check_follows_focusin( Client* c ) // XCheckIfEvent() is used to make the search non-blocking, the predicate // always returns False, so nothing is removed from the events queue. // XPeekIfEvent() would block. - XCheckIfEvent( qt_xdisplay(), &dummy, predicate_follows_focusin, (XPointer)c ); + XCheckIfEvent( tqt_xdisplay(), &dummy, predicate_follows_focusin, (XPointer)c ); return follows_focusin; } diff --git a/twin/geometry.cpp b/twin/geometry.cpp index ab7311556..4215ec38f 100644 --- a/twin/geometry.cpp +++ b/twin/geometry.cpp @@ -680,10 +680,10 @@ void Workspace::updateTopMenuGeometry( Client* c ) if( c != NULL ) { XEvent ev; - ev.xclient.display = qt_xdisplay(); + ev.xclient.display = tqt_xdisplay(); ev.xclient.type = ClientMessage; ev.xclient.window = c->window(); - static Atom msg_type_atom = XInternAtom( qt_xdisplay(), "_KDE_TOPMENU_MINSIZE", False ); + static Atom msg_type_atom = XInternAtom( tqt_xdisplay(), "_KDE_TOPMENU_MINSIZE", False ); ev.xclient.message_type = msg_type_atom; ev.xclient.format = 32; ev.xclient.data.l[0] = GET_QT_X_TIME(); @@ -691,7 +691,7 @@ void Workspace::updateTopMenuGeometry( Client* c ) ev.xclient.data.l[2] = topmenu_space->height(); ev.xclient.data.l[3] = 0; ev.xclient.data.l[4] = 0; - XSendEvent( qt_xdisplay(), c->window(), False, NoEventMask, &ev ); + XSendEvent( tqt_xdisplay(), c->window(), False, NoEventMask, &ev ); KWin::setStrut( c->window(), 0, 0, topmenu_height, 0 ); // so that kicker etc. know c->checkWorkspacePosition(); return; @@ -859,25 +859,25 @@ NETExtendedStrut Client::strut() const { ext.left_width = str.left; ext.left_start = 0; - ext.left_end = XDisplayHeight( qt_xdisplay(), DefaultScreen( qt_xdisplay())); + ext.left_end = XDisplayHeight( tqt_xdisplay(), DefaultScreen( tqt_xdisplay())); } if( str.right != 0 ) { ext.right_width = str.right; ext.right_start = 0; - ext.right_end = XDisplayHeight( qt_xdisplay(), DefaultScreen( qt_xdisplay())); + ext.right_end = XDisplayHeight( tqt_xdisplay(), DefaultScreen( tqt_xdisplay())); } if( str.top != 0 ) { ext.top_width = str.top; ext.top_start = 0; - ext.top_end = XDisplayWidth( qt_xdisplay(), DefaultScreen( qt_xdisplay())); + ext.top_end = XDisplayWidth( tqt_xdisplay(), DefaultScreen( tqt_xdisplay())); } if( str.bottom != 0 ) { ext.bottom_width = str.bottom; ext.bottom_start = 0; - ext.bottom_end = XDisplayWidth( qt_xdisplay(), DefaultScreen( qt_xdisplay())); + ext.bottom_end = XDisplayWidth( tqt_xdisplay(), DefaultScreen( tqt_xdisplay())); } } return ext; @@ -1284,7 +1284,7 @@ TQSize Client::sizeForClientSize( const TQSize& wsize, Sizemode mode, bool nofra void Client::getWmNormalHints() { long msize; - if (XGetWMNormalHints(qt_xdisplay(), window(), &xSizeHint, &msize) == 0 ) + if (XGetWMNormalHints(tqt_xdisplay(), window(), &xSizeHint, &msize) == 0 ) xSizeHint.flags = 0; // set defined values for the fields, even if they're not in flags @@ -1386,7 +1386,7 @@ void Client::sendSyntheticConfigureNotify() c.border_width = 0; c.above = None; c.override_redirect = 0; - XSendEvent( qt_xdisplay(), c.event, TRUE, StructureNotifyMask, (XEvent*)&c ); + XSendEvent( tqt_xdisplay(), c.event, TRUE, StructureNotifyMask, (XEvent*)&c ); } const TQPoint Client::calculateGravitation( bool invert, int gravity ) const @@ -1758,14 +1758,14 @@ void Client::setGeometry( int x, int y, int w, int h, ForceGeometry_t force ) return; } resizeDecoration( TQSize( w, h )); - XMoveResizeWindow( qt_xdisplay(), frameId(), x, y, w, h ); + XMoveResizeWindow( tqt_xdisplay(), frameId(), x, y, w, h ); // resizeDecoration( TQSize( w, h )); if( !isShade()) { TQSize cs = clientSize(); - XMoveResizeWindow( qt_xdisplay(), wrapperId(), clientPos().x(), clientPos().y(), + XMoveResizeWindow( tqt_xdisplay(), wrapperId(), clientPos().x(), clientPos().y(), cs.width(), cs.height()); - XMoveResizeWindow( qt_xdisplay(), window(), 0, 0, cs.width(), cs.height()); + XMoveResizeWindow( tqt_xdisplay(), window(), 0, 0, cs.width(), cs.height()); } updateShape(); // SELI TODO won't this be too expensive? @@ -1813,14 +1813,14 @@ void Client::plainResize( int w, int h, ForceGeometry_t force ) return; } resizeDecoration( TQSize( w, h )); - XResizeWindow( qt_xdisplay(), frameId(), w, h ); + XResizeWindow( tqt_xdisplay(), frameId(), w, h ); // resizeDecoration( TQSize( w, h )); if( !isShade()) { TQSize cs = clientSize(); - XMoveResizeWindow( qt_xdisplay(), wrapperId(), clientPos().x(), clientPos().y(), + XMoveResizeWindow( tqt_xdisplay(), wrapperId(), clientPos().x(), clientPos().y(), cs.width(), cs.height()); - XMoveResizeWindow( qt_xdisplay(), window(), 0, 0, cs.width(), cs.height()); + XMoveResizeWindow( tqt_xdisplay(), window(), 0, 0, cs.width(), cs.height()); } updateShape(); updateWorkareaDiffs(); @@ -1844,7 +1844,7 @@ void Client::move( int x, int y, ForceGeometry_t force ) pending_geometry_update = true; return; } - XMoveWindow( qt_xdisplay(), frameId(), x, y ); + XMoveWindow( tqt_xdisplay(), frameId(), x, y ); sendSyntheticConfigureNotify(); updateWindowRules(); checkMaximizeGeometry(); @@ -2314,18 +2314,18 @@ bool Client::startMoveResize() // (http://lists.kde.org/?t=107302193400001&r=1&w=2) XSetWindowAttributes attrs; TQRect r = workspace()->clientArea( FullArea, this ); - move_resize_grab_window = XCreateWindow( qt_xdisplay(), workspace()->rootWin(), r.x(), r.y(), + move_resize_grab_window = XCreateWindow( tqt_xdisplay(), workspace()->rootWin(), r.x(), r.y(), r.width(), r.height(), 0, CopyFromParent, InputOnly, CopyFromParent, 0, &attrs ); - XMapRaised( qt_xdisplay(), move_resize_grab_window ); - if( XGrabPointer( qt_xdisplay(), move_resize_grab_window, False, + XMapRaised( tqt_xdisplay(), move_resize_grab_window ); + if( XGrabPointer( tqt_xdisplay(), move_resize_grab_window, False, ButtonPressMask | ButtonReleaseMask | PointerMotionMask | EnterWindowMask | LeaveWindowMask, GrabModeAsync, GrabModeAsync, move_resize_grab_window, cursor.handle(), GET_QT_X_TIME() ) == Success ) has_grab = true; - if( XGrabKeyboard( qt_xdisplay(), frameId(), False, GrabModeAsync, GrabModeAsync, GET_QT_X_TIME() ) == Success ) + if( XGrabKeyboard( tqt_xdisplay(), frameId(), False, GrabModeAsync, GrabModeAsync, GET_QT_X_TIME() ) == Success ) has_grab = true; if( !has_grab ) // at least one grab is necessary in order to be able to finish move/resize { - XDestroyWindow( qt_xdisplay(), move_resize_grab_window ); + XDestroyWindow( tqt_xdisplay(), move_resize_grab_window ); move_resize_grab_window = None; return false; } @@ -2389,9 +2389,9 @@ void Client::leaveMoveResize() if ( ( isMove() && rules()->checkMoveResizeMode( options->moveMode ) != Options::Opaque ) || ( isResize() && rules()->checkMoveResizeMode( options->resizeMode ) != Options::Opaque ) ) ungrabXServer(); - XUngrabKeyboard( qt_xdisplay(), GET_QT_X_TIME() ); - XUngrabPointer( qt_xdisplay(), GET_QT_X_TIME() ); - XDestroyWindow( qt_xdisplay(), move_resize_grab_window ); + XUngrabKeyboard( tqt_xdisplay(), GET_QT_X_TIME() ); + XUngrabPointer( tqt_xdisplay(), GET_QT_X_TIME() ); + XDestroyWindow( tqt_xdisplay(), move_resize_grab_window ); move_resize_grab_window = None; workspace()->setClientIsMoving(0); if( move_faked_activity ) diff --git a/twin/geometrytip.cpp b/twin/geometrytip.cpp index e196135ab..046f1d594 100644 --- a/twin/geometrytip.cpp +++ b/twin/geometrytip.cpp @@ -26,7 +26,7 @@ GeometryTip::GeometryTip( const XSizeHints* xSizeHints, bool save_under ): { XSetWindowAttributes attr; attr.save_under = True; // use saveunder if possible to avoid weird effects in transparent mode - XChangeWindowAttributes( qt_xdisplay(), winId(), CWSaveUnder, &attr ); + XChangeWindowAttributes( tqt_xdisplay(), winId(), CWSaveUnder, &attr ); } } diff --git a/twin/group.cpp b/twin/group.cpp index 8d5bd7246..50fce46f0 100644 --- a/twin/group.cpp +++ b/twin/group.cpp @@ -209,7 +209,7 @@ Group::Group( Window leader_P, Workspace* workspace_P ) { leader_client = workspace_P->findClient( WindowMatchPredicate( leader_P )); unsigned long properties[ 2 ] = { 0, NET::WM2StartupId }; - leader_info = new NETWinInfo( qt_xdisplay(), leader_P, workspace()->rootWin(), + leader_info = new NETWinInfo( tqt_xdisplay(), leader_P, workspace()->rootWin(), properties, 2 ); } workspace()->addGroup( this, Allowed ); @@ -580,7 +580,7 @@ void Client::readTransient() { TRANSIENCY_CHECK( this ); Window new_transient_for_id; - if( XGetTransientForHint( qt_xdisplay(), window(), &new_transient_for_id )) + if( XGetTransientForHint( tqt_xdisplay(), window(), &new_transient_for_id )) { original_transient_for_id = new_transient_for_id; new_transient_for_id = verifyTransientFor( new_transient_for_id, true ); @@ -787,7 +787,7 @@ Window Client::verifyTransientFor( Window new_transient_for, bool defined ) Window root_return, parent_return; Window* wins = NULL; unsigned int nwins; - int r = XQueryTree(qt_xdisplay(), new_transient_for, &root_return, &parent_return, &wins, &nwins); + int r = XQueryTree(tqt_xdisplay(), new_transient_for, &root_return, &parent_return, &wins, &nwins); if ( wins ) XFree((void *) wins); if ( r == 0) @@ -828,7 +828,7 @@ Window Client::verifyTransientFor( Window new_transient_for, bool defined ) new_transient_for = workspace()->rootWin(); } if( new_property_value != original_transient_for_id ) - XSetTransientForHint( qt_xdisplay(), window(), new_property_value ); + XSetTransientForHint( tqt_xdisplay(), window(), new_property_value ); return new_transient_for; } diff --git a/twin/kcmtwin/twindecoration/preview.cpp b/twin/kcmtwin/twindecoration/preview.cpp index 573971f27..29d93a7f3 100644 --- a/twin/kcmtwin/twindecoration/preview.cpp +++ b/twin/kcmtwin/twindecoration/preview.cpp @@ -145,7 +145,7 @@ void KDecorationPreview::setPreviewMask( const TQRegion& reg, int mode, bool act // FRAME duped from client.cpp if( mode == Unsorted ) { - XShapeCombineRegion( qt_xdisplay(), widget->winId(), ShapeBounding, 0, 0, + XShapeCombineRegion( tqt_xdisplay(), widget->winId(), ShapeBounding, 0, 0, reg.handle(), ShapeSet ); } else @@ -161,7 +161,7 @@ void KDecorationPreview::setPreviewMask( const TQRegion& reg, int mode, bool act xrects[ i ].width = rects[ i ].width(); xrects[ i ].height = rects[ i ].height(); } - XShapeCombineRectangles( qt_xdisplay(), widget->winId(), ShapeBounding, 0, 0, + XShapeCombineRectangles( tqt_xdisplay(), widget->winId(), ShapeBounding, 0, 0, xrects, rects.count(), ShapeSet, mode ); delete[] xrects; } diff --git a/twin/kcmtwin/twinrules/detectwidget.cpp b/twin/kcmtwin/twinrules/detectwidget.cpp index d82836868..3eb6cf0aa 100644 --- a/twin/kcmtwin/twinrules/detectwidget.cpp +++ b/twin/kcmtwin/twinrules/detectwidget.cpp @@ -191,13 +191,13 @@ WId DetectDialog::findWindow() Window child; uint mask; int rootX, rootY, x, y; - Window parent = qt_xrootwin(); - Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False ); + Window parent = tqt_xrootwin(); + Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False ); for( int i = 0; i < 10; ++i ) { - XQueryPointer( qt_xdisplay(), parent, &root, &child, + XQueryPointer( tqt_xdisplay(), parent, &root, &child, &rootX, &rootY, &x, &y, &mask ); if( child == None ) return 0; @@ -205,7 +205,7 @@ WId DetectDialog::findWindow() int format; unsigned long nitems, after; unsigned char* prop; - if( XGetWindowProperty( qt_xdisplay(), child, wm_state, 0, 0, False, AnyPropertyType, + if( XGetWindowProperty( tqt_xdisplay(), child, wm_state, 0, 0, False, AnyPropertyType, &type, &format, &nitems, &after, &prop ) == Success ) { if( prop != NULL ) diff --git a/twin/killer/killer.cpp b/twin/killer/killer.cpp index ebd4fea90..43336d654 100644 --- a/twin/killer/killer.cpp +++ b/twin/killer/killer.cpp @@ -83,6 +83,6 @@ int main( int argc, char* argv[] ) } else ::kill( pid, SIGKILL ); - XKillClient( qt_xdisplay(), id ); + XKillClient( tqt_xdisplay(), id ); } } diff --git a/twin/killwindow.cpp b/twin/killwindow.cpp index 7dc6504f9..fb5486546 100644 --- a/twin/killwindow.cpp +++ b/twin/killwindow.cpp @@ -35,16 +35,16 @@ void KillWindow::start() { static Cursor kill_cursor = 0; if (!kill_cursor) - kill_cursor = XCreateFontCursor(qt_xdisplay(), XC_pirate); + kill_cursor = XCreateFontCursor(tqt_xdisplay(), XC_pirate); - if (XGrabPointer(qt_xdisplay(), qt_xrootwin(), False, + if (XGrabPointer(tqt_xdisplay(), tqt_xrootwin(), False, ButtonPressMask | ButtonReleaseMask | PointerMotionMask | EnterWindowMask | LeaveWindowMask, GrabModeAsync, GrabModeAsync, None, kill_cursor, CurrentTime) == GrabSuccess) { - XGrabKeyboard(qt_xdisplay(), qt_xrootwin(), False, + XGrabKeyboard(tqt_xdisplay(), tqt_xrootwin(), False, GrabModeAsync, GrabModeAsync, CurrentTime); XEvent ev; @@ -56,12 +56,12 @@ void KillWindow::start() while (!return_pressed && !escape_pressed && !button_released) { - XMaskEvent(qt_xdisplay(), KeyPressMask | ButtonPressMask | + XMaskEvent(tqt_xdisplay(), KeyPressMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask, &ev); if (ev.type == KeyPress) { - int kc = XKeycodeToKeysym(qt_xdisplay(), ev.xkey.keycode, 0); + int kc = XKeycodeToKeysym(tqt_xdisplay(), ev.xkey.keycode, 0); int mx = 0; int my = 0; return_pressed = (kc == XK_Return) || (kc == XK_space); @@ -96,7 +96,7 @@ void KillWindow::start() Window root, child; int dummy1, dummy2, dummy3, dummy4; unsigned int dummy5; - if( XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child, + if( XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child, &dummy1, &dummy2, &dummy3, &dummy4, &dummy5 ) == true && child != None ) workspace->killWindowId( child ); @@ -104,8 +104,8 @@ void KillWindow::start() ungrabXServer(); - XUngrabKeyboard(qt_xdisplay(), CurrentTime); - XUngrabPointer(qt_xdisplay(), CurrentTime); + XUngrabKeyboard(tqt_xdisplay(), CurrentTime); + XUngrabPointer(tqt_xdisplay(), CurrentTime); } } diff --git a/twin/layers.cpp b/twin/layers.cpp index 794d06636..143d826d5 100644 --- a/twin/layers.cpp +++ b/twin/layers.cpp @@ -211,10 +211,10 @@ void Workspace::propagateClients( bool propagate_new_clients ) assert( new_stack[ 0 ] = supportWindow->winId()); #endif #if 0 - XRestackWindows(qt_xdisplay(), new_stack, pos); + XRestackWindows(tqt_xdisplay(), new_stack, pos); delete [] new_stack; #endif - XRestackWindows(qt_xdisplay(), window_stack, pos); + XRestackWindows(tqt_xdisplay(), window_stack, pos); delete [] dock_shadow_stack; delete [] window_stack; diff --git a/twin/lib/kcommondecoration.cpp b/twin/lib/kcommondecoration.cpp index bd33e979f..95e297bc2 100644 --- a/twin/lib/kcommondecoration.cpp +++ b/twin/lib/kcommondecoration.cpp @@ -328,8 +328,8 @@ bool KCommonDecoration::isModalSystemNotification() int format, result; unsigned long n, left; Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(qt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); - result = XGetWindowProperty(qt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False); + result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data != None && format == 32 ) { return TRUE; diff --git a/twin/main.cpp b/twin/main.cpp index 5bb1be654..1e1ec114c 100644 --- a/twin/main.cpp +++ b/twin/main.cpp @@ -96,11 +96,11 @@ Application::Application( ) } if (screen_number == -1) - screen_number = DefaultScreen(qt_xdisplay()); + screen_number = DefaultScreen(tqt_xdisplay()); if( !owner.claim( args->isSet( "replace" ), true )) { - Display* dpy = qt_xdisplay(); + Display* dpy = tqt_xdisplay(); Window w; Atom a; static char net_wm_sm[] = "WM_Sxx"; @@ -156,7 +156,7 @@ Application::Application( ) XSetErrorHandler( x11ErrorHandler ); // check whether another windowmanager is running - XSelectInput(qt_xdisplay(), qt_xrootwin(), SubstructureRedirectMask ); + XSelectInput(tqt_xdisplay(), tqt_xrootwin(), SubstructureRedirectMask ); syncX(); // trigger error now options = new Options; @@ -164,8 +164,8 @@ Application::Application( ) // Signal that we are The KWin! Atom kde_wm_system_modal_notification; - kde_wm_system_modal_notification = XInternAtom(qt_xdisplay(), "_KDE_WM_IS_KWIN", False); - XChangeProperty(qt_xdisplay(), owner.ownerWindow(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); + kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_IS_KWIN", False); + XChangeProperty(tqt_xdisplay(), owner.ownerWindow(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); // create workspace. (void) new Workspace( isSessionRestored() ); @@ -180,12 +180,12 @@ Application::Application( ) dcopClient()->send( "ksplash", "", "upAndRunning(TQString)", TQString("wm started")); XEvent e; e.xclient.type = ClientMessage; - e.xclient.message_type = XInternAtom( qt_xdisplay(), "_KDE_SPLASH_PROGRESS", False ); - e.xclient.display = qt_xdisplay(); - e.xclient.window = qt_xrootwin(); + e.xclient.message_type = XInternAtom( tqt_xdisplay(), "_KDE_SPLASH_PROGRESS", False ); + e.xclient.display = tqt_xdisplay(); + e.xclient.window = tqt_xrootwin(); e.xclient.format = 8; strcpy( e.xclient.data.b, "wm started" ); - XSendEvent( qt_xdisplay(), qt_xrootwin(), False, SubstructureNotifyMask, &e ); + XSendEvent( tqt_xdisplay(), tqt_xrootwin(), False, SubstructureNotifyMask, &e ); } Application::~Application() @@ -193,7 +193,7 @@ Application::~Application() delete Workspace::self(); if( owner.ownerWindow() != None ) // if there was no --replace (no new WM) { - XSetInputFocus( qt_xdisplay(), PointerRoot, RevertToPointerRoot, GET_QT_X_TIME() ); + XSetInputFocus( tqt_xdisplay(), PointerRoot, RevertToPointerRoot, GET_QT_X_TIME() ); DCOPRef ref( "kded", "kded" ); if( !ref.send( "loadModule", TQCString( "kdetrayproxy" ))) kdWarning( 176 ) << "Loading of kdetrayproxy failed." << endl; @@ -205,7 +205,7 @@ void Application::lostSelection() { delete Workspace::self(); // remove windowmanager privileges - XSelectInput(qt_xdisplay(), qt_xrootwin(), PropertyChangeMask ); + XSelectInput(tqt_xdisplay(), tqt_xrootwin(), PropertyChangeMask ); DCOPRef ref( "kded", "kded" ); if( !ref.send( "loadModule", TQCString( "kdetrayproxy" ))) kdWarning( 176 ) << "Loading of kdetrayproxy failed." << endl; @@ -332,7 +332,7 @@ KDE_EXPORT int kdemain( int argc, char * argv[] ) KWinInternal::SessionManaged weAreIndeed; KWinInternal::SessionSaveDoneHelper helper; - fcntl(ConnectionNumber(qt_xdisplay()), F_SETFD, 1); + fcntl(ConnectionNumber(tqt_xdisplay()), F_SETFD, 1); TQCString appname; if (KWinInternal::screen_number == 0) diff --git a/twin/manage.cpp b/twin/manage.cpp index acf1ce598..d6127e4e0 100644 --- a/twin/manage.cpp +++ b/twin/manage.cpp @@ -36,7 +36,7 @@ namespace KWinInternal bool Client::manage( Window w, bool isMapped ) { XWindowAttributes attr; - if( !XGetWindowAttributes(qt_xdisplay(), w, &attr)) + if( !XGetWindowAttributes(tqt_xdisplay(), w, &attr)) return false; grabXServer(); @@ -50,7 +50,7 @@ bool Client::manage( Window w, bool isMapped ) // SELI order all these things in some sane manner bool init_minimize = false; - XWMHints * hints = XGetWMHints(qt_xdisplay(), w ); + XWMHints * hints = XGetWMHints(tqt_xdisplay(), w ); if (hints && (hints->flags & StateHint) && hints->initial_state == IconicState) init_minimize = true; if (hints) @@ -76,12 +76,12 @@ bool Client::manage( Window w, bool isMapped ) NET::WM2ExtendedStrut | 0; - info = new WinInfo( this, qt_xdisplay(), client, qt_xrootwin(), properties, 2 ); + info = new WinInfo( this, tqt_xdisplay(), client, tqt_xrootwin(), properties, 2 ); cmap = attr.colormap; XClassHint classHint; - if ( XGetClassHint( qt_xdisplay(), client, &classHint ) ) + if ( XGetClassHint( tqt_xdisplay(), client, &classHint ) ) { // Qt3.2 and older had this all lowercase, Qt3.3 capitalized resource class // force lowercase, so that workarounds listing resource classes still work @@ -318,7 +318,7 @@ bool Client::manage( Window w, bool isMapped ) if(( !isSpecialWindow() || isToolbar()) && isMovable()) keepInArea( area, partial_keep_in_area ); - XShapeSelectInput( qt_xdisplay(), window(), ShapeNotifyMask ); + XShapeSelectInput( tqt_xdisplay(), window(), ShapeNotifyMask ); is_shape = Shape::hasShape( window()); updateShape(); @@ -444,7 +444,7 @@ bool Client::manage( Window w, bool isMapped ) // TODO this should avoid flicker, because real restacking is done // only after manage() finishes, but the window is shown sooner // - keep it? - XLowerWindow( qt_xdisplay(), frameId()); + XLowerWindow( tqt_xdisplay(), frameId()); // set initial user time directly user_time = readUserTimeMapTimestamp( asn_valid ? &asn_id : NULL, asn_valid ? &asn_data : NULL, session ); @@ -558,30 +558,30 @@ void Client::embedClient( Window w, const XWindowAttributes &attr ) assert( wrapper == None ); client = w; // we don't want the window to be destroyed when we are destroyed - XAddToSaveSet( qt_xdisplay(), client ); - XSelectInput( qt_xdisplay(), client, NoEventMask ); - XUnmapWindow( qt_xdisplay(), client ); + XAddToSaveSet( tqt_xdisplay(), client ); + XSelectInput( tqt_xdisplay(), client, NoEventMask ); + XUnmapWindow( tqt_xdisplay(), client ); XWindowChanges wc; // set the border width to 0 wc.border_width = 0; // TODO possibly save this, and also use it for initial configuring of the window - XConfigureWindow( qt_xdisplay(), client, CWBorderWidth, &wc ); + XConfigureWindow( tqt_xdisplay(), client, CWBorderWidth, &wc ); XSetWindowAttributes swa; swa.colormap = attr.colormap; swa.background_pixmap = None; swa.border_pixel = 0; - frame = XCreateWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0, + frame = XCreateWindow( tqt_xdisplay(), tqt_xrootwin(), 0, 0, 1, 1, 0, attr.depth, InputOutput, attr.visual, CWColormap | CWBackPixmap | CWBorderPixel, &swa ); - wrapper = XCreateWindow( qt_xdisplay(), frame, 0, 0, 1, 1, 0, + wrapper = XCreateWindow( tqt_xdisplay(), frame, 0, 0, 1, 1, 0, attr.depth, InputOutput, attr.visual, CWColormap | CWBackPixmap | CWBorderPixel, &swa ); - XDefineCursor( qt_xdisplay(), frame, tqarrowCursor.handle()); + XDefineCursor( tqt_xdisplay(), frame, tqarrowCursor.handle()); // some apps are stupid and don't define their own cursor - set the arrow one for them - XDefineCursor( qt_xdisplay(), wrapper, tqarrowCursor.handle()); - XReparentWindow( qt_xdisplay(), client, wrapper, 0, 0 ); - XSelectInput( qt_xdisplay(), frame, + XDefineCursor( tqt_xdisplay(), wrapper, tqarrowCursor.handle()); + XReparentWindow( tqt_xdisplay(), client, wrapper, 0, 0 ); + XSelectInput( tqt_xdisplay(), frame, KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | KeymapStateMask | @@ -592,8 +592,8 @@ void Client::embedClient( Window w, const XWindowAttributes &attr ) ExposureMask | PropertyChangeMask | StructureNotifyMask | SubstructureRedirectMask ); - XSelectInput( qt_xdisplay(), wrapper, ClientWinMask | SubstructureNotifyMask ); - XSelectInput( qt_xdisplay(), client, + XSelectInput( tqt_xdisplay(), wrapper, ClientWinMask | SubstructureNotifyMask ); + XSelectInput( tqt_xdisplay(), client, FocusChangeMask | PropertyChangeMask | ColormapChangeMask | diff --git a/twin/popupinfo.cpp b/twin/popupinfo.cpp index a2760d336..5f75adfbc 100644 --- a/twin/popupinfo.cpp +++ b/twin/popupinfo.cpp @@ -109,7 +109,7 @@ void PopupInfo::hide() TQWidget::hide(); TQApplication::syncX(); XEvent otherEvent; - while (XCheckTypedEvent (qt_xdisplay(), EnterNotify, &otherEvent ) ) + while (XCheckTypedEvent (tqt_xdisplay(), EnterNotify, &otherEvent ) ) ; m_shown = false; } diff --git a/twin/tabbox.cpp b/twin/tabbox.cpp index 943ba6dc6..284a920bc 100644 --- a/twin/tabbox.cpp +++ b/twin/tabbox.cpp @@ -57,22 +57,22 @@ TabBox::TabBox( Workspace *ws, const char *name ) XSetWindowAttributes attr; attr.override_redirect = 1; - outline_left = XCreateWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0, + outline_left = XCreateWindow( tqt_xdisplay(), tqt_xrootwin(), 0, 0, 1, 1, 0, CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect, &attr ); - outline_right = XCreateWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0, + outline_right = XCreateWindow( tqt_xdisplay(), tqt_xrootwin(), 0, 0, 1, 1, 0, CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect, &attr ); - outline_top = XCreateWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0, + outline_top = XCreateWindow( tqt_xdisplay(), tqt_xrootwin(), 0, 0, 1, 1, 0, CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect, &attr ); - outline_bottom = XCreateWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0, + outline_bottom = XCreateWindow( tqt_xdisplay(), tqt_xrootwin(), 0, 0, 1, 1, 0, CopyFromParent, CopyFromParent, CopyFromParent, CWOverrideRedirect, &attr ); } TabBox::~TabBox() { - XDestroyWindow( qt_xdisplay(), outline_left ); - XDestroyWindow( qt_xdisplay(), outline_right ); - XDestroyWindow( qt_xdisplay(), outline_top ); - XDestroyWindow( qt_xdisplay(), outline_bottom ); + XDestroyWindow( tqt_xdisplay(), outline_left ); + XDestroyWindow( tqt_xdisplay(), outline_right ); + XDestroyWindow( tqt_xdisplay(), outline_top ); + XDestroyWindow( tqt_xdisplay(), outline_bottom ); } @@ -344,10 +344,10 @@ int TabBox::currentDesktop() void TabBox::showEvent( TQShowEvent* ) { updateOutline(); - XRaiseWindow( qt_xdisplay(), outline_left ); - XRaiseWindow( qt_xdisplay(), outline_right ); - XRaiseWindow( qt_xdisplay(), outline_top ); - XRaiseWindow( qt_xdisplay(), outline_bottom ); + XRaiseWindow( tqt_xdisplay(), outline_left ); + XRaiseWindow( tqt_xdisplay(), outline_right ); + XRaiseWindow( tqt_xdisplay(), outline_top ); + XRaiseWindow( tqt_xdisplay(), outline_bottom ); raise(); } @@ -357,10 +357,10 @@ void TabBox::showEvent( TQShowEvent* ) */ void TabBox::hideEvent( TQHideEvent* ) { - XUnmapWindow( qt_xdisplay(), outline_left ); - XUnmapWindow( qt_xdisplay(), outline_right ); - XUnmapWindow( qt_xdisplay(), outline_top ); - XUnmapWindow( qt_xdisplay(), outline_bottom ); + XUnmapWindow( tqt_xdisplay(), outline_left ); + XUnmapWindow( tqt_xdisplay(), outline_right ); + XUnmapWindow( tqt_xdisplay(), outline_top ); + XUnmapWindow( tqt_xdisplay(), outline_bottom ); } /*! @@ -557,17 +557,17 @@ void TabBox::updateOutline() Client* c = currentClient(); if( !options->tabboxOutline || c == NULL || this->isHidden() || !c->isShown( true ) || !c->isOnCurrentDesktop()) { - XUnmapWindow( qt_xdisplay(), outline_left ); - XUnmapWindow( qt_xdisplay(), outline_right ); - XUnmapWindow( qt_xdisplay(), outline_top ); - XUnmapWindow( qt_xdisplay(), outline_bottom ); + XUnmapWindow( tqt_xdisplay(), outline_left ); + XUnmapWindow( tqt_xdisplay(), outline_right ); + XUnmapWindow( tqt_xdisplay(), outline_top ); + XUnmapWindow( tqt_xdisplay(), outline_bottom ); return; } // left/right parts are between top/bottom, they don't reach as far as the corners - XMoveResizeWindow( qt_xdisplay(), outline_left, c->x(), c->y() + 5, 5, c->height() - 10 ); - XMoveResizeWindow( qt_xdisplay(), outline_right, c->x() + c->width() - 5, c->y() + 5, 5, c->height() - 10 ); - XMoveResizeWindow( qt_xdisplay(), outline_top, c->x(), c->y(), c->width(), 5 ); - XMoveResizeWindow( qt_xdisplay(), outline_bottom, c->x(), c->y() + c->height() - 5, c->width(), 5 ); + XMoveResizeWindow( tqt_xdisplay(), outline_left, c->x(), c->y() + 5, 5, c->height() - 10 ); + XMoveResizeWindow( tqt_xdisplay(), outline_right, c->x() + c->width() - 5, c->y() + 5, 5, c->height() - 10 ); + XMoveResizeWindow( tqt_xdisplay(), outline_top, c->x(), c->y(), c->width(), 5 ); + XMoveResizeWindow( tqt_xdisplay(), outline_bottom, c->x(), c->y() + c->height() - 5, c->width(), 5 ); { TQPixmap pix( 5, c->height() - 10 ); TQPainter p( &pix ); @@ -580,8 +580,8 @@ void TabBox::updateOutline() p.setPen( black ); p.drawLine( 2, 0, 2, pix.height() - 1 ); p.end(); - XSetWindowBackgroundPixmap( qt_xdisplay(), outline_left, pix.handle()); - XSetWindowBackgroundPixmap( qt_xdisplay(), outline_right, pix.handle()); + XSetWindowBackgroundPixmap( tqt_xdisplay(), outline_left, pix.handle()); + XSetWindowBackgroundPixmap( tqt_xdisplay(), outline_right, pix.handle()); } { TQPixmap pix( c->width(), 5 ); @@ -603,7 +603,7 @@ void TabBox::updateOutline() p.drawLine( 2, 2, 2, 4 ); p.drawLine( pix.width() - 1 - 2, 2, pix.width() - 1 - 2, 4 ); p.end(); - XSetWindowBackgroundPixmap( qt_xdisplay(), outline_top, pix.handle()); + XSetWindowBackgroundPixmap( tqt_xdisplay(), outline_top, pix.handle()); } { TQPixmap pix( c->width(), 5 ); @@ -625,16 +625,16 @@ void TabBox::updateOutline() p.drawLine( 2, 0, 2, 2 ); p.drawLine( pix.width() - 1 - 2, 0, pix.width() - 1 - 2, 2 ); p.end(); - XSetWindowBackgroundPixmap( qt_xdisplay(), outline_bottom, pix.handle()); + XSetWindowBackgroundPixmap( tqt_xdisplay(), outline_bottom, pix.handle()); } - XClearWindow( qt_xdisplay(), outline_left ); - XClearWindow( qt_xdisplay(), outline_right ); - XClearWindow( qt_xdisplay(), outline_top ); - XClearWindow( qt_xdisplay(), outline_bottom ); - XMapWindow( qt_xdisplay(), outline_left ); - XMapWindow( qt_xdisplay(), outline_right ); - XMapWindow( qt_xdisplay(), outline_top ); - XMapWindow( qt_xdisplay(), outline_bottom ); + XClearWindow( tqt_xdisplay(), outline_left ); + XClearWindow( tqt_xdisplay(), outline_right ); + XClearWindow( tqt_xdisplay(), outline_top ); + XClearWindow( tqt_xdisplay(), outline_bottom ); + XMapWindow( tqt_xdisplay(), outline_left ); + XMapWindow( tqt_xdisplay(), outline_right ); + XMapWindow( tqt_xdisplay(), outline_top ); + XMapWindow( tqt_xdisplay(), outline_bottom ); } void TabBox::hide() @@ -643,7 +643,7 @@ void TabBox::hide() TQWidget::hide(); TQApplication::syncX(); XEvent otherEvent; - while (XCheckTypedEvent (qt_xdisplay(), EnterNotify, &otherEvent ) ) + while (XCheckTypedEvent (tqt_xdisplay(), EnterNotify, &otherEvent ) ) ; } @@ -692,7 +692,7 @@ void TabBox::delayedShow() void TabBox::handleMouseEvent( XEvent* e ) { - XAllowEvents( qt_xdisplay(), AsyncPointer, GET_QT_X_TIME() ); + XAllowEvents( tqt_xdisplay(), AsyncPointer, GET_QT_X_TIME() ); if( e->type != ButtonPress ) return; TQPoint pos( e->xbutton.x_root, e->xbutton.y_root ); @@ -757,12 +757,12 @@ bool areKeySymXsDepressed( bool bAll, const uint keySyms[], int nKeySyms ) kdDebug(125) << "areKeySymXsDepressed: " << (bAll ? "all of " : "any of ") << nKeySyms << endl; - XQueryKeymap( qt_xdisplay(), keymap ); + XQueryKeymap( tqt_xdisplay(), keymap ); for( int iKeySym = 0; iKeySym < nKeySyms; iKeySym++ ) { uint keySymX = keySyms[ iKeySym ]; - uchar keyCodeX = XKeysymToKeycode( qt_xdisplay(), keySymX ); + uchar keyCodeX = XKeysymToKeycode( tqt_xdisplay(), keySymX ); int i = keyCodeX / 8; char mask = 1 << (keyCodeX - (i * 8)); @@ -844,13 +844,13 @@ static bool areModKeysDepressed( const KShortcut& cut ) void Workspace::slotWalkThroughWindows() { - if ( root != qt_xrootwin() ) + if ( root != tqt_xrootwin() ) return; if ( tab_grab || control_grab ) return; if ( options->altTabStyle == Options::CDE || !options->focusPolicyIsReasonable()) { - //XUngrabKeyboard(qt_xdisplay(), GET_QT_X_TIME()); // need that because of accelerator raw mode + //XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME()); // need that because of accelerator raw mode // CDE style raise / lower CDEWalkThroughWindows( true ); } @@ -870,7 +870,7 @@ void Workspace::slotWalkThroughWindows() void Workspace::slotWalkBackThroughWindows() { - if ( root != qt_xrootwin() ) + if ( root != tqt_xrootwin() ) return; if( tab_grab || control_grab ) return; @@ -895,7 +895,7 @@ void Workspace::slotWalkBackThroughWindows() void Workspace::slotWalkThroughDesktops() { - if ( root != qt_xrootwin() ) + if ( root != tqt_xrootwin() ) return; if( tab_grab || control_grab ) return; @@ -912,7 +912,7 @@ void Workspace::slotWalkThroughDesktops() void Workspace::slotWalkBackThroughDesktops() { - if ( root != qt_xrootwin() ) + if ( root != tqt_xrootwin() ) return; if( tab_grab || control_grab ) return; @@ -929,7 +929,7 @@ void Workspace::slotWalkBackThroughDesktops() void Workspace::slotWalkThroughDesktopList() { - if ( root != qt_xrootwin() ) + if ( root != tqt_xrootwin() ) return; if( tab_grab || control_grab ) return; @@ -946,7 +946,7 @@ void Workspace::slotWalkThroughDesktopList() void Workspace::slotWalkBackThroughDesktopList() { - if ( root != qt_xrootwin() ) + if ( root != tqt_xrootwin() ) return; if( tab_grab || control_grab ) return; @@ -1185,7 +1185,7 @@ void Workspace::tabBoxKeyRelease( const XKeyEvent& ev ) release = true; else { - XModifierKeymap* xmk = XGetModifierMapping(qt_xdisplay()); + XModifierKeymap* xmk = XGetModifierMapping(tqt_xdisplay()); for (int i=0; i<xmk->max_keypermod; i++) if (xmk->modifiermap[xmk->max_keypermod * mod_index + i] == ev.keycode) @@ -1316,7 +1316,7 @@ Client* Workspace::previousStaticClient( Client* c ) const bool Workspace::establishTabBoxGrab() { - if( XGrabKeyboard( qt_xdisplay(), root, FALSE, + if( XGrabKeyboard( tqt_xdisplay(), root, FALSE, GrabModeAsync, GrabModeAsync, GET_QT_X_TIME()) != GrabSuccess ) return false; // Don't try to establish a global mouse grab using XGrabPointer, as that would prevent @@ -1333,7 +1333,7 @@ bool Workspace::establishTabBoxGrab() void Workspace::removeTabBoxGrab() { - XUngrabKeyboard(qt_xdisplay(), GET_QT_X_TIME()); + XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME()); assert( forced_global_mouse_grab ); forced_global_mouse_grab = false; if( active_client != NULL ) diff --git a/twin/tools/decobenchmark/preview.cpp b/twin/tools/decobenchmark/preview.cpp index 8154612ec..2accb7644 100644 --- a/twin/tools/decobenchmark/preview.cpp +++ b/twin/tools/decobenchmark/preview.cpp @@ -140,7 +140,7 @@ void KDecorationPreview::setPreviewMask( const TQRegion& reg, int mode ) // FRAME duped from client.cpp if( mode == Unsorted ) { - XShapeCombineRegion( qt_xdisplay(), widget->winId(), ShapeBounding, 0, 0, + XShapeCombineRegion( tqt_xdisplay(), widget->winId(), ShapeBounding, 0, 0, reg.handle(), ShapeSet ); } else @@ -156,7 +156,7 @@ void KDecorationPreview::setPreviewMask( const TQRegion& reg, int mode ) xrects[ i ].width = rects[ i ].width(); xrects[ i ].height = rects[ i ].height(); } - XShapeCombineRectangles( qt_xdisplay(), widget->winId(), ShapeBounding, 0, 0, + XShapeCombineRectangles( tqt_xdisplay(), widget->winId(), ShapeBounding, 0, 0, xrects, rects.count(), ShapeSet, mode ); delete[] xrects; } diff --git a/twin/utils.cpp b/twin/utils.cpp index d476c8932..93d14080e 100644 --- a/twin/utils.cpp +++ b/twin/utils.cpp @@ -58,7 +58,7 @@ bool Shape::hasShape( WId w) int boundingShaped = 0, clipShaped = 0; if (!available()) return FALSE; - XShapeQueryExtents(qt_xdisplay(), w, + XShapeQueryExtents(tqt_xdisplay(), w, &boundingShaped, &xws, &yws, &wws, &hws, &clipShaped, &xbs, &ybs, &wbs, &hbs); return boundingShaped != 0; @@ -73,10 +73,10 @@ void Shape::init() { twin_shape_version = 0; int dummy; - if( !XShapeQueryExtension(qt_xdisplay(), &twin_shape_event, &dummy)) + if( !XShapeQueryExtension(tqt_xdisplay(), &twin_shape_event, &dummy)) return; int major, minor; - if( !XShapeQueryVersion( qt_xdisplay(), &major, &minor )) + if( !XShapeQueryVersion( tqt_xdisplay(), &major, &minor )) return; twin_shape_version = major * 0x10 + minor; } @@ -89,7 +89,7 @@ void Motif::readFlags( WId w, bool& noborder, bool& resize, bool& move, unsigned long length, after; unsigned char* data; MwmHints* hints = 0; - if ( XGetWindowProperty( qt_xdisplay(), w, atoms->motif_wm_hints, 0, 5, + if ( XGetWindowProperty( tqt_xdisplay(), w, atoms->motif_wm_hints, 0, 5, FALSE, atoms->motif_wm_hints, &type, &format, &length, &after, &data ) == Success ) { @@ -142,10 +142,10 @@ KWinSelectionOwner::KWinSelectionOwner( int screen_P ) Atom KWinSelectionOwner::make_selection_atom( int screen_P ) { if( screen_P < 0 ) - screen_P = DefaultScreen( qt_xdisplay()); + screen_P = DefaultScreen( tqt_xdisplay()); char tmp[ 30 ]; sprintf( tmp, "WM_S%d", screen_P ); - return XInternAtom( qt_xdisplay(), tmp, False ); + return XInternAtom( tqt_xdisplay(), tmp, False ); } void KWinSelectionOwner::getAtoms() @@ -156,7 +156,7 @@ void KWinSelectionOwner::getAtoms() Atom atoms[ 1 ]; const char* const names[] = { "VERSION" }; - XInternAtoms( qt_xdisplay(), const_cast< char** >( names ), 1, False, atoms ); + XInternAtoms( tqt_xdisplay(), const_cast< char** >( names ), 1, False, atoms ); xa_version = atoms[ 0 ]; } } @@ -166,7 +166,7 @@ void KWinSelectionOwner::replyTargets( Atom property_P, Window requestor_P ) KSelectionOwner::replyTargets( property_P, requestor_P ); Atom atoms[ 1 ] = { xa_version }; // PropModeAppend ! - XChangeProperty( qt_xdisplay(), requestor_P, property_P, XA_ATOM, 32, PropModeAppend, + XChangeProperty( tqt_xdisplay(), requestor_P, property_P, XA_ATOM, 32, PropModeAppend, reinterpret_cast< unsigned char* >( atoms ), 1 ); } @@ -175,7 +175,7 @@ bool KWinSelectionOwner::genericReply( Atom target_P, Atom property_P, Window re if( target_P == xa_version ) { long version[] = { 2, 0 }; - XChangeProperty( qt_xdisplay(), requestor_P, property_P, XA_INTEGER, 32, + XChangeProperty( tqt_xdisplay(), requestor_P, property_P, XA_INTEGER, 32, PropModeReplace, reinterpret_cast< unsigned char* >( &version ), 2 ); } else @@ -195,7 +195,7 @@ TQCString getStringProperty(WId w, Atom prop, char separator) unsigned char *data = 0; TQCString result = ""; KXErrorHandler handler; // ignore errors - status = XGetWindowProperty( qt_xdisplay(), w, prop, 0, 10000, + status = XGetWindowProperty( tqt_xdisplay(), w, prop, 0, 10000, FALSE, XA_STRING, &type, &format, &nitems, &extra, &data ); if ( status == Success) @@ -250,8 +250,8 @@ static Bool update_x_time_predicate( Display*, XEvent* event, XPointer ) } /* - Updates qt_x_time. This used to simply fetch current timestamp from the server, - but that can cause qt_x_time to be newer than timestamp of events that are + Updates tqt_x_time. This used to simply fetch current timestamp from the server, + but that can cause tqt_x_time to be newer than timestamp of events that are still in our events queue, thus e.g. making XSetInputFocus() caused by such event to be ignored. Therefore events queue is searched for first event with timestamp, and extra PropertyNotify is generated in order to make @@ -263,20 +263,20 @@ void updateXTime() if ( !w ) w = new TQWidget; long data = 1; - XChangeProperty(qt_xdisplay(), w->winId(), atoms->twin_running, atoms->twin_running, 32, + XChangeProperty(tqt_xdisplay(), w->winId(), atoms->twin_running, atoms->twin_running, 32, PropModeAppend, (unsigned char*) &data, 1); next_x_time = CurrentTime; XEvent dummy; - XCheckIfEvent( qt_xdisplay(), &dummy, update_x_time_predicate, NULL ); + XCheckIfEvent( tqt_xdisplay(), &dummy, update_x_time_predicate, NULL ); if( next_x_time == CurrentTime ) { - XSync( qt_xdisplay(), False ); - XCheckIfEvent( qt_xdisplay(), &dummy, update_x_time_predicate, NULL ); + XSync( tqt_xdisplay(), False ); + XCheckIfEvent( tqt_xdisplay(), &dummy, update_x_time_predicate, NULL ); } assert( next_x_time != CurrentTime ); SET_QT_X_TIME(next_x_time); XEvent ev; // remove the PropertyNotify event from the events queue - XWindowEvent( qt_xdisplay(), w->winId(), PropertyChangeMask, &ev ); + XWindowEvent( tqt_xdisplay(), w->winId(), PropertyChangeMask, &ev ); } static int server_grab_count = 0; @@ -284,7 +284,7 @@ static int server_grab_count = 0; void grabXServer() { if( ++server_grab_count == 1 ) - XGrabServer( qt_xdisplay()); + XGrabServer( tqt_xdisplay()); } void ungrabXServer() @@ -292,8 +292,8 @@ void ungrabXServer() assert( server_grab_count > 0 ); if( --server_grab_count == 0 ) { - XUngrabServer( qt_xdisplay()); - XFlush( qt_xdisplay()); + XUngrabServer( tqt_xdisplay()); + XFlush( tqt_xdisplay()); Notify::sendPendingEvents(); } } @@ -334,7 +334,7 @@ ShortcutDialog::ShortcutDialog( const KShortcut& cut ) // make it a popup, so that it has the grab XSetWindowAttributes attrs; attrs.override_redirect = True; - XChangeWindowAttributes( qt_xdisplay(), winId(), CWOverrideRedirect, &attrs ); + XChangeWindowAttributes( tqt_xdisplay(), winId(), CWOverrideRedirect, &attrs ); setWFlags( WType_Popup ); } diff --git a/twin/workspace.cpp b/twin/workspace.cpp index b46697d99..fb59002f8 100644 --- a/twin/workspace.cpp +++ b/twin/workspace.cpp @@ -63,9 +63,9 @@ bool supportsCompMgr() { int i; - bool damageExt = XQueryExtension(qt_xdisplay(), "DAMAGE", &i, &i, &i); - bool compositeExt = XQueryExtension(qt_xdisplay(), "Composite", &i, &i, &i); - bool xfixesExt = XQueryExtension(qt_xdisplay(), "XFIXES", &i, &i, &i); + bool damageExt = XQueryExtension(tqt_xdisplay(), "DAMAGE", &i, &i, &i); + bool compositeExt = XQueryExtension(tqt_xdisplay(), "Composite", &i, &i, &i); + bool xfixesExt = XQueryExtension(tqt_xdisplay(), "XFIXES", &i, &i, &i); return damageExt && compositeExt && xfixesExt; } @@ -140,8 +140,8 @@ Workspace::Workspace( bool restore ) { _self = this; mgr = new PluginMgr; - root = qt_xrootwin(); - default_colormap = DefaultColormap(qt_xdisplay(), qt_xscreen() ); + root = tqt_xrootwin(); + default_colormap = DefaultColormap(tqt_xdisplay(), tqt_xscreen() ); installed_colormap = default_colormap; session.setAutoDelete( TRUE ); @@ -176,7 +176,7 @@ Workspace::Workspace( bool restore ) KStartupInfo::DisableKWinModule | KStartupInfo::AnnounceSilenceChanges, this ); // select windowmanager privileges - XSelectInput(qt_xdisplay(), root, + XSelectInput(tqt_xdisplay(), root, KeyPressMask | PropertyChangeMask | ColormapChangeMask | @@ -191,8 +191,8 @@ Workspace::Workspace( bool restore ) long data = 1; XChangeProperty( - qt_xdisplay(), - qt_xrootwin(), + tqt_xdisplay(), + tqt_xrootwin(), atoms->twin_running, atoms->twin_running, 32, @@ -286,13 +286,13 @@ void Workspace::init() // maximizedWindowCounter = 0; supportWindow = new TQWidget; - XLowerWindow( qt_xdisplay(), supportWindow->winId()); // see usage in layers.cpp + XLowerWindow( tqt_xdisplay(), supportWindow->winId()); // see usage in layers.cpp XSetWindowAttributes attr; attr.override_redirect = 1; - null_focus_window = XCreateWindow( qt_xdisplay(), qt_xrootwin(), -1,-1, 1, 1, 0, CopyFromParent, + null_focus_window = XCreateWindow( tqt_xdisplay(), tqt_xrootwin(), -1,-1, 1, 1, 0, CopyFromParent, InputOnly, CopyFromParent, CWOverrideRedirect, &attr ); - XMapWindow(qt_xdisplay(), null_focus_window); + XMapWindow(tqt_xdisplay(), null_focus_window); unsigned long protocols[ 5 ] = { @@ -375,13 +375,13 @@ void Workspace::init() , }; - rootInfo = new RootInfo( this, qt_xdisplay(), supportWindow->winId(), "KWin", - protocols, 5, qt_xscreen() ); + rootInfo = new RootInfo( this, tqt_xdisplay(), supportWindow->winId(), "KWin", + protocols, 5, tqt_xscreen() ); loadDesktopSettings(); updateDesktopLayout(); // extra NETRootInfo instance in Client mode is needed to get the values of the properties - NETRootInfo client_info( qt_xdisplay(), NET::ActiveWindow | NET::CurrentDesktop ); + NETRootInfo client_info( tqt_xdisplay(), NET::ActiveWindow | NET::CurrentDesktop ); int initial_desktop; if( !kapp->isSessionRestored()) initial_desktop = client_info.currentDesktop(); @@ -413,8 +413,8 @@ void Workspace::init() ++block_focus; // because it will be set below char nm[ 100 ]; - sprintf( nm, "_KDE_TOPMENU_OWNER_S%d", DefaultScreen( qt_xdisplay())); - Atom topmenu_atom = XInternAtom( qt_xdisplay(), nm, False ); + sprintf( nm, "_KDE_TOPMENU_OWNER_S%d", DefaultScreen( tqt_xdisplay())); + Atom topmenu_atom = XInternAtom( tqt_xdisplay(), nm, False ); topmenu_selection = new KSelectionOwner( topmenu_atom ); topmenu_watcher = new KSelectionWatcher( topmenu_atom ); // TODO grabXServer(); - where exactly put this? topmenu selection claiming down belong must be before @@ -429,11 +429,11 @@ void Workspace::init() unsigned int i, nwins; Window root_return, parent_return, *wins; - XQueryTree(qt_xdisplay(), root, &root_return, &parent_return, &wins, &nwins); + XQueryTree(tqt_xdisplay(), root, &root_return, &parent_return, &wins, &nwins); for (i = 0; i < nwins; i++) { XWindowAttributes attr; - XGetWindowAttributes(qt_xdisplay(), wins[i], &attr); + XGetWindowAttributes(tqt_xdisplay(), wins[i], &attr); if (attr.override_redirect ) continue; if( topmenu_space && topmenu_space->winId() == wins[ i ] ) @@ -443,10 +443,10 @@ void Workspace::init() if ( addSystemTrayWin( wins[i] ) ) continue; Client* c = createClient( wins[i], true ); - if ( c != NULL && root != qt_xrootwin() ) + if ( c != NULL && root != tqt_xrootwin() ) { // TODO what is this? // TODO may use TQWidget:.create - XReparentWindow( qt_xdisplay(), c->frameId(), root, 0, 0 ); + XReparentWindow( tqt_xdisplay(), c->frameId(), root, 0, 0 ); c->move(0,0); } } @@ -518,8 +518,8 @@ Workspace::~Workspace() delete tab_box; delete popupinfo; delete popup; - if ( root == qt_xrootwin() ) - XDeleteProperty(qt_xdisplay(), qt_xrootwin(), atoms->twin_running); + if ( root == tqt_xrootwin() ) + XDeleteProperty(tqt_xdisplay(), tqt_xrootwin(), atoms->twin_running); writeWindowRules(); KGlobal::config()->sync(); @@ -540,7 +540,7 @@ Workspace::~Workspace() delete rules.front(); rules.pop_front(); } - XDestroyWindow( qt_xdisplay(), null_focus_window ); + XDestroyWindow( tqt_xdisplay(), null_focus_window ); // TODO ungrabXServer(); _self = 0; } @@ -984,7 +984,7 @@ void Workspace::updateColormap() cmap = activeClient()->colormap(); if ( cmap != installed_colormap ) { - XInstallColormap(qt_xdisplay(), cmap ); + XInstallColormap(tqt_xdisplay(), cmap ); installed_colormap = cmap; } } @@ -1301,14 +1301,14 @@ void ObscuringWindows::create( Client* c ) XSetWindowAttributes a; a.background_pixmap = None; a.override_redirect = True; - obs_win = XCreateWindow( qt_xdisplay(), qt_xrootwin(), c->x(), c->y(), + obs_win = XCreateWindow( tqt_xdisplay(), tqt_xrootwin(), c->x(), c->y(), c->width(), c->height(), 0, CopyFromParent, InputOutput, CopyFromParent, CWBackPixmap | CWOverrideRedirect, &a ); } chngs.sibling = c->frameId(); chngs.stack_mode = Below; - XConfigureWindow( qt_xdisplay(), obs_win, mask, &chngs ); - XMapWindow( qt_xdisplay(), obs_win ); + XConfigureWindow( tqt_xdisplay(), obs_win, mask, &chngs ); + XMapWindow( tqt_xdisplay(), obs_win ); obscuring_windows.append( obs_win ); } @@ -1319,11 +1319,11 @@ ObscuringWindows::~ObscuringWindows() it != obscuring_windows.end(); ++it ) { - XUnmapWindow( qt_xdisplay(), *it ); + XUnmapWindow( tqt_xdisplay(), *it ); if( cached->count() < max_cache_size ) cached->prepend( *it ); else - XDestroyWindow( qt_xdisplay(), *it ); + XDestroyWindow( tqt_xdisplay(), *it ); } } @@ -1386,7 +1386,7 @@ bool Workspace::setCurrentDesktop( int new_desktop ) if (desktopHasCompositing) { // If composition is in use then we cannot hide the old windows before showing the new ones, // unless you happen to like the "flicker annoyingly to desktop" effect... :-P - XSync( qt_xdisplay(), false); // Make absolutely certain all new windows are shown before hiding the old ones + XSync( tqt_xdisplay(), false); // Make absolutely certain all new windows are shown before hiding the old ones for ( ClientList::ConstIterator it = stacking_order.begin(); it != stacking_order.end(); ++it) { if ( !(*it)->isOnDesktop( new_desktop ) && (*it) != movingClient ) { @@ -1812,15 +1812,15 @@ bool Workspace::addSystemTrayWin( WId w ) if ( systemTrayWins.contains( w ) ) return TRUE; - NETWinInfo ni( qt_xdisplay(), w, root, NET::WMKDESystemTrayWinFor ); + NETWinInfo ni( tqt_xdisplay(), w, root, NET::WMKDESystemTrayWinFor ); WId trayWinFor = ni.kdeSystemTrayWinFor(); if ( !trayWinFor ) return FALSE; systemTrayWins.append( SystemTrayWindow( w, trayWinFor ) ); - XSelectInput( qt_xdisplay(), w, + XSelectInput( tqt_xdisplay(), w, StructureNotifyMask ); - XAddToSaveSet( qt_xdisplay(), w ); + XAddToSaveSet( tqt_xdisplay(), w ); propagateSystemTrayWins(); return TRUE; } @@ -1843,7 +1843,7 @@ bool Workspace::removeSystemTrayWin( WId w, bool check ) // embedding it, allowing KWin to figure out. Kicker just mustn't // crash before removing it again ... *shrug* . int num_props; - Atom* props = XListProperties( qt_xdisplay(), w, &num_props ); + Atom* props = XListProperties( tqt_xdisplay(), w, &num_props ); if( props != NULL ) { for( int i = 0; @@ -1858,7 +1858,7 @@ bool Workspace::removeSystemTrayWin( WId w, bool check ) } } systemTrayWins.remove( w ); - XRemoveFromSaveSet (qt_xdisplay (), w); + XRemoveFromSaveSet (tqt_xdisplay (), w); propagateSystemTrayWins(); return TRUE; } @@ -1896,7 +1896,7 @@ void Workspace::killWindowId( Window window_to_kill ) Window parent, root; Window* children; unsigned int children_count; - XQueryTree( qt_xdisplay(), window, &root, &parent, &children, &children_count ); + XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count ); if( children != NULL ) XFree( children ); if( window == root ) // we didn't find the client, probably an override-redirect window @@ -1906,7 +1906,7 @@ void Workspace::killWindowId( Window window_to_kill ) if( client != NULL ) client->killWindow(); else - XKillClient( qt_xdisplay(), window_to_kill ); + XKillClient( tqt_xdisplay(), window_to_kill ); } void Workspace::suspendWindowId( Window window_to_suspend ) @@ -1923,7 +1923,7 @@ void Workspace::suspendWindowId( Window window_to_suspend ) Window parent, root; Window* children; unsigned int children_count; - XQueryTree( qt_xdisplay(), window, &root, &parent, &children, &children_count ); + XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count ); if( children != NULL ) XFree( children ); if( window == root ) // we didn't find the client, probably an override-redirect window @@ -1950,7 +1950,7 @@ void Workspace::resumeWindowId( Window window_to_resume ) Window parent, root; Window* children; unsigned int children_count; - XQueryTree( qt_xdisplay(), window, &root, &parent, &children, &children_count ); + XQueryTree( tqt_xdisplay(), window, &root, &parent, &children, &children_count ); if( children != NULL ) XFree( children ); if( window == root ) // we didn't find the client, probably an override-redirect window @@ -1990,7 +1990,7 @@ void Workspace::slotGrabWindow() { //As the first step, get the mask from XShape. int count, order; - XRectangle* rects = XShapeGetRectangles( qt_xdisplay(), active_client->frameId(), + XRectangle* rects = XShapeGetRectangles( tqt_xdisplay(), active_client->frameId(), ShapeBounding, &count, &order); //The ShapeBounding region is the outermost shape of the window; //ShapeBounding - ShapeClipping is defined to be the border. @@ -2035,7 +2035,7 @@ void Workspace::slotGrabWindow() */ void Workspace::slotGrabDesktop() { - TQPixmap p = TQPixmap::grabWindow( qt_xrootwin() ); + TQPixmap p = TQPixmap::grabWindow( tqt_xrootwin() ); TQClipboard *cb = TQApplication::clipboard(); cb->setPixmap( p ); } @@ -2049,12 +2049,12 @@ void Workspace::slotMouseEmulation() if ( mouse_emulation ) { - XUngrabKeyboard(qt_xdisplay(), GET_QT_X_TIME()); + XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME()); mouse_emulation = FALSE; return; } - if ( XGrabKeyboard(qt_xdisplay(), + if ( XGrabKeyboard(tqt_xdisplay(), root, FALSE, GrabModeAsync, GrabModeAsync, GET_QT_X_TIME()) == GrabSuccess ) @@ -2074,7 +2074,7 @@ void Workspace::slotMouseEmulation() WId Workspace::getMouseEmulationWindow() { Window root; - Window child = qt_xrootwin(); + Window child = tqt_xrootwin(); int root_x, root_y, lx, ly; uint state; Window w; @@ -2084,7 +2084,7 @@ WId Workspace::getMouseEmulationWindow() w = child; if (!c) c = findClient( FrameIdMatchPredicate( w )); - XQueryPointer( qt_xdisplay(), w, &root, &child, + XQueryPointer( tqt_xdisplay(), w, &root, &child, &root_x, &root_y, &lx, &ly, &state ); } while ( child != None && child != w ); @@ -2105,13 +2105,13 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation { int x, y; Window xw; - XTranslateCoordinates( qt_xdisplay(), qt_xrootwin(), w, pos.x(), pos.y(), &x, &y, &xw ); + XTranslateCoordinates( tqt_xdisplay(), tqt_xrootwin(), w, pos.x(), pos.y(), &x, &y, &xw ); if ( type == EmuMove ) { // motion notify events XEvent e; e.type = MotionNotify; e.xmotion.window = w; - e.xmotion.root = qt_xrootwin(); + e.xmotion.root = tqt_xrootwin(); e.xmotion.subwindow = w; e.xmotion.time = GET_QT_X_TIME(); e.xmotion.x = x; @@ -2120,14 +2120,14 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation e.xmotion.y_root = pos.y(); e.xmotion.state = state; e.xmotion.is_hint = NotifyNormal; - XSendEvent( qt_xdisplay(), w, TRUE, ButtonMotionMask, &e ); + XSendEvent( tqt_xdisplay(), w, TRUE, ButtonMotionMask, &e ); } else { XEvent e; e.type = type == EmuRelease ? ButtonRelease : ButtonPress; e.xbutton.window = w; - e.xbutton.root = qt_xrootwin(); + e.xbutton.root = tqt_xrootwin(); e.xbutton.subwindow = w; e.xbutton.time = GET_QT_X_TIME(); e.xbutton.x = x; @@ -2136,7 +2136,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation e.xbutton.y_root = pos.y(); e.xbutton.state = state; e.xbutton.button = button; - XSendEvent( qt_xdisplay(), w, TRUE, ButtonPressMask, &e ); + XSendEvent( tqt_xdisplay(), w, TRUE, ButtonPressMask, &e ); if ( type == EmuPress ) { @@ -2178,9 +2178,9 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation */ bool Workspace::keyPressMouseEmulation( XKeyEvent& ev ) { - if ( root != qt_xrootwin() ) + if ( root != tqt_xrootwin() ) return FALSE; - int kc = XKeycodeToKeysym(qt_xdisplay(), ev.keycode, 0); + int kc = XKeycodeToKeysym(tqt_xdisplay(), ev.keycode, 0); int km = ev.state & (ControlMask | Mod1Mask | ShiftMask); bool is_control = km & ControlMask; @@ -2255,7 +2255,7 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent& ev ) } // fall through case XK_Escape: - XUngrabKeyboard(qt_xdisplay(), GET_QT_X_TIME()); + XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME()); mouse_emulation = FALSE; return TRUE; default: @@ -2340,58 +2340,58 @@ void Workspace::createBorderWindows() attributes.override_redirect = True; attributes.event_mask = ( EnterWindowMask | LeaveWindowMask ); valuemask= (CWOverrideRedirect | CWEventMask | CWCursor ); - attributes.cursor = XCreateFontCursor(qt_xdisplay(), + attributes.cursor = XCreateFontCursor(tqt_xdisplay(), XC_sb_up_arrow); - electric_top_border = XCreateWindow (qt_xdisplay(), qt_xrootwin(), + electric_top_border = XCreateWindow (tqt_xdisplay(), tqt_xrootwin(), 0,0, r.width(),1, 0, CopyFromParent, InputOnly, CopyFromParent, valuemask, &attributes); - XMapWindow(qt_xdisplay(), electric_top_border); + XMapWindow(tqt_xdisplay(), electric_top_border); - attributes.cursor = XCreateFontCursor(qt_xdisplay(), + attributes.cursor = XCreateFontCursor(tqt_xdisplay(), XC_sb_down_arrow); - electric_bottom_border = XCreateWindow (qt_xdisplay(), qt_xrootwin(), + electric_bottom_border = XCreateWindow (tqt_xdisplay(), tqt_xrootwin(), 0,r.height()-1, r.width(),1, 0, CopyFromParent, InputOnly, CopyFromParent, valuemask, &attributes); - XMapWindow(qt_xdisplay(), electric_bottom_border); + XMapWindow(tqt_xdisplay(), electric_bottom_border); - attributes.cursor = XCreateFontCursor(qt_xdisplay(), + attributes.cursor = XCreateFontCursor(tqt_xdisplay(), XC_sb_left_arrow); - electric_left_border = XCreateWindow (qt_xdisplay(), qt_xrootwin(), + electric_left_border = XCreateWindow (tqt_xdisplay(), tqt_xrootwin(), 0,0, 1,r.height(), 0, CopyFromParent, InputOnly, CopyFromParent, valuemask, &attributes); - XMapWindow(qt_xdisplay(), electric_left_border); + XMapWindow(tqt_xdisplay(), electric_left_border); - attributes.cursor = XCreateFontCursor(qt_xdisplay(), + attributes.cursor = XCreateFontCursor(tqt_xdisplay(), XC_sb_right_arrow); - electric_right_border = XCreateWindow (qt_xdisplay(), qt_xrootwin(), + electric_right_border = XCreateWindow (tqt_xdisplay(), tqt_xrootwin(), r.width()-1,0, 1,r.height(), 0, CopyFromParent, InputOnly, CopyFromParent, valuemask, &attributes); - XMapWindow(qt_xdisplay(), electric_right_border); + XMapWindow(tqt_xdisplay(), electric_right_border); // Set XdndAware on the windows, so that DND enter events are received (#86998) Atom version = 4; // XDND version - XChangeProperty( qt_xdisplay(), electric_top_border, atoms->xdnd_aware, XA_ATOM, + XChangeProperty( tqt_xdisplay(), electric_top_border, atoms->xdnd_aware, XA_ATOM, 32, PropModeReplace, ( unsigned char* )&version, 1 ); - XChangeProperty( qt_xdisplay(), electric_bottom_border, atoms->xdnd_aware, XA_ATOM, + XChangeProperty( tqt_xdisplay(), electric_bottom_border, atoms->xdnd_aware, XA_ATOM, 32, PropModeReplace, ( unsigned char* )&version, 1 ); - XChangeProperty( qt_xdisplay(), electric_left_border, atoms->xdnd_aware, XA_ATOM, + XChangeProperty( tqt_xdisplay(), electric_left_border, atoms->xdnd_aware, XA_ATOM, 32, PropModeReplace, ( unsigned char* )&version, 1 ); - XChangeProperty( qt_xdisplay(), electric_right_border, atoms->xdnd_aware, XA_ATOM, + XChangeProperty( tqt_xdisplay(), electric_right_border, atoms->xdnd_aware, XA_ATOM, 32, PropModeReplace, ( unsigned char* )&version, 1 ); } @@ -2409,13 +2409,13 @@ void Workspace::destroyBorderWindows() electric_have_borders = false; if(electric_top_border) - XDestroyWindow(qt_xdisplay(),electric_top_border); + XDestroyWindow(tqt_xdisplay(),electric_top_border); if(electric_bottom_border) - XDestroyWindow(qt_xdisplay(),electric_bottom_border); + XDestroyWindow(tqt_xdisplay(),electric_bottom_border); if(electric_left_border) - XDestroyWindow(qt_xdisplay(),electric_left_border); + XDestroyWindow(tqt_xdisplay(),electric_left_border); if(electric_right_border) - XDestroyWindow(qt_xdisplay(),electric_right_border); + XDestroyWindow(tqt_xdisplay(),electric_right_border); electric_top_border = None; electric_bottom_border = None; @@ -2565,10 +2565,10 @@ void Workspace::raiseElectricBorders() if(electric_have_borders) { - XRaiseWindow(qt_xdisplay(), electric_top_border); - XRaiseWindow(qt_xdisplay(), electric_left_border); - XRaiseWindow(qt_xdisplay(), electric_bottom_border); - XRaiseWindow(qt_xdisplay(), electric_right_border); + XRaiseWindow(tqt_xdisplay(), electric_top_border); + XRaiseWindow(tqt_xdisplay(), electric_left_border); + XRaiseWindow(tqt_xdisplay(), electric_bottom_border); + XRaiseWindow(tqt_xdisplay(), electric_right_border); } } @@ -2647,7 +2647,7 @@ void Workspace::setupTopMenuHandling() Window stack[ 2 ]; stack[ 0 ] = supportWindow->winId(); stack[ 1 ] = topmenu_space->winId(); - XRestackWindows(qt_xdisplay(), stack, 2); + XRestackWindows(tqt_xdisplay(), stack, 2); updateTopMenuGeometry(); topmenu_space->show(); updateClientArea(); @@ -2686,7 +2686,7 @@ bool Workspace::checkStartupNotification( Window w, KStartupInfoId& id, KStartup */ void Workspace::focusToNull() { - XSetInputFocus(qt_xdisplay(), null_focus_window, RevertToPointerRoot, GET_QT_X_TIME() ); + XSetInputFocus(tqt_xdisplay(), null_focus_window, RevertToPointerRoot, GET_QT_X_TIME() ); } void Workspace::helperDialog( const TQString& message, const Client* c ) @@ -2746,8 +2746,8 @@ void Workspace::startKompmgr() unsigned long length, after; unsigned char* data_root; Atom prop_root; - prop_root = XInternAtom(qt_xdisplay(), "_XROOTPMAP_ID", False); - if( XGetWindowProperty( qt_xdisplay(), qt_xrootwin(), prop_root, 0L, 1L, False, AnyPropertyType, &type, &format, &length, &after, &data_root) == Success && data_root != NULL ) { + prop_root = XInternAtom(tqt_xdisplay(), "_XROOTPMAP_ID", False); + if( XGetWindowProperty( tqt_xdisplay(), tqt_xrootwin(), prop_root, 0L, 1L, False, AnyPropertyType, &type, &format, &length, &after, &data_root) == Success && data_root != NULL ) { // Root pixmap is available; OK to load... } else { @@ -2770,7 +2770,7 @@ void Workspace::startKompmgr() { delete kompmgr_selection; char selection_name[ 100 ]; - sprintf( selection_name, "_NET_WM_CM_S%d", DefaultScreen( qt_xdisplay())); + sprintf( selection_name, "_NET_WM_CM_S%d", DefaultScreen( tqt_xdisplay())); kompmgr_selection = new KSelectionOwner( selection_name ); connect( kompmgr_selection, TQT_SIGNAL( lostOwnership()), TQT_SLOT( stopKompmgr())); kompmgr_selection->claim( true ); |