summaryrefslogtreecommitdiffstats
path: root/twin/utils.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2012-03-02 02:13:02 -0600
committerTimothy Pearson <[email protected]>2012-03-02 02:13:02 -0600
commit8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96 (patch)
treebf71d4bfa94d0561e80456400ae5fe2bb501fbd8 /twin/utils.cpp
parente8a1cdc01d38125bea12d5494db977ae6429919a (diff)
downloadtdebase-8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96.tar.gz
tdebase-8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96.zip
Rename additional global functions and variables for tqt3
Diffstat (limited to 'twin/utils.cpp')
-rw-r--r--twin/utils.cpp42
1 files changed, 21 insertions, 21 deletions
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 );
}