summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/kapplication.cpp46
-rw-r--r--tdecore/kcrash.cpp4
-rw-r--r--tdecore/kglobalaccel_win.cpp16
-rw-r--r--tdecore/kglobalaccel_x11.cpp18
-rw-r--r--tdecore/kiconeffect.cpp14
-rw-r--r--tdecore/kipc.cpp16
-rw-r--r--tdecore/kkeynative_x11.cpp6
-rw-r--r--tdecore/kkeyserver_x11.cpp32
-rw-r--r--tdecore/kmanagerselection.cpp38
-rw-r--r--tdecore/krootprop.cpp10
-rw-r--r--tdecore/kstartupinfo.cpp30
-rw-r--r--tdecore/kstartupinfo.h10
-rw-r--r--tdecore/kxerrorhandler.h6
-rw-r--r--tdecore/kxmessages.cpp20
-rw-r--r--tdecore/twin.cpp138
-rw-r--r--tdecore/twinmodule.cpp14
16 files changed, 209 insertions, 209 deletions
diff --git a/tdecore/kapplication.cpp b/tdecore/kapplication.cpp
index d2ab865cc..e7995d8b2 100644
--- a/tdecore/kapplication.cpp
+++ b/tdecore/kapplication.cpp
@@ -201,7 +201,7 @@ static int x11_error(Display *dpy, XErrorEvent *ev) {
// duplicated from patched Qt, so that there won't be unresolved symbols if Qt gets
// replaced by unpatched one
-TDECORE_EXPORT bool qt_qclipboard_bailout_hack = false;
+TDECORE_EXPORT bool tqt_qclipboard_bailout_hack = false;
template class TQPtrList<KSessionManaged>;
@@ -891,7 +891,7 @@ void KApplication::init(bool GUIenabled)
atoms[n] = &kde_xdnd_drop;
names[n++] = (char *) "XdndDrop";
- 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];
@@ -932,7 +932,7 @@ void KApplication::init(bool GUIenabled)
{
#ifdef Q_WS_X11
// this is important since we fork() to launch the help (Matthias)
- fcntl(ConnectionNumber(qt_xdisplay()), F_SETFD, FD_CLOEXEC);
+ fcntl(ConnectionNumber(tqt_xdisplay()), F_SETFD, FD_CLOEXEC);
// set up the fancy (=robust and error ignoring ) KDE xio error handlers (Matthias)
d->oldXErrorHandler = XSetErrorHandler( kde_x_errhandler );
d->oldXIOErrorHandler = XSetIOErrorHandler( kde_xio_errhandler );
@@ -1024,7 +1024,7 @@ void KApplication::init(bool GUIenabled)
{
smw = new TQWidget(0,0);
long data = 1;
- XChangeProperty(qt_xdisplay(), smw->winId(),
+ XChangeProperty(tqt_xdisplay(), smw->winId(),
atom_DesktopWindow, atom_DesktopWindow,
32, PropModeReplace, (unsigned char *)&data, 1);
}
@@ -1325,7 +1325,7 @@ void KApplication::commitData( TQSessionManager& sm )
static void checkRestartVersion( TQSessionManager& sm )
{
- Display* dpy = qt_xdisplay();
+ Display* dpy = tqt_xdisplay();
Atom type;
int format;
unsigned long nitems, after;
@@ -1659,13 +1659,13 @@ void KApplication::parseCommandLine( )
int format;
unsigned long length, after;
unsigned char *data;
- while ( XGetWindowProperty( qt_xdisplay(), qt_xrootwin(), atom_NetSupported,
+ while ( XGetWindowProperty( tqt_xdisplay(), tqt_xrootwin(), atom_NetSupported,
0, 1, false, AnyPropertyType, &type, &format,
&length, &after, &data ) != Success || !length ) {
if ( data )
XFree( data );
XEvent event;
- XWindowEvent( qt_xdisplay(), qt_xrootwin(), PropertyChangeMask, &event );
+ XWindowEvent( tqt_xdisplay(), tqt_xrootwin(), PropertyChangeMask, &event );
}
if ( data )
XFree( data );
@@ -2045,8 +2045,8 @@ bool KApplication::x11EventFilter( XEvent *_event )
#endif
// Workaround for focus stealing prevention not working when dragging e.g. text from KWrite
// to KDesktop -> the dialog asking for filename doesn't get activated. This is because
- // Qt-3.2.x doesn't have concept of qt_x_user_time at all, and Qt-3.3.0b1 passes the timestamp
- // in the XdndDrop message in incorrect field (and doesn't update qt_x_user_time either).
+ // Qt-3.2.x doesn't have concept of tqt_x_user_time at all, and Qt-3.3.0b1 passes the timestamp
+ // in the XdndDrop message in incorrect field (and doesn't update tqt_x_user_time either).
// Patch already sent, future Qt version should have this fixed.
if( _event->xclient.message_type == kde_xdnd_drop )
{ // if the message is XdndDrop
@@ -2058,15 +2058,15 @@ bool KApplication::x11EventFilter( XEvent *_event )
if( GET_QT_X_USER_TIME() == 0
|| NET::timestampCompare( _event->xclient.data.l[ 3 ], GET_QT_X_USER_TIME() ) > 0 )
{ // and the timestamp looks reasonable
- SET_QT_X_USER_TIME(_event->xclient.data.l[ 3 ]); // update our qt_x_user_time from it
+ SET_QT_X_USER_TIME(_event->xclient.data.l[ 3 ]); // update our tqt_x_user_time from it
}
}
- else // normal DND, only needed until Qt updates qt_x_user_time from XdndDrop
+ else // normal DND, only needed until Qt updates tqt_x_user_time from XdndDrop
{
if( GET_QT_X_USER_TIME() == 0
|| NET::timestampCompare( _event->xclient.data.l[ 2 ], GET_QT_X_USER_TIME() ) > 0 )
{ // the timestamp looks reasonable
- SET_QT_X_USER_TIME(_event->xclient.data.l[ 2 ]); // update our qt_x_user_time from it
+ SET_QT_X_USER_TIME(_event->xclient.data.l[ 2 ]); // update our tqt_x_user_time from it
}
}
}
@@ -2175,17 +2175,17 @@ void KApplication::updateUserTimestamp( unsigned long time )
#if defined Q_WS_X11
if( time == 0 )
{ // get current X timestamp
- Window w = XCreateSimpleWindow( qt_xdisplay(), qt_xrootwin(), 0, 0, 1, 1, 0, 0, 0 );
- XSelectInput( qt_xdisplay(), w, PropertyChangeMask );
+ Window w = XCreateSimpleWindow( tqt_xdisplay(), tqt_xrootwin(), 0, 0, 1, 1, 0, 0, 0 );
+ XSelectInput( tqt_xdisplay(), w, PropertyChangeMask );
unsigned char data[ 1 ];
- XChangeProperty( qt_xdisplay(), w, XA_ATOM, XA_ATOM, 8, PropModeAppend, data, 1 );
+ XChangeProperty( tqt_xdisplay(), w, XA_ATOM, XA_ATOM, 8, PropModeAppend, data, 1 );
XEvent ev;
- XWindowEvent( qt_xdisplay(), w, PropertyChangeMask, &ev );
+ XWindowEvent( tqt_xdisplay(), w, PropertyChangeMask, &ev );
time = ev.xproperty.time;
- XDestroyWindow( qt_xdisplay(), w );
+ XDestroyWindow( tqt_xdisplay(), w );
}
if( GET_QT_X_USER_TIME() == 0
- || NET::timestampCompare( time, GET_QT_X_USER_TIME() ) > 0 ) // check time > qt_x_user_time
+ || NET::timestampCompare( time, GET_QT_X_USER_TIME() ) > 0 ) // check time > tqt_x_user_time
SET_QT_X_USER_TIME(time);
#endif
}
@@ -2995,8 +2995,8 @@ startServiceInternal( const TQCString &function,
TQCString _launcher = KApplication::launcher();
TQValueList<TQCString> envs;
#ifdef Q_WS_X11
- if (qt_xdisplay()) {
- TQCString dpystring(XDisplayString(qt_xdisplay()));
+ if (tqt_xdisplay()) {
+ TQCString dpystring(XDisplayString(tqt_xdisplay()));
envs.append( TQCString("DISPLAY=") + dpystring );
} else if( getenv( "DISPLAY" )) {
TQCString dpystring( getenv( "DISPLAY" ));
@@ -3496,7 +3496,7 @@ uint KApplication::keyboardModifiers()
Window child;
int root_x, root_y, win_x, win_y;
uint keybstate;
- XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &keybstate );
return keybstate & 0x00ff;
#elif defined W_WS_MACX
@@ -3514,7 +3514,7 @@ uint KApplication::mouseState()
Window root;
Window child;
int root_x, root_y, win_x, win_y;
- XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &mousestate );
#elif defined(Q_WS_WIN)
const bool mousebtn_swapped = GetSystemMetrics(SM_SWAPBUTTON);
@@ -3540,7 +3540,7 @@ TQ_ButtonState KApplication::keyboardMouseState()
Window child;
int root_x, root_y, win_x, win_y;
uint state;
- XQueryPointer( qt_xdisplay(), qt_xrootwin(), &root, &child,
+ XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &root, &child,
&root_x, &root_y, &win_x, &win_y, &state );
// transform the same way like Qt's qt_x11_translateButtonState()
if( state & Button1Mask )
diff --git a/tdecore/kcrash.cpp b/tdecore/kcrash.cpp
index 429e049ad..0b3d615ff 100644
--- a/tdecore/kcrash.cpp
+++ b/tdecore/kcrash.cpp
@@ -163,8 +163,8 @@ KCrash::defaultCrashHandler (int sig)
#if defined Q_WS_X11
// start up on the correct display
argv[i++] = "-display";
- if ( qt_xdisplay() )
- argv[i++] = XDisplayString(qt_xdisplay());
+ if ( tqt_xdisplay() )
+ argv[i++] = XDisplayString(tqt_xdisplay());
else
argv[i++] = getenv("DISPLAY");
#elif defined(Q_WS_QWS)
diff --git a/tdecore/kglobalaccel_win.cpp b/tdecore/kglobalaccel_win.cpp
index 8b0c81f1a..a6c80bc1a 100644
--- a/tdecore/kglobalaccel_win.cpp
+++ b/tdecore/kglobalaccel_win.cpp
@@ -136,7 +136,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
// We'll have to grab 8 key modifier combinations in order to cover all
// combinations of CapsLock, NumLock, ScrollLock.
- // Does anyone with more X-savvy know how to set a mask on qt_xrootwin so that
+ // Does anyone with more X-savvy know how to set a mask on tqt_xrootwin so that
// the irrelevant bits are always ignored and we can just make one XGrabKey
// call per accelerator? -- ellis
#ifndef NDEBUG
@@ -149,10 +149,10 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
sDebug += TQString("0x%3, ").arg(irrelevantBitsMask, 0, 16);
#endif
if( bGrab )
- XGrabKey( qt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask,
- qt_xrootwin(), True, GrabModeAsync, GrabModeSync );
+ XGrabKey( tqt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask,
+ tqt_xrootwin(), True, GrabModeAsync, GrabModeSync );
else
- XUngrabKey( qt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask, qt_xrootwin() );
+ XUngrabKey( tqt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask, tqt_xrootwin() );
}
}
#ifndef NDEBUG
@@ -169,7 +169,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
kdDebug(125) << "grab failed!\n";
for( uint m = 0; m <= 0xff; m++ ) {
if( m & keyModMaskX == 0 )
- XUngrabKey( qt_xdisplay(), keyCodeX, keyModX | m, qt_xrootwin() );
+ XUngrabKey( tqt_xdisplay(), keyCodeX, keyModX | m, tqt_xrootwin() );
}
}
}
@@ -222,8 +222,8 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
{
// do not change this line unless you really really know what you are doing (Matthias)
if ( !TQWidget::keyboardGrabber() && !TQApplication::activePopupWidget() ) {
- XUngrabKeyboard( qt_xdisplay(), pEvent->xkey.time );
- XFlush( qt_xdisplay()); // avoid X(?) bug
+ XUngrabKeyboard( tqt_xdisplay(), pEvent->xkey.time );
+ XFlush( tqt_xdisplay()); // avoid X(?) bug
}
if( !m_bEnabled )
@@ -237,7 +237,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
// e.g., KP_4 => Shift+KP_Left, and Shift+KP_4 => KP_Left.
if( pEvent->xkey.state & KKeyServer::modXNumLock() ) {
// TODO: what's the xor operator in c++?
- uint sym = XKeycodeToKeysym( qt_xdisplay(), codemod.code, 0 );
+ uint sym = XKeycodeToKeysym( tqt_xdisplay(), codemod.code, 0 );
// If this is a keypad key,
if( sym >= XK_KP_Space && sym <= XK_KP_9 ) {
switch( sym ) {
diff --git a/tdecore/kglobalaccel_x11.cpp b/tdecore/kglobalaccel_x11.cpp
index ce248ae02..dd40792dd 100644
--- a/tdecore/kglobalaccel_x11.cpp
+++ b/tdecore/kglobalaccel_x11.cpp
@@ -172,7 +172,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
// HACK: make Alt+Print work
// only do this for the Xorg default keyboard keycodes,
// other mappings (e.g. evdev) don't need or want it
- if( key.sym() == XK_Sys_Req && XKeycodeToKeysym( qt_xdisplay(), 111, 0 ) == XK_Print ) {
+ if( key.sym() == XK_Sys_Req && XKeycodeToKeysym( tqt_xdisplay(), 111, 0 ) == XK_Print ) {
keyModX |= KKeyServer::modXAlt();
keyCodeX = 111;
}
@@ -191,7 +191,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
#endif
// We'll have to grab 8 key modifier combinations in order to cover all
// combinations of CapsLock, NumLock, ScrollLock.
- // Does anyone with more X-savvy know how to set a mask on qt_xrootwin so that
+ // Does anyone with more X-savvy know how to set a mask on tqt_xrootwin so that
// the irrelevant bits are always ignored and we can just make one XGrabKey
// call per accelerator? -- ellis
#ifndef NDEBUG
@@ -204,10 +204,10 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
sDebug += TQString("0x%3, ").arg(irrelevantBitsMask, 0, 16);
#endif
if( bGrab )
- XGrabKey( qt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask,
- qt_xrootwin(), True, GrabModeAsync, GrabModeSync );
+ XGrabKey( tqt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask,
+ tqt_xrootwin(), True, GrabModeAsync, GrabModeSync );
else
- XUngrabKey( qt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask, qt_xrootwin() );
+ XUngrabKey( tqt_xdisplay(), keyCodeX, keyModX | irrelevantBitsMask, tqt_xrootwin() );
}
}
#ifndef NDEBUG
@@ -224,7 +224,7 @@ bool KGlobalAccelPrivate::grabKey( const KKeyServer::Key& key, bool bGrab, KAcce
kdDebug(125) << "grab failed!\n";
for( uint m = 0; m <= 0xff; m++ ) {
if(( m & keyModMaskX ) == 0 )
- XUngrabKey( qt_xdisplay(), keyCodeX, keyModX | m, qt_xrootwin() );
+ XUngrabKey( tqt_xdisplay(), keyCodeX, keyModX | m, tqt_xrootwin() );
}
}
}
@@ -317,8 +317,8 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
{
// do not change this line unless you really really know what you are doing (Matthias)
if ( !TQWidget::keyboardGrabber() && !TQApplication::activePopupWidget() ) {
- XUngrabKeyboard( qt_xdisplay(), pEvent->xkey.time );
- XFlush( qt_xdisplay()); // avoid X(?) bug
+ XUngrabKeyboard( tqt_xdisplay(), pEvent->xkey.time );
+ XFlush( tqt_xdisplay()); // avoid X(?) bug
}
if( !isEnabledInternal() || m_suspended )
@@ -332,7 +332,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent )
// e.g., KP_4 => Shift+KP_Left, and Shift+KP_4 => KP_Left.
if( pEvent->xkey.state & KKeyServer::modXNumLock() ) {
// TODO: what's the xor operator in c++?
- uint sym = XKeycodeToKeysym( qt_xdisplay(), codemod.code, 0 );
+ uint sym = XKeycodeToKeysym( tqt_xdisplay(), codemod.code, 0 );
// If this is a keypad key,
if( sym >= XK_KP_Space && sym <= XK_KP_9 ) {
switch( sym ) {
diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp
index c8d088918..7525e6760 100644
--- a/tdecore/kiconeffect.cpp
+++ b/tdecore/kiconeffect.cpp
@@ -36,11 +36,11 @@
#include "kiconeffect.h"
#if defined(Q_WS_WIN) || defined(Q_WS_MACX)
-static bool qt_use_xrender=true;
-static bool qt_has_xft=true;
+static bool tqt_use_xrender=true;
+static bool tqt_has_xft=true;
#else
-extern bool qt_use_xrender;
-extern bool qt_has_xft;
+extern bool tqt_use_xrender;
+extern bool tqt_has_xft;
#endif
class KIconEffectPrivate
{
@@ -445,7 +445,7 @@ void KIconEffect::semiTransparent(TQImage &img)
int width = img.width();
int height = img.height();
- if (qt_use_xrender && qt_has_xft )
+ if (tqt_use_xrender && tqt_has_xft )
for (y=0; y<height; y++)
{
#ifdef WORDS_BIGENDIAN
@@ -511,7 +511,7 @@ void KIconEffect::semiTransparent(TQImage &img)
void KIconEffect::semiTransparent(TQPixmap &pix)
{
- if ( qt_use_xrender && qt_has_xft )
+ if ( tqt_use_xrender && tqt_has_xft )
{
TQImage img=pix.convertToImage();
semiTransparent(img);
@@ -885,7 +885,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
// Fade out Icon a bit more
int x, y;
- if ((img.depth() == 32) && qt_use_xrender && qt_has_xft)
+ if ((img.depth() == 32) && tqt_use_xrender && tqt_has_xft)
{
int width = img.width();
int height = img.height();
diff --git a/tdecore/kipc.cpp b/tdecore/kipc.cpp
index 8c568ba1b..e6ec7cc4e 100644
--- a/tdecore/kipc.cpp
+++ b/tdecore/kipc.cpp
@@ -48,7 +48,7 @@ static long getSimpleProperty(Window w, Atom a)
int status;
unsigned char *p = 0;
- status = XGetWindowProperty(qt_xdisplay(), w, a, 0L, 1L, False, a,
+ status = XGetWindowProperty(tqt_xdisplay(), w, a, 0L, 1L, False, a,
&real_type, &format, &n, &extra, &p);
if ((status == Success) && (n == 1) && (format == 32))
res = *(unsigned long*)p;
@@ -62,24 +62,24 @@ void KIPC::sendMessage(Message msg, WId w, int data)
#if defined Q_WS_X11
static Atom a = 0;
if (a == 0)
- a = XInternAtom(qt_xdisplay(), "KIPC_COMM_ATOM", False);
+ a = XInternAtom(tqt_xdisplay(), "KIPC_COMM_ATOM", False);
XEvent ev;
ev.xclient.type = ClientMessage;
- ev.xclient.display = qt_xdisplay();
+ ev.xclient.display = tqt_xdisplay();
ev.xclient.window = (Window) w;
ev.xclient.message_type = a;
ev.xclient.format = 32;
ev.xclient.data.l[0] = msg;
ev.xclient.data.l[1] = data;
- XSendEvent(qt_xdisplay(), (Window) w, False, 0L, &ev);
+ XSendEvent(tqt_xdisplay(), (Window) w, False, 0L, &ev);
// KDE 1 support
static Atom kde1 = 0;
if ( msg == PaletteChanged || msg == FontChanged ) {
if ( kde1 == 0 )
- kde1 = XInternAtom(qt_xdisplay(), "KDEChangeGeneral", False );
+ kde1 = XInternAtom(tqt_xdisplay(), "KDEChangeGeneral", False );
ev.xclient.message_type = kde1;
- XSendEvent(qt_xdisplay(), (Window) w, False, 0L, &ev);
+ XSendEvent(tqt_xdisplay(), (Window) w, False, 0L, &ev);
}
#endif
@@ -91,7 +91,7 @@ void KIPC::sendMessageAll(Message msg, int data)
#if defined Q_WS_X11
unsigned int i, nrootwins;
Window dw1, dw2, *rootwins = 0;
- Display *dpy = qt_xdisplay();
+ Display *dpy = tqt_xdisplay();
int screen_count = ScreenCount(dpy);
KXErrorHandler handler;
@@ -99,7 +99,7 @@ void KIPC::sendMessageAll(Message msg, int data)
Window root = RootWindow(dpy, s);
XQueryTree(dpy, root, &dw1, &dw2, &rootwins, &nrootwins);
- Atom a = XInternAtom(qt_xdisplay(), "KDE_DESKTOP_WINDOW", False);
+ Atom a = XInternAtom(tqt_xdisplay(), "KDE_DESKTOP_WINDOW", False);
for (i = 0; i < nrootwins; i++)
{
if (getSimpleProperty(rootwins[i], a) != 0L)
diff --git a/tdecore/kkeynative_x11.cpp b/tdecore/kkeynative_x11.cpp
index 8fed59deb..261f08e3c 100644
--- a/tdecore/kkeynative_x11.cpp
+++ b/tdecore/kkeynative_x11.cpp
@@ -111,13 +111,13 @@ bool KKeyNative::init( const KKey& key )
// Only do this for the default Xorg layout, other keycode mappings
// (e.g. evdev) don't need or want it.
if( m_sym == XK_Print && !(m_mod & Mod1Mask) &&
- XKeycodeToKeysym( qt_xdisplay(), 111, 0 ) == XK_Print )
+ XKeycodeToKeysym( tqt_xdisplay(), 111, 0 ) == XK_Print )
m_code = 111; // code for Print
else if( m_sym == XK_Break || (m_sym == XK_Pause && (m_mod & ControlMask)) &&
- XKeycodeToKeysym( qt_xdisplay(), 114, 0 ) == XK_Pause )
+ XKeycodeToKeysym( tqt_xdisplay(), 114, 0 ) == XK_Pause )
m_code = 114;
else
- m_code = XKeysymToKeycode( qt_xdisplay(), m_sym );
+ m_code = XKeysymToKeycode( tqt_xdisplay(), m_sym );
if( !m_code && m_sym )
kdDebug(125) << "Couldn't get code for sym" << endl;
diff --git a/tdecore/kkeyserver_x11.cpp b/tdecore/kkeyserver_x11.cpp
index 49a523346..0bc907efa 100644
--- a/tdecore/kkeyserver_x11.cpp
+++ b/tdecore/kkeyserver_x11.cpp
@@ -328,14 +328,14 @@ static uint g_modXNumLock, g_modXScrollLock, g_modXModeSwitch;
bool initializeMods()
{
- XModifierKeymap* xmk = XGetModifierMapping( qt_xdisplay() );
+ XModifierKeymap* xmk = XGetModifierMapping( tqt_xdisplay() );
g_rgModInfo[3].modX = g_modXNumLock = g_modXScrollLock = g_modXModeSwitch = 0;
int min_keycode, max_keycode;
int keysyms_per_keycode = 0;
- XDisplayKeycodes( qt_xdisplay(), &min_keycode, &max_keycode );
- XFree( XGetKeyboardMapping( qt_xdisplay(), min_keycode, 1, &keysyms_per_keycode ));
+ XDisplayKeycodes( tqt_xdisplay(), &min_keycode, &max_keycode );
+ XFree( XGetKeyboardMapping( tqt_xdisplay(), min_keycode, 1, &keysyms_per_keycode ));
// Qt assumes that Alt is always Mod1Mask, so start at Mod2Mask.
for( int i = Mod2MapIndex; i < 8; i++ ) {
uint mask = (1 << i);
@@ -346,7 +346,7 @@ bool initializeMods()
// found fixes the problem.
for( int j = 0; j < xmk->max_keypermod && keySymX == NoSymbol; ++j )
for( int k = 0; k < keysyms_per_keycode && keySymX == NoSymbol; ++k )
- keySymX = XKeycodeToKeysym( qt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * i + j], k );
+ keySymX = XKeycodeToKeysym( tqt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * i + j], k );
switch( keySymX ) {
case XK_Num_Lock: g_modXNumLock = mask; break; // Normally Mod2Mask
case XK_Super_L:
@@ -372,7 +372,7 @@ bool initializeMods()
static void initializeVariations()
{
for( int i = 0; g_rgSymVariation[i].sym != 0; i++ )
- g_rgSymVariation[i].bActive = (XKeysymToKeycode( qt_xdisplay(), g_rgSymVariation[i].symVariation ) != 0);
+ g_rgSymVariation[i].bActive = (XKeysymToKeycode( tqt_xdisplay(), g_rgSymVariation[i].symVariation ) != 0);
g_bInitializedVariations = true;
}
#endif //Q_WS_X11
@@ -546,18 +546,18 @@ uint Sym::getModsRequired() const
return KKey::SHIFT;
}
- uchar code = XKeysymToKeycode( qt_xdisplay(), m_sym );
+ uchar code = XKeysymToKeycode( tqt_xdisplay(), m_sym );
if( code ) {
// need to check index 0 before the others, so that a null-mod
// can take precedence over the others, in case the modified
// key produces the same symbol.
- if( m_sym == XKeycodeToKeysym( qt_xdisplay(), code, 0 ) )
+ if( m_sym == XKeycodeToKeysym( tqt_xdisplay(), code, 0 ) )
;
- else if( m_sym == XKeycodeToKeysym( qt_xdisplay(), code, 1 ) )
+ else if( m_sym == XKeycodeToKeysym( tqt_xdisplay(), code, 1 ) )
mod = KKey::SHIFT;
- else if( m_sym == XKeycodeToKeysym( qt_xdisplay(), code, 2 ) )
+ else if( m_sym == XKeycodeToKeysym( tqt_xdisplay(), code, 2 ) )
mod = KKeyServer::MODE_SWITCH;
- else if( m_sym == XKeycodeToKeysym( qt_xdisplay(), code, 3 ) )
+ else if( m_sym == XKeycodeToKeysym( tqt_xdisplay(), code, 3 ) )
mod = KKey::SHIFT | KKeyServer::MODE_SWITCH;
}
#endif
@@ -762,7 +762,7 @@ bool codeXToSym( uchar codeX, uint modX, uint& sym )
XKeyPressedEvent event;
event.type = KeyPress;
- event.display = qt_xdisplay();
+ event.display = tqt_xdisplay();
event.state = modX;
event.keycode = codeX;
@@ -858,7 +858,7 @@ uint stringUserToMod( const TQString& mod )
if( keySymX != 0 ) {
// Get X keyboard code
- keyCodeX = XKeysymToKeycode( qt_xdisplay(), keySymX );
+ keyCodeX = XKeysymToKeycode( tqt_xdisplay(), keySymX );
// Add ModeSwitch modifier bit, if necessary
keySymXMods( keySymX, 0, &keyModX );
@@ -887,8 +887,8 @@ uint stringUserToMod( const TQString& mod )
// keycode 111 & 92: Print Sys_Req -> Sys_Req = Alt+Print
// keycode 110 & 114: Pause Break -> Break = Ctrl+Pause
if( (keyCodeX == 92 || keyCodeX == 111) &&
- XKeycodeToKeysym( qt_xdisplay(), 92, 0 ) == XK_Print &&
- XKeycodeToKeysym( qt_xdisplay(), 111, 0 ) == XK_Print )
+ XKeycodeToKeysym( tqt_xdisplay(), 92, 0 ) == XK_Print &&
+ XKeycodeToKeysym( tqt_xdisplay(), 111, 0 ) == XK_Print )
{
// If Alt is pressed, then we need keycode 92, keysym XK_Sys_Req
if( keyModX & keyModXAlt() ) {
@@ -902,8 +902,8 @@ uint stringUserToMod( const TQString& mod )
}
}
else if( (keyCodeX == 110 || keyCodeX == 114) &&
- XKeycodeToKeysym( qt_xdisplay(), 110, 0 ) == XK_Pause &&
- XKeycodeToKeysym( qt_xdisplay(), 114, 0 ) == XK_Pause )
+ XKeycodeToKeysym( tqt_xdisplay(), 110, 0 ) == XK_Pause &&
+ XKeycodeToKeysym( tqt_xdisplay(), 114, 0 ) == XK_Pause )
{
if( keyModX & keyModXCtrl() ) {
keyCodeX = 114;
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 )
diff --git a/tdecore/krootprop.cpp b/tdecore/krootprop.cpp
index 031e27abf..cb0200c99 100644
--- a/tdecore/krootprop.cpp
+++ b/tdecore/krootprop.cpp
@@ -64,11 +64,11 @@ void KRootProp::sync()
}
}
- XChangeProperty( qt_xdisplay(), qt_xrootwin(), atom,
+ XChangeProperty( tqt_xdisplay(), tqt_xrootwin(), atom,
XA_STRING, 8, PropModeReplace,
(const unsigned char *)propString.utf8().data(),
propString.length());
- XFlush( qt_xdisplay() );
+ XFlush( tqt_xdisplay() );
}
void KRootProp::setProp( const TQString& rProp )
@@ -89,14 +89,14 @@ void KRootProp::setProp( const TQString& rProp )
if( rProp.isEmpty() )
return;
- atom = XInternAtom( qt_xdisplay(), rProp.utf8(), False);
+ atom = XInternAtom( tqt_xdisplay(), rProp.utf8(), False);
TQString s;
offset = 0; bytes_after = 1;
while (bytes_after != 0)
{
unsigned char *buf = 0;
- if (XGetWindowProperty( qt_xdisplay(), qt_xrootwin(), atom, offset, 256,
+ if (XGetWindowProperty( tqt_xdisplay(), tqt_xrootwin(), atom, offset, 256,
False, XA_STRING, &type, &format, &nitems, &bytes_after,
&buf) == Success && buf)
{
@@ -152,7 +152,7 @@ void KRootProp::destroy()
dirty = false;
propDict.clear();
if( atom ) {
- XDeleteProperty( qt_xdisplay(), qt_xrootwin(), atom );
+ XDeleteProperty( tqt_xdisplay(), tqt_xrootwin(), atom );
atom = 0;
}
}
diff --git a/tdecore/kstartupinfo.cpp b/tdecore/kstartupinfo.cpp
index f201b70c0..1cb8ce345 100644
--- a/tdecore/kstartupinfo.cpp
+++ b/tdecore/kstartupinfo.cpp
@@ -383,7 +383,7 @@ bool KStartupInfo::sendStartup( const KStartupInfoId& id_P, const KStartupInfoDa
KXMessages msgs;
TQString msg = TQString::fromLatin1( "new: %1 %2" )
.arg( id_P.to_text()).arg( data_P.to_text());
- msg = check_required_startup_fields( msg, data_P, qt_xscreen());
+ msg = check_required_startup_fields( msg, data_P, tqt_xscreen());
kdDebug( 172 ) << "sending " << msg << endl;
msgs.broadcastMessage( NET_STARTUP_MSG, msg, -1, false );
return true;
@@ -508,7 +508,7 @@ void KStartupInfo::appStarted( const TQCString& startup_id )
return;
if( kapp != NULL )
KStartupInfo::sendFinish( id );
- else if( getenv( "DISPLAY" ) != NULL ) // don't rely on qt_xdisplay()
+ else if( getenv( "DISPLAY" ) != NULL ) // don't rely on tqt_xdisplay()
{
#ifdef Q_WS_X11
Display* disp = XOpenDisplay( NULL );
@@ -551,7 +551,7 @@ void KStartupInfo::setNewStartupId( TQWidget* window, const TQCString& startup_i
{
if( !startup_id.isEmpty() && startup_id != "0" )
{
- NETRootInfo i( qt_xdisplay(), NET::Supported );
+ NETRootInfo i( tqt_xdisplay(), NET::Supported );
if( i.isSupported( NET::WM2StartupId ))
{
KStartupInfo::setWindowStartupId( window->winId(), startup_id );
@@ -618,7 +618,7 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
return find_id( id, id_O, data_O ) ? Match : NoMatch;
}
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), w_P, qt_xrootwin(),
+ NETWinInfo info( tqt_xdisplay(), w_P, tqt_xrootwin(),
NET::WMWindowType | NET::WMPid | NET::WMState );
pid_t pid = info.pid();
if( pid > 0 )
@@ -630,7 +630,7 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
// try XClass matching , this PID stuff sucks :(
}
XClassHint hint;
- if( XGetClassHint( qt_xdisplay(), w_P, &hint ) != 0 )
+ if( XGetClassHint( tqt_xdisplay(), w_P, &hint ) != 0 )
{ // We managed to read the class hint
TQCString res_name = hint.res_name;
TQCString res_class = hint.res_class;
@@ -652,8 +652,8 @@ KStartupInfo::startup_t KStartupInfo::check_startup_internal( WId w_P, KStartupI
return NoMatch;
// lets see if this is a transient
Window transient_for;
- if( XGetTransientForHint( qt_xdisplay(), static_cast< Window >( w_P ), &transient_for )
- && static_cast< WId >( transient_for ) != qt_xrootwin()
+ if( XGetTransientForHint( tqt_xdisplay(), static_cast< Window >( w_P ), &transient_for )
+ && static_cast< WId >( transient_for ) != tqt_xrootwin()
&& transient_for != None )
return NoMatch;
#endif
@@ -744,7 +744,7 @@ static TQCString read_startup_id_property( WId w_P )
Atom type_ret;
int format_ret;
unsigned long nitems_ret = 0, after_ret = 0;
- if( XGetWindowProperty( qt_xdisplay(), w_P, net_startup_atom, 0l, 4096,
+ if( XGetWindowProperty( tqt_xdisplay(), w_P, net_startup_atom, 0l, 4096,
False, utf8_string_atom, &type_ret, &format_ret, &nitems_ret, &after_ret, &name_ret )
== Success )
{
@@ -762,13 +762,13 @@ TQCString KStartupInfo::windowStartupId( WId w_P )
{
#ifdef Q_WS_X11
if( net_startup_atom == None )
- net_startup_atom = XInternAtom( qt_xdisplay(), NET_STARTUP_WINDOW, False );
+ net_startup_atom = XInternAtom( tqt_xdisplay(), NET_STARTUP_WINDOW, False );
if( utf8_string_atom == None )
- utf8_string_atom = XInternAtom( qt_xdisplay(), "UTF8_STRING", False );
+ utf8_string_atom = XInternAtom( tqt_xdisplay(), "UTF8_STRING", False );
TQCString ret = read_startup_id_property( w_P );
if( ret.isEmpty())
{ // retry with window group leader, as the spec says
- XWMHints* hints = XGetWMHints( qt_xdisplay(), w_P );
+ XWMHints* hints = XGetWMHints( tqt_xdisplay(), w_P );
if( hints && ( hints->flags & WindowGroupHint ) != 0 )
ret = read_startup_id_property( hints->window_group );
if( hints )
@@ -786,10 +786,10 @@ void KStartupInfo::setWindowStartupId( WId w_P, const TQCString& id_P )
if( id_P.isNull())
return;
if( net_startup_atom == None )
- net_startup_atom = XInternAtom( qt_xdisplay(), NET_STARTUP_WINDOW, False );
+ net_startup_atom = XInternAtom( tqt_xdisplay(), NET_STARTUP_WINDOW, False );
if( utf8_string_atom == None )
- utf8_string_atom = XInternAtom( qt_xdisplay(), "UTF8_STRING", False );
- XChangeProperty( qt_xdisplay(), w_P, net_startup_atom, utf8_string_atom, 8,
+ utf8_string_atom = XInternAtom( tqt_xdisplay(), "UTF8_STRING", False );
+ XChangeProperty( tqt_xdisplay(), w_P, net_startup_atom, utf8_string_atom, 8,
PropModeReplace, reinterpret_cast< unsigned char* >( const_cast<TQCString&>(id_P).data()), id_P.length());
#endif
}
@@ -800,7 +800,7 @@ TQCString KStartupInfo::get_window_hostname( WId w_P )
XTextProperty tp;
char** hh;
int cnt;
- if( XGetWMClientMachine( qt_xdisplay(), w_P, &tp ) != 0
+ if( XGetWMClientMachine( tqt_xdisplay(), w_P, &tp ) != 0
&& XTextPropertyToStringList( &tp, &hh, &cnt ) != 0 )
{
if( cnt == 1 )
diff --git a/tdecore/kstartupinfo.h b/tdecore/kstartupinfo.h
index 70b1f6e09..f71a0b830 100644
--- a/tdecore/kstartupinfo.h
+++ b/tdecore/kstartupinfo.h
@@ -180,7 +180,7 @@ class TDECORE_EXPORT KStartupInfo
static bool sendStartup( const KStartupInfoId& id, const KStartupInfoData& data );
/**
- * Like sendStartup , uses dpy instead of qt_xdisplay() for sending the info.
+ * Like sendStartup , uses dpy instead of tqt_xdisplay() for sending the info.
* @param dpy the display of the application. Note that the name field
* in data is required.
* @param id the id of the application
@@ -203,7 +203,7 @@ class TDECORE_EXPORT KStartupInfo
static bool sendChange( const KStartupInfoId& id, const KStartupInfoData& data );
/**
- * Like sendChange , uses dpy instead of qt_xdisplay() for sending the info.
+ * Like sendChange , uses dpy instead of tqt_xdisplay() for sending the info.
* @param dpy the display of the application.
* @param id the id of the application
* @param data the application's data
@@ -220,7 +220,7 @@ class TDECORE_EXPORT KStartupInfo
static bool sendFinish( const KStartupInfoId& id );
/**
- * Like sendFinish , uses dpy instead of qt_xdisplay() for sending the info.
+ * Like sendFinish , uses dpy instead of tqt_xdisplay() for sending the info.
* @param dpy the display of the application.
* @param id the id of the application
* @return true if successful, false otherwise
@@ -237,7 +237,7 @@ class TDECORE_EXPORT KStartupInfo
static bool sendFinish( const KStartupInfoId& id, const KStartupInfoData& data );
/**
- * Like sendFinish , uses dpy instead of qt_xdisplay() for sending the info.
+ * Like sendFinish , uses dpy instead of tqt_xdisplay() for sending the info.
* @param dpy the display of the application.
* @param id the id of the application
* @param data the application's data
@@ -637,7 +637,7 @@ class TDECORE_EXPORT KStartupInfoData
/**
* Sets the X11 screen on which the startup notification should happen.
- * This is usually not necessary to set, as it's set by default to qt_xscreen().
+ * This is usually not necessary to set, as it's set by default to tqt_xscreen().
*/
void setScreen( int screen );
diff --git a/tdecore/kxerrorhandler.h b/tdecore/kxerrorhandler.h
index cfa67627b..ef3e81d58 100644
--- a/tdecore/kxerrorhandler.h
+++ b/tdecore/kxerrorhandler.h
@@ -61,20 +61,20 @@ class TDECORE_EXPORT KXErrorHandler
* Creates error handler that will set error flag after encountering
* any X error.
*/
- KXErrorHandler( Display* dpy = qt_xdisplay());
+ KXErrorHandler( Display* dpy = tqt_xdisplay());
/**
* This constructor takes pointer to a function that will get request number,
* error code number and resource id of the failed request, as provided
* by XErrorEvent. If the function returns true, the error flag will be set.
*/
- KXErrorHandler( bool (*handler)( int request, int error_code, unsigned long resource_id ), Display* dpy = qt_xdisplay());
+ KXErrorHandler( bool (*handler)( int request, int error_code, unsigned long resource_id ), Display* dpy = tqt_xdisplay());
/**
* This constructor takes pointer to a function whose prototype matches
* the one that's used with the XSetErrorHandler() Xlib function.
* NOTE: For the error flag to be set, the function must return non-zero
* value.
*/
- KXErrorHandler( int (*handler)( Display*, XErrorEvent* ), Display* dpy = qt_xdisplay());
+ KXErrorHandler( int (*handler)( Display*, XErrorEvent* ), Display* dpy = tqt_xdisplay());
/**
* This function returns true if the error flag is set (i.e. no custom handler
* function was used and there was any error, or the custom handler indicated
diff --git a/tdecore/kxmessages.cpp b/tdecore/kxmessages.cpp
index 6b6f971a2..52781188f 100644
--- a/tdecore/kxmessages.cpp
+++ b/tdecore/kxmessages.cpp
@@ -44,7 +44,7 @@ KXMessages::KXMessages( const char* accept_broadcast_P, TQWidget* parent_P )
{
( void ) kapp->desktop(); //trigger desktop widget creation to select root window events
kapp->installX11EventFilter( this ); // i.e. PropertyChangeMask
- accept_atom1 = XInternAtom( qt_xdisplay(), accept_broadcast_P, false );
+ accept_atom1 = XInternAtom( tqt_xdisplay(), accept_broadcast_P, false );
accept_atom2 = accept_atom1;
}
else
@@ -61,9 +61,9 @@ KXMessages::KXMessages( const char* accept_broadcast_P, TQWidget* parent_P, bool
{
( void ) kapp->desktop(); //trigger desktop widget creation to select root window events
kapp->installX11EventFilter( this ); // i.e. PropertyChangeMask
- accept_atom2 = XInternAtom( qt_xdisplay(), accept_broadcast_P, false );
+ accept_atom2 = XInternAtom( tqt_xdisplay(), accept_broadcast_P, false );
accept_atom1 = obsolete_P ? accept_atom2
- : XInternAtom( qt_xdisplay(), TQCString( accept_broadcast_P ) + "_BEGIN", false );
+ : XInternAtom( tqt_xdisplay(), TQCString( accept_broadcast_P ) + "_BEGIN", false );
}
else
{
@@ -86,10 +86,10 @@ void KXMessages::broadcastMessage( const char* msg_type_P, const TQString& messa
void KXMessages::broadcastMessage( const char* msg_type_P, const TQString& message_P,
int screen_P, bool obsolete_P )
{
- Atom a2 = XInternAtom( qt_xdisplay(), msg_type_P, false );
- Atom a1 = obsolete_P ? a2 : XInternAtom( qt_xdisplay(), TQCString( msg_type_P ) + "_BEGIN", false );
- Window root = screen_P == -1 ? qt_xrootwin() : qt_xrootwin( screen_P );
- send_message_internal( root, message_P, BROADCAST_MASK, qt_xdisplay(),
+ Atom a2 = XInternAtom( tqt_xdisplay(), msg_type_P, false );
+ Atom a1 = obsolete_P ? a2 : XInternAtom( tqt_xdisplay(), TQCString( msg_type_P ) + "_BEGIN", false );
+ Window root = screen_P == -1 ? tqt_xrootwin() : tqt_xrootwin( screen_P );
+ send_message_internal( root, message_P, BROADCAST_MASK, tqt_xdisplay(),
a1, a2, handle->winId());
}
@@ -101,9 +101,9 @@ void KXMessages::sendMessage( WId w_P, const char* msg_type_P, const TQString& m
void KXMessages::sendMessage( WId w_P, const char* msg_type_P, const TQString& message_P,
bool obsolete_P )
{
- Atom a2 = XInternAtom( qt_xdisplay(), msg_type_P, false );
- Atom a1 = obsolete_P ? a2 : XInternAtom( qt_xdisplay(), TQCString( msg_type_P ) + "_BEGIN", false );
- send_message_internal( w_P, message_P, 0, qt_xdisplay(), a1, a2, handle->winId());
+ Atom a2 = XInternAtom( tqt_xdisplay(), msg_type_P, false );
+ Atom a1 = obsolete_P ? a2 : XInternAtom( tqt_xdisplay(), TQCString( msg_type_P ) + "_BEGIN", false );
+ send_message_internal( w_P, message_P, 0, tqt_xdisplay(), a1, a2, handle->winId());
}
bool KXMessages::broadcastMessageX( Display* disp, const char* msg_type_P,
diff --git a/tdecore/twin.cpp b/tdecore/twin.cpp
index 0e5db11b1..63cdc761f 100644
--- a/tdecore/twin.cpp
+++ b/tdecore/twin.cpp
@@ -56,7 +56,7 @@
#include "netwm.h"
static bool atoms_created = false;
-extern Atom qt_wm_protocols;
+extern Atom tqt_wm_protocols;
static Atom net_wm_context_help;
static Atom kde_wm_change_state;
@@ -86,12 +86,12 @@ static void twin_net_create_atoms() {
names[n++] = (char*) "_KDE_WM_WINDOW_SHADOW";
char net_wm_cm_name[ 100 ];
- sprintf( net_wm_cm_name, "_NET_WM_CM_S%d", DefaultScreen( qt_xdisplay()));
+ sprintf( net_wm_cm_name, "_NET_WM_CM_S%d", DefaultScreen( tqt_xdisplay()));
atoms[n] = &net_wm_cm;
names[n++] = net_wm_cm_name;
// we need a const_cast for the shitty X API
- XInternAtoms( qt_xdisplay(), const_cast<char**>(names), n, false, atoms_return );
+ XInternAtoms( tqt_xdisplay(), const_cast<char**>(names), n, false, atoms_return );
for (int i = 0; i < n; i++ )
*atoms[i] = atoms_return[i];
@@ -117,7 +117,7 @@ static void sendClientMessageToRoot(Window w, Atom a, long x, long y = 0, long z
ev.xclient.data.l[1] = y;
ev.xclient.data.l[2] = z;
mask = SubstructureRedirectMask;
- XSendEvent(qt_xdisplay(), qt_xrootwin(), False, mask, &ev);
+ XSendEvent(tqt_xdisplay(), tqt_xrootwin(), False, mask, &ev);
}
#endif
@@ -137,9 +137,9 @@ static void sendClientMessage(Window w, Atom a, long x){
ev.xclient.data.l[0] = x;
ev.xclient.data.l[1] = CurrentTime;
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);
}
#endif
@@ -147,7 +147,7 @@ bool KWin::compositingActive()
{
#ifdef Q_WS_X11
twin_net_create_atoms();
- return XGetSelectionOwner( qt_xdisplay(), net_wm_cm ) != None;
+ return XGetSelectionOwner( tqt_xdisplay(), net_wm_cm ) != None;
#else
return false;
#endif
@@ -171,7 +171,7 @@ ContextWidget::ContextWidget()
TQWhatsThis::enterWhatsThisMode();
TQCursor c = *TQApplication::overrideCursor();
TQWhatsThis::leaveWhatsThisMode();
- XGrabPointer( qt_xdisplay(), qt_xrootwin(), true,
+ XGrabPointer( tqt_xdisplay(), tqt_xrootwin(), true,
(uint)( ButtonPressMask | ButtonReleaseMask |
PointerMotionMask | EnterWindowMask |
LeaveWindowMask ),
@@ -184,25 +184,25 @@ ContextWidget::ContextWidget()
bool ContextWidget::x11Event( XEvent * ev)
{
if ( ev->type == ButtonPress && ev->xbutton.button == Button1 ) {
- XUngrabPointer( qt_xdisplay(), ev->xbutton.time );
+ XUngrabPointer( tqt_xdisplay(), ev->xbutton.time );
Window root;
- Window child = qt_xrootwin();
+ Window child = tqt_xrootwin();
int root_x, root_y, lx, ly;
uint state;
Window w;
do {
w = child;
- XQueryPointer( qt_xdisplay(), w, &root, &child,
+ XQueryPointer( tqt_xdisplay(), w, &root, &child,
&root_x, &root_y, &lx, &ly, &state );
} while ( child != None && child != w );
- ::sendClientMessage(w, qt_wm_protocols, net_wm_context_help);
+ ::sendClientMessage(w, tqt_wm_protocols, net_wm_context_help);
XEvent e = *ev;
e.xbutton.window = w;
e.xbutton.subwindow = w;
e.xbutton.x = lx;
e.xbutton.y = ly;
- XSendEvent( qt_xdisplay(), w, true, ButtonPressMask, &e );
+ XSendEvent( tqt_xdisplay(), w, true, ButtonPressMask, &e );
tqApp->exit_loop();
return true;
}
@@ -221,11 +221,11 @@ void KWin::invokeContextHelp()
void KWin::setSystemTrayWindowFor( WId trayWin, WId forWin )
{
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), trayWin, qt_xrootwin(), 0 );
+ NETWinInfo info( tqt_xdisplay(), trayWin, tqt_xrootwin(), 0 );
if ( !forWin )
- forWin = qt_xrootwin();
+ forWin = tqt_xrootwin();
info.setKDESystemTrayWinFor( forWin );
- NETRootInfo rootinfo( qt_xdisplay(), NET::Supported );
+ NETRootInfo rootinfo( tqt_xdisplay(), NET::Supported );
if( !rootinfo.isSupported( NET::WMKDESystemTrayWinFor )) {
DCOPRef ref( "kded", "kded" );
if( !ref.send( "loadModule", TQCString( "kdetrayproxy" )))
@@ -237,7 +237,7 @@ void KWin::setSystemTrayWindowFor( WId trayWin, WId forWin )
void KWin::activateWindow( WId win, long time )
{
#ifdef Q_WS_X11
- NETRootInfo info( qt_xdisplay(), 0 );
+ NETRootInfo info( tqt_xdisplay(), 0 );
if( time == 0 )
time = GET_QT_X_USER_TIME();
info.setActiveWindow( win, NET::FromApplication, time,
@@ -249,7 +249,7 @@ void KWin::activateWindow( WId win, long time )
void KWin::forceActiveWindow( WId win, long time )
{
#ifdef Q_WS_X11
- NETRootInfo info( qt_xdisplay(), 0 );
+ NETRootInfo info( tqt_xdisplay(), 0 );
if( time == 0 )
time = GET_QT_X_TIME();
info.setActiveWindow( win, NET::FromTool, time, 0 );
@@ -260,7 +260,7 @@ void KWin::forceActiveWindow( WId win, long time )
void KWin::setActiveWindow( WId win )
{
#ifdef Q_WS_X11
- NETRootInfo info( qt_xdisplay(), 0 );
+ NETRootInfo info( tqt_xdisplay(), 0 );
info.setActiveWindow( win, NET::FromUnknown, 0, 0 );
#endif
KUniqueApplication::setHandleAutoStarted();
@@ -269,7 +269,7 @@ void KWin::setActiveWindow( WId win )
void KWin::demandAttention( WId win, bool set )
{
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), 0 );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
info.setState( set ? NET::DemandsAttention : 0, NET::DemandsAttention );
#endif
}
@@ -277,7 +277,7 @@ void KWin::demandAttention( WId win, bool set )
void KWin::setUserTime( WId win, long time )
{
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), 0 );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
info.setUserTime( time );
#endif
}
@@ -293,7 +293,7 @@ WId KWin::transientFor( WId win )
#ifdef Q_WS_X11
KXErrorHandler handler; // ignore badwindow
Window transient_for = None;
- if( XGetTransientForHint( qt_xdisplay(), win, &transient_for ))
+ if( XGetTransientForHint( tqt_xdisplay(), win, &transient_for ))
return transient_for;
// XGetTransientForHint() did sync
return None;
@@ -317,10 +317,10 @@ void KWin::setMainWindow( TQWidget* subwindow, WId mainwindow )
kdWarning() << "KWin::setMainWindow(): There either mustn't be kapp->mainWidget(),"
" or the dialog must have a non-NULL parent, otherwise Qt will reset the change. Bummer." << endl;
}
- XSetTransientForHint( qt_xdisplay(), subwindow->winId(), mainwindow );
+ XSetTransientForHint( tqt_xdisplay(), subwindow->winId(), mainwindow );
}
else
- XDeleteProperty( qt_xdisplay(), subwindow->winId(), XA_WM_TRANSIENT_FOR );
+ XDeleteProperty( tqt_xdisplay(), subwindow->winId(), XA_WM_TRANSIENT_FOR );
#endif
}
@@ -328,7 +328,7 @@ WId KWin::groupLeader( WId win )
{
#ifdef Q_WS_X11
KXErrorHandler handler; // ignore badwindow
- XWMHints *hints = XGetWMHints( qt_xdisplay(), win );
+ XWMHints *hints = XGetWMHints( tqt_xdisplay(), win );
Window window_group = None;
if ( hints )
{
@@ -348,7 +348,7 @@ KWin::Info KWin::info( WId win )
{
Info w;
#ifdef Q_WS_X11
- NETWinInfo inf( qt_xdisplay(), win, qt_xrootwin(),
+ NETWinInfo inf( tqt_xdisplay(), win, tqt_xrootwin(),
NET::WMState |
NET::WMStrut |
NET::WMWindowType |
@@ -369,7 +369,7 @@ KWin::Info KWin::info( WId win )
w.name = TQString::fromUtf8( inf.name() );
} else {
char* c = 0;
- if ( XFetchName( qt_xdisplay(), win, &c ) != 0 ) {
+ if ( XFetchName( tqt_xdisplay(), win, &c ) != 0 ) {
w.name = TQString::fromLocal8Bit( c );
XFree( c );
}
@@ -404,7 +404,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
TQPixmap result;
#ifdef Q_WS_X11
if( flags & NETWM ) {
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), NET::WMIcon );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMIcon );
NETIcon ni = info.icon( width, height );
if ( ni.data && ni.size.width > 0 && ni.size.height > 0 ) {
TQImage img( (uchar*) ni.data, (int) ni.size.width, (int) ni.size.height, 32, 0, 0, TQImage::IgnoreEndian );
@@ -421,7 +421,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
Pixmap p = None;
Pixmap p_mask = None;
- XWMHints *hints = XGetWMHints(qt_xdisplay(), win );
+ XWMHints *hints = XGetWMHints(tqt_xdisplay(), win );
if (hints && (hints->flags & IconPixmapHint)){
p = hints->icon_pixmap;
}
@@ -437,19 +437,19 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
unsigned int w = 0;
unsigned int h = 0;
unsigned int border_w, depth;
- XGetGeometry(qt_xdisplay(), p, &root,
+ XGetGeometry(tqt_xdisplay(), p, &root,
&x, &y, &w, &h, &border_w, &depth);
if (w > 0 && h > 0){
TQPixmap pm(w, h, depth);
// Always detach before doing something behind QPixmap's back.
pm.detach();
- XCopyArea(qt_xdisplay(), p, pm.handle(),
- qt_xget_temp_gc(qt_xscreen(), depth==1),
+ XCopyArea(tqt_xdisplay(), p, pm.handle(),
+ tqt_xget_temp_gc(tqt_xscreen(), depth==1),
0, 0, w, h, 0, 0);
if (p_mask != None){
TQBitmap bm(w, h);
- XCopyArea(qt_xdisplay(), p_mask, bm.handle(),
- qt_xget_temp_gc(qt_xscreen(), true),
+ XCopyArea(tqt_xdisplay(), p_mask, bm.handle(),
+ tqt_xget_temp_gc(tqt_xscreen(), true),
0, 0, w, h, 0, 0);
pm.setMask(bm);
}
@@ -480,7 +480,7 @@ TQPixmap KWin::icon( WId win, int width, int height, bool scale, int flags )
if( result.isNull() ) {
XClassHint hint;
- if( XGetClassHint( qt_xdisplay(), win, &hint ) ) {
+ if( XGetClassHint( tqt_xdisplay(), win, &hint ) ) {
TQString className = hint.res_class;
TQPixmap pm = KGlobal::instance()->iconLoader()->loadIcon( className.lower(), KIcon::Small, iconWidth,
@@ -517,7 +517,7 @@ void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon )
#ifdef Q_WS_X11
if ( icon.isNull() )
return;
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), 0 );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
TQImage img = TQImage(icon.convertToImage()).convertDepth( 32 );
NETIcon ni;
ni.size.width = img.size().width();
@@ -537,7 +537,7 @@ void KWin::setIcons( WId win, const TQPixmap& icon, const TQPixmap& miniIcon )
void KWin::setType( WId win, NET::WindowType windowType )
{
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), 0 );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
info.setWindowType( windowType );
#endif
}
@@ -545,7 +545,7 @@ void KWin::setType( WId win, NET::WindowType windowType )
void KWin::setState( WId win, unsigned long state )
{
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), NET::WMState );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMState );
info.setState( state, state );
#endif
}
@@ -553,7 +553,7 @@ void KWin::setState( WId win, unsigned long state )
void KWin::clearState( WId win, unsigned long state )
{
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), NET::WMState );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMState );
info.setState( 0, state );
#endif
}
@@ -563,11 +563,11 @@ void KWin::setOpacity( WId win, uint percent )
#ifdef Q_WS_X11
twin_net_create_atoms();
if (percent > 99)
- XDeleteProperty (qt_xdisplay(), win, kde_wm_window_opacity);
+ XDeleteProperty (tqt_xdisplay(), win, kde_wm_window_opacity);
else
{
long opacity = long(0xFFFFFFFF/100.0*percent);
- XChangeProperty(qt_xdisplay(), win, kde_wm_window_opacity, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L);
+ XChangeProperty(tqt_xdisplay(), win, kde_wm_window_opacity, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L);
}
#endif
}
@@ -577,18 +577,18 @@ void KWin::setShadowSize( WId win, uint percent )
#ifdef Q_WS_X11
twin_net_create_atoms();
long shadowSize = long(0xFFFFFFFF/100.0*percent);
- XChangeProperty(qt_xdisplay(), win, kde_wm_window_shadow, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &shadowSize, 1L);
+ XChangeProperty(tqt_xdisplay(), win, kde_wm_window_shadow, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &shadowSize, 1L);
#endif
}
void KWin::setOnAllDesktops( WId win, bool b )
{
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), NET::WMDesktop );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMDesktop );
if ( b )
info.setDesktop( NETWinInfo::OnAllDesktops );
else if ( info.desktop() == NETWinInfo::OnAllDesktops ) {
- NETRootInfo rinfo( qt_xdisplay(), NET::CurrentDesktop );
+ NETRootInfo rinfo( tqt_xdisplay(), NET::CurrentDesktop );
info.setDesktop( rinfo.currentDesktop() );
}
#endif
@@ -597,7 +597,7 @@ void KWin::setOnAllDesktops( WId win, bool b )
void KWin::setOnDesktop( WId win, int desktop )
{
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), NET::WMDesktop );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), NET::WMDesktop );
info.setDesktop( desktop );
#endif
}
@@ -607,7 +607,7 @@ void KWin::setExtendedStrut( WId win, int left_width, int left_start, int left_e
int bottom_width, int bottom_start, int bottom_end )
{
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), 0 );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
NETExtendedStrut strut;
strut.left_width = left_width;
strut.right_width = right_width;
@@ -628,7 +628,7 @@ void KWin::setExtendedStrut( WId win, int left_width, int left_start, int left_e
void KWin::setStrut( WId win, int left, int right, int top, int bottom )
{
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), win, qt_xrootwin(), 0 );
+ NETWinInfo info( tqt_xdisplay(), win, tqt_xrootwin(), 0 );
NETStrut strut;
strut.left = left;
strut.right = right;
@@ -641,11 +641,11 @@ void KWin::setStrut( WId win, int left, int right, int top, int bottom )
int KWin::currentDesktop()
{
#ifdef Q_WS_X11
- if (!qt_xdisplay())
+ if (!tqt_xdisplay())
#endif
return 1;
#ifdef Q_WS_X11
- NETRootInfo info( qt_xdisplay(), NET::CurrentDesktop );
+ NETRootInfo info( tqt_xdisplay(), NET::CurrentDesktop );
return info.currentDesktop();
#endif
}
@@ -653,11 +653,11 @@ int KWin::currentDesktop()
int KWin::numberOfDesktops()
{
#ifdef Q_WS_X11
- if (!qt_xdisplay())
+ if (!tqt_xdisplay())
#endif
return 0;
#ifdef Q_WS_X11
- NETRootInfo info( qt_xdisplay(), NET::NumberOfDesktops );
+ NETRootInfo info( tqt_xdisplay(), NET::NumberOfDesktops );
return info.numberOfDesktops();
#endif
}
@@ -665,7 +665,7 @@ int KWin::numberOfDesktops()
void KWin::setCurrentDesktop( int desktop )
{
#ifdef Q_WS_X11
- NETRootInfo info( qt_xdisplay(), NET::CurrentDesktop );
+ NETRootInfo info( tqt_xdisplay(), NET::CurrentDesktop );
info.setCurrentDesktop( desktop );
#endif
}
@@ -673,7 +673,7 @@ void KWin::setCurrentDesktop( int desktop )
void KWin::setCurrentDesktopViewport( int desktop, TQPoint viewport )
{
#ifdef Q_WS_X11
- NETRootInfo info( qt_xdisplay(), NET::CurrentDesktop );
+ NETRootInfo info( tqt_xdisplay(), NET::CurrentDesktop );
NETPoint netview;
netview.x = viewport.x();
netview.y = viewport.y();
@@ -689,7 +689,7 @@ void KWin::iconifyWindow( WId win, bool animation)
twin_net_create_atoms();
sendClientMessageToRoot( win, kde_wm_change_state, IconicState, 1 );
}
- XIconifyWindow( qt_xdisplay(), win, qt_xscreen() );
+ XIconifyWindow( tqt_xdisplay(), win, tqt_xscreen() );
#endif
}
@@ -702,29 +702,29 @@ void KWin::deIconifyWindow( WId win, bool animation )
twin_net_create_atoms();
sendClientMessageToRoot( win, kde_wm_change_state, NormalState, 1 );
}
- XMapWindow( qt_xdisplay(), win );
+ XMapWindow( tqt_xdisplay(), win );
#endif
}
void KWin::raiseWindow( WId win )
{
#ifdef Q_WS_X11
- NETRootInfo info( qt_xdisplay(), NET::Supported );
+ NETRootInfo info( tqt_xdisplay(), NET::Supported );
if( info.isSupported( NET::WM2RestackWindow ))
info.restackRequest( win, None, Above );
else
- XRaiseWindow( qt_xdisplay(), win );
+ XRaiseWindow( tqt_xdisplay(), win );
#endif
}
void KWin::lowerWindow( WId win )
{
#ifdef Q_WS_X11
- NETRootInfo info( qt_xdisplay(), NET::Supported );
+ NETRootInfo info( tqt_xdisplay(), NET::Supported );
if( info.isSupported( NET::WM2RestackWindow ))
info.restackRequest( win, None, Below );
else
- XLowerWindow( qt_xdisplay(), win );
+ XLowerWindow( tqt_xdisplay(), win );
#endif
}
@@ -787,7 +787,7 @@ KWin::WindowInfo::WindowInfo( WId win, unsigned long properties, unsigned long p
properties |= NET::WMStrut; // will be used as fallback
properties |= NET::XAWMState; // force to get error detection for valid()
unsigned long props[ 2 ] = { properties, properties2 };
- d->info = new NETWinInfo( qt_xdisplay(), win, qt_xrootwin(), props, 2 );
+ d->info = new NETWinInfo( tqt_xdisplay(), win, tqt_xrootwin(), props, 2 );
d->win_ = win;
if( properties & NET::WMName ) {
if( d->info->name() && d->info->name()[ 0 ] != '\0' )
@@ -895,22 +895,22 @@ NETExtendedStrut KWin::WindowInfo::extendedStrut() const
if( str.left != 0 ) {
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;
@@ -1211,7 +1211,7 @@ bool KWin::icccmCompliantMappingState()
#ifdef Q_WS_X11
static enum { noidea, yes, no } wm_is_1_2_compliant = noidea;
if( wm_is_1_2_compliant == noidea ) {
- NETRootInfo info( qt_xdisplay(), NET::Supported );
+ NETRootInfo info( tqt_xdisplay(), NET::Supported );
wm_is_1_2_compliant = info.isSupported( NET::Hidden ) ? yes : no;
}
return wm_is_1_2_compliant == yes;
@@ -1225,7 +1225,7 @@ bool KWin::allowedActionsSupported()
#ifdef Q_WS_X11
static enum { noidea, yes, no } wm_supports_allowed_actions = noidea;
if( wm_supports_allowed_actions == noidea ) {
- NETRootInfo info( qt_xdisplay(), NET::Supported );
+ NETRootInfo info( tqt_xdisplay(), NET::Supported );
wm_supports_allowed_actions = info.isSupported( NET::WM2AllowedActions ) ? yes : no;
}
return wm_supports_allowed_actions == yes;
@@ -1243,15 +1243,15 @@ TQString KWin::readNameProperty( WId win, unsigned long atom )
#endif
TQString result;
#ifdef Q_WS_X11
- if ( XGetTextProperty( qt_xdisplay(), win, &tp, atom ) != 0 && tp.value != NULL )
+ if ( XGetTextProperty( tqt_xdisplay(), win, &tp, atom ) != 0 && tp.value != NULL )
{
if (!twin_UTF8_STRING)
- twin_UTF8_STRING = XInternAtom( qt_xdisplay(), "UTF8_STRING", False);
+ twin_UTF8_STRING = XInternAtom( tqt_xdisplay(), "UTF8_STRING", False);
if ( tp.encoding == twin_UTF8_STRING ) {
result = TQString::fromUtf8 ( (const char*) tp.value );
}
- else if ( XmbTextPropertyToTextList( qt_xdisplay(), &tp, &text, &count) == Success &&
+ else if ( XmbTextPropertyToTextList( tqt_xdisplay(), &tp, &text, &count) == Success &&
text != NULL && count > 0 ) {
result = TQString::fromLocal8Bit( text[0] );
} else if ( tp.encoding == XA_STRING )
diff --git a/tdecore/twinmodule.cpp b/tdecore/twinmodule.cpp
index 72dc0c5b5..adc20f218 100644
--- a/tdecore/twinmodule.cpp
+++ b/tdecore/twinmodule.cpp
@@ -62,7 +62,7 @@ class KWinModulePrivate : public TQWidget, public NETRootInfo4
{
public:
KWinModulePrivate(int _what)
- : TQWidget(0,0), NETRootInfo4( qt_xdisplay(),
+ : TQWidget(0,0), NETRootInfo4( tqt_xdisplay(),
_what >= KWinModule::INFO_WINDOWS ?
windows_properties : desktop_properties,
2,
@@ -202,7 +202,7 @@ TQPoint KWinModulePrivate::currentViewport(int desktop) const
bool KWinModulePrivate::x11Event( XEvent * ev )
{
- if ( ev->xany.window == qt_xrootwin() ) {
+ if ( ev->xany.window == tqt_xrootwin() ) {
int old_current_desktop = currentDesktop();
WId old_active_window = activeWindow();
int old_number_of_desktops = numberOfDesktops();
@@ -244,7 +244,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev )
emit (*mit)->showingDesktopChanged( showingDesktop());
}
} else if ( windows.findIndex( ev->xany.window ) != -1 ){
- NETWinInfo ni( qt_xdisplay(), ev->xany.window, qt_xrootwin(), 0 );
+ NETWinInfo ni( tqt_xdisplay(), ev->xany.window, tqt_xrootwin(), 0 );
unsigned long dirty[ 2 ];
ni.event( ev, dirty, 2 );
if ( ev->type ==PropertyNotify ) {
@@ -296,10 +296,10 @@ void KWinModulePrivate::updateStackingOrder()
void KWinModulePrivate::addClient(Window w)
{
if ( (what >= KWinModule::INFO_WINDOWS) && !TQWidget::find( w ) )
- XSelectInput( qt_xdisplay(), w, PropertyChangeMask | StructureNotifyMask );
+ XSelectInput( tqt_xdisplay(), w, PropertyChangeMask | StructureNotifyMask );
bool emit_strutChanged = false;
if( strutSignalConnected && modules.count() > 0 ) {
- NETWinInfo info( qt_xdisplay(), w, qt_xrootwin(), NET::WMStrut | NET::WMDesktop );
+ NETWinInfo info( tqt_xdisplay(), w, tqt_xrootwin(), NET::WMStrut | NET::WMDesktop );
NETStrut strut = info.strut();
if ( strut.left || strut.top || strut.right || strut.bottom ) {
strutWindows.append( StrutData( w, strut, info.desktop()));
@@ -319,7 +319,7 @@ void KWinModulePrivate::removeClient(Window w)
{
bool emit_strutChanged = removeStrutWindow( w );
if( strutSignalConnected && possibleStrutWindows.findIndex( w ) != -1 && modules.count() > 0 ) {
- NETWinInfo info( qt_xdisplay(), w, qt_xrootwin(), NET::WMStrut );
+ NETWinInfo info( tqt_xdisplay(), w, tqt_xrootwin(), NET::WMStrut );
NETStrut strut = info.strut();
if ( strut.left || strut.top || strut.right || strut.bottom ) {
emit_strutChanged = true;
@@ -417,7 +417,7 @@ TQRect KWinModule::workArea( const TQValueList<WId>& exclude, int desktop ) cons
continue;
strut = (*it2).strut;
} else if( d->possibleStrutWindows.findIndex( *it1 ) != -1 ) {
- NETWinInfo info( qt_xdisplay(), (*it1), qt_xrootwin(), NET::WMStrut | NET::WMDesktop);
+ NETWinInfo info( tqt_xdisplay(), (*it1), tqt_xrootwin(), NET::WMStrut | NET::WMDesktop);
strut = info.strut();
d->possibleStrutWindows.remove( *it1 );
d->strutWindows.append( KWinModulePrivate::StrutData( *it1, info.strut(), info.desktop()));