summaryrefslogtreecommitdiffstats
path: root/tdecore/kmanagerselection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore/kmanagerselection.cpp')
-rw-r--r--tdecore/kmanagerselection.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/tdecore/kmanagerselection.cpp b/tdecore/kmanagerselection.cpp
index feabf630d..75dde5c9c 100644
--- a/tdecore/kmanagerselection.cpp
+++ b/tdecore/kmanagerselection.cpp
@@ -76,7 +76,7 @@ bool KSelectionOwnerPrivate::x11Event( XEvent* ev_P )
KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, TQObject* parent_P )
: TQObject( parent_P ),
selection( selection_P ),
- screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
+ screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())),
window( None ),
timestamp( CurrentTime ),
extra1( 0 ), extra2( 0 ),
@@ -86,8 +86,8 @@ KSelectionOwner::KSelectionOwner( Atom selection_P, int screen_P, TQObject* pare
KSelectionOwner::KSelectionOwner( const char* selection_P, int screen_P, TQObject* parent_P )
: TQObject( parent_P ),
- selection( XInternAtom( qt_xdisplay(), selection_P, False )),
- screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
+ selection( XInternAtom( tqt_xdisplay(), selection_P, False )),
+ screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())),
window( None ),
timestamp( CurrentTime ),
extra1( 0 ), extra2( 0 ),
@@ -107,7 +107,7 @@ bool KSelectionOwner::claim( bool force_P, bool force_kill_P )
getAtoms();
if( timestamp != CurrentTime )
release();
- Display* const dpy = qt_xdisplay();
+ Display* const dpy = tqt_xdisplay();
Window prev_owner = XGetSelectionOwner( dpy, selection );
if( prev_owner != None )
{
@@ -183,7 +183,7 @@ void KSelectionOwner::release()
{
if( timestamp == CurrentTime )
return;
- XDestroyWindow( qt_xdisplay(), window ); // also makes the selection not owned
+ XDestroyWindow( tqt_xdisplay(), window ); // also makes the selection not owned
// kdDebug() << "Releasing selection" << endl;
timestamp = CurrentTime;
}
@@ -217,8 +217,8 @@ bool KSelectionOwner::filterEvent( XEvent* ev_P )
timestamp = CurrentTime;
// kdDebug() << "Lost selection" << endl;
emit lostOwnership();
- XSelectInput( qt_xdisplay(), window, 0 );
- XDestroyWindow( qt_xdisplay(), window );
+ XSelectInput( tqt_xdisplay(), window, 0 );
+ XDestroyWindow( tqt_xdisplay(), window );
return false;
}
case DestroyNotify:
@@ -268,7 +268,7 @@ void KSelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P )
unsigned long items;
unsigned long after;
unsigned char* data;
- if( XGetWindowProperty( qt_xdisplay(), ev_P.requestor, ev_P.property, 0,
+ if( XGetWindowProperty( tqt_xdisplay(), ev_P.requestor, ev_P.property, 0,
MAX_ATOMS, False, AnyPropertyType, &type, &format, &items, &after,
&data ) == Success && format == 32 && items % 2 == 0 )
{
@@ -289,7 +289,7 @@ void KSelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P )
atoms[ i * 2 + 1 ] = None;
}
if( !all_handled )
- XChangeProperty( qt_xdisplay(), ev_P.requestor, ev_P.property, XA_ATOM,
+ XChangeProperty( tqt_xdisplay(), ev_P.requestor, ev_P.property, XA_ATOM,
32, PropModeReplace, reinterpret_cast< unsigned char* >( atoms ), items );
handled = true;
XFree( data );
@@ -304,11 +304,11 @@ void KSelectionOwner::filter_selection_request( XSelectionRequestEvent& ev_P )
}
XEvent ev;
ev.xselection.type = SelectionNotify;
- ev.xselection.display = qt_xdisplay();
+ ev.xselection.display = tqt_xdisplay();
ev.xselection.requestor = ev_P.requestor;
ev.xselection.target = ev_P.target;
ev.xselection.property = handled ? ev_P.property : None;
- XSendEvent( qt_xdisplay(), ev_P.requestor, False, 0, &ev );
+ XSendEvent( tqt_xdisplay(), ev_P.requestor, False, 0, &ev );
}
bool KSelectionOwner::handle_selection( Atom target_P, Atom property_P, Window requestor_P )
@@ -316,7 +316,7 @@ bool KSelectionOwner::handle_selection( Atom target_P, Atom property_P, Window r
if( target_P == xa_timestamp )
{
// kdDebug() << "Handling timestamp request" << endl;
- 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* >( &timestamp ), 1 );
}
else if( target_P == xa_targets )
@@ -332,7 +332,7 @@ void KSelectionOwner::replyTargets( Atom property_P, Window requestor_P )
{
Atom atoms[ 3 ] = { xa_multiple, xa_timestamp, xa_targets };
// kdDebug() << "Handling targets request" << endl;
- XChangeProperty( qt_xdisplay(), requestor_P, property_P, XA_ATOM, 32, PropModeReplace,
+ XChangeProperty( tqt_xdisplay(), requestor_P, property_P, XA_ATOM, 32, PropModeReplace,
reinterpret_cast< unsigned char* >( atoms ), 3 );
}
@@ -348,7 +348,7 @@ void KSelectionOwner::getAtoms()
Atom atoms[ 4 ];
const char* const names[] =
{ "MANAGER", "MULTIPLE", "TARGETS", "TIMESTAMP" };
- XInternAtoms( qt_xdisplay(), const_cast< char** >( names ), 4, False, atoms );
+ XInternAtoms( tqt_xdisplay(), const_cast< char** >( names ), 4, False, atoms );
manager_atom = atoms[ 0 ];
xa_multiple = atoms[ 1];
xa_targets = atoms[ 2 ];
@@ -393,7 +393,7 @@ bool KSelectionWatcherPrivate::x11Event( XEvent* ev_P )
KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, TQObject* parent_P )
: TQObject( parent_P ),
selection( selection_P ),
- screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
+ screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())),
selection_owner( None ),
d( new KSelectionWatcherPrivate( this ))
{
@@ -402,8 +402,8 @@ KSelectionWatcher::KSelectionWatcher( Atom selection_P, int screen_P, TQObject*
KSelectionWatcher::KSelectionWatcher( const char* selection_P, int screen_P, TQObject* parent_P )
: TQObject( parent_P ),
- selection( XInternAtom( qt_xdisplay(), selection_P, False )),
- screen( screen_P >= 0 ? screen_P : DefaultScreen( qt_xdisplay())),
+ selection( XInternAtom( tqt_xdisplay(), selection_P, False )),
+ screen( screen_P >= 0 ? screen_P : DefaultScreen( tqt_xdisplay())),
selection_owner( None ),
d( new KSelectionWatcherPrivate( this ))
{
@@ -419,7 +419,7 @@ void KSelectionWatcher::init()
{
if( manager_atom == None )
{
- Display* const dpy = qt_xdisplay();
+ Display* const dpy = tqt_xdisplay();
manager_atom = XInternAtom( dpy, "MANAGER", False );
XWindowAttributes attrs;
XGetWindowAttributes( dpy, RootWindow( dpy, screen ), &attrs );
@@ -431,7 +431,7 @@ void KSelectionWatcher::init()
Window KSelectionWatcher::owner()
{
- Display* const dpy = qt_xdisplay();
+ Display* const dpy = tqt_xdisplay();
KXErrorHandler handler;
Window current_owner = XGetSelectionOwner( dpy, selection );
if( current_owner == None )