summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-02 02:14:46 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-02 02:14:46 -0600
commit90a4df90811f0f978ae768939d8567f737e4c553 (patch)
tree057a536138b44495fc3aa26050c159fc6d3ef2ae
parent4fb897b216c41c13f128c71bcc66f60e2dc601c4 (diff)
downloadtdelibs-90a4df90811f0f978ae768939d8567f737e4c553.tar.gz
tdelibs-90a4df90811f0f978ae768939d8567f737e4c553.zip
Rename additional global functions and variables for tqt3
-rw-r--r--arts/kde/kvideowidget.cpp12
-rw-r--r--kded/kded.cpp8
-rw-r--r--khtml/khtmlview.cpp4
-rw-r--r--kio/kfile/kfiledialog.cpp4
-rw-r--r--kio/kpasswdserver/kpasswdserver.cpp2
-rw-r--r--kioslave/http/kcookiejar/kcookiewin.cpp2
-rw-r--r--kmdi/kmdimainfrm.cpp6
-rw-r--r--krandr/libkrandr.cc18
-rw-r--r--krandr/randr.cpp32
-rw-r--r--kstyles/keramik/keramik.cpp2
-rw-r--r--kutils/kcmoduleproxy.cpp4
-rw-r--r--libkscreensaver/kscreensaver.cpp4
-rw-r--r--libkscreensaver/main.cpp2
-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
-rw-r--r--tdefx/kstyle.cpp26
-rw-r--r--tdeprint/kmfactory.cpp4
-rw-r--r--tdeui/kcolordialog.cpp10
-rw-r--r--tdeui/kdetrayproxy/kdetrayproxy.cpp26
-rw-r--r--tdeui/kdialog.cpp6
-rw-r--r--tdeui/kdockwidget.cpp2
-rw-r--r--tdeui/kmainwindow.cpp2
-rw-r--r--tdeui/kmenubar.cpp12
-rw-r--r--tdeui/kmessagebox.cpp20
-rw-r--r--tdeui/kpassivepopup.cpp4
-rw-r--r--tdeui/kpixmapio.cpp26
-rw-r--r--tdeui/krootpixmap.cpp6
-rw-r--r--tdeui/ksharedpixmap.cpp32
-rw-r--r--tdeui/ksystemtray.cpp2
-rw-r--r--tdeui/qxembed.cpp112
-rw-r--r--tdeui/tests/qxembedtest.cpp2
-rw-r--r--tdeui/twindowlistmenu.cpp4
46 files changed, 407 insertions, 407 deletions
diff --git a/arts/kde/kvideowidget.cpp b/arts/kde/kvideowidget.cpp
index 7199a55a6..bc17f32d8 100644
--- a/arts/kde/kvideowidget.cpp
+++ b/arts/kde/kvideowidget.cpp
@@ -65,7 +65,7 @@ bool KFullscreenVideoWidget::x11Event( XEvent *event )
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
if (event->type == ClientMessage &&
event->xclient.message_type ==
- XInternAtom( qt_xdisplay(), "VPO_RESIZE_NOTIFY", False ))
+ XInternAtom( tqt_xdisplay(), "VPO_RESIZE_NOTIFY", False ))
{
videoWidget->resizeNotify( event->xclient.data.l[0], event->xclient.data.l[1] );
}
@@ -202,13 +202,13 @@ TQImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
return TQImage();
// Get 32bit RGBA image data (stored in 1bpp pixmap)
- XGetGeometry( qt_xdisplay(), pixmap, &root, &x, &y, &width, &height, &border, &depth );
+ XGetGeometry( tqt_xdisplay(), pixmap, &root, &x, &y, &width, &height, &border, &depth );
- xImage = XGetImage( qt_xdisplay(), pixmap, 0, 0, width, height, 1, XYPixmap );
+ xImage = XGetImage( tqt_xdisplay(), pixmap, 0, 0, width, height, 1, XYPixmap );
if (xImage == 0)
{
- XFreePixmap( qt_xdisplay(), pixmap );
+ XFreePixmap( tqt_xdisplay(), pixmap );
return TQImage();
}
@@ -217,7 +217,7 @@ TQImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo )
// Free X11 resources and return Qt image
XDestroyImage( xImage );
- XFreePixmap( qt_xdisplay(), pixmap );
+ XFreePixmap( tqt_xdisplay(), pixmap );
return qImage;
#else
@@ -361,7 +361,7 @@ bool KVideoWidget::x11Event( XEvent *event )
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
if (event->type == ClientMessage &&
event->xclient.message_type ==
- XInternAtom( qt_xdisplay(), "VPO_RESIZE_NOTIFY", False ))
+ XInternAtom( tqt_xdisplay(), "VPO_RESIZE_NOTIFY", False ))
{
resizeNotify( event->xclient.data.l[0], event->xclient.data.l[1] );
}
diff --git a/kded/kded.cpp b/kded/kded.cpp
index cc7c565fc..1a0f86445 100644
--- a/kded/kded.cpp
+++ b/kded/kded.cpp
@@ -966,12 +966,12 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
#ifdef Q_WS_X11
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, "kded" );
- XSendEvent( qt_xdisplay(), qt_xrootwin(), False, SubstructureNotifyMask, &e );
+ XSendEvent( tqt_xdisplay(), tqt_xrootwin(), False, SubstructureNotifyMask, &e );
#endif
int result = k.exec(); // keep running
diff --git a/khtml/khtmlview.cpp b/khtml/khtmlview.cpp
index 2db0500b8..2831550c3 100644
--- a/khtml/khtmlview.cpp
+++ b/khtml/khtmlview.cpp
@@ -1283,7 +1283,7 @@ void KHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse )
d->cursor_icon_widget = new TQWidget( NULL, NULL, WX11BypassWM );
XSetWindowAttributes attr;
attr.save_under = True;
- XChangeWindowAttributes( qt_xdisplay(), d->cursor_icon_widget->winId(), CWSaveUnder, &attr );
+ XChangeWindowAttributes( tqt_xdisplay(), d->cursor_icon_widget->winId(), CWSaveUnder, &attr );
d->cursor_icon_widget->resize( icon_pixmap.width(), icon_pixmap.height());
if( icon_pixmap.mask() )
d->cursor_icon_widget->setMask( *icon_pixmap.mask());
@@ -1294,7 +1294,7 @@ void KHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse )
}
TQPoint c_pos = TQCursor::pos();
d->cursor_icon_widget->move( c_pos.x() + 15, c_pos.y() + 15 );
- XRaiseWindow( qt_xdisplay(), d->cursor_icon_widget->winId());
+ XRaiseWindow( tqt_xdisplay(), d->cursor_icon_widget->winId());
TQApplication::flushX();
d->cursor_icon_widget->show();
#endif
diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp
index 87988971f..6bb21d7a1 100644
--- a/kio/kfile/kfiledialog.cpp
+++ b/kio/kfile/kfiledialog.cpp
@@ -1339,7 +1339,7 @@ TQString KFileDialog::getOpenFileNameWId(const TQString& startDir,
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
#ifdef Q_WS_X11
if( parent == NULL && parent_id != 0 )
- XSetTransientForHint( qt_xdisplay(), dlg.winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dlg.winId(), parent_id );
#else
// TODO
#endif
@@ -1621,7 +1621,7 @@ TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& fi
KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
#ifdef Q_WS_X11
if( parent == NULL && parent_id != 0 )
- XSetTransientForHint(qt_xdisplay(), dlg.winId(), parent_id);
+ XSetTransientForHint(tqt_xdisplay(), dlg.winId(), parent_id);
#else
// TODO
#endif
diff --git a/kio/kpasswdserver/kpasswdserver.cpp b/kio/kpasswdserver/kpasswdserver.cpp
index 42cbad3a4..0f7b2cc58 100644
--- a/kio/kpasswdserver/kpasswdserver.cpp
+++ b/kio/kpasswdserver/kpasswdserver.cpp
@@ -387,7 +387,7 @@ KPasswdServer::processRequest()
dlg.setKeepPassword( true );
#ifdef Q_WS_X11
- XSetTransientForHint( qt_xdisplay(), dlg.winId(), request->windowId);
+ XSetTransientForHint( tqt_xdisplay(), dlg.winId(), request->windowId);
#endif
dlgResult = dlg.exec();
diff --git a/kioslave/http/kcookiejar/kcookiewin.cpp b/kioslave/http/kcookiejar/kcookiewin.cpp
index 0ee01d9f0..ca86e0a16 100644
--- a/kioslave/http/kcookiejar/kcookiewin.cpp
+++ b/kioslave/http/kcookiejar/kcookiewin.cpp
@@ -83,7 +83,7 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList,
# ifdef Q_WS_X11
if( cookieList.first()->windowIds().count() > 0 )
{
- XSetTransientForHint( qt_xdisplay(), winId(), cookieList.first()->windowIds().first());
+ XSetTransientForHint( tqt_xdisplay(), winId(), cookieList.first()->windowIds().first());
}
else
{
diff --git a/kmdi/kmdimainfrm.cpp b/kmdi/kmdimainfrm.cpp
index 8e26f96eb..f101ff700 100644
--- a/kmdi/kmdimainfrm.cpp
+++ b/kmdi/kmdimainfrm.cpp
@@ -701,7 +701,7 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
#ifdef Q_WS_X11
if ( mdiMode() == KMdi::ToplevelMode )
{
- XSetTransientForHint( qt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() );
+ XSetTransientForHint( tqt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() );
}
#endif
@@ -711,7 +711,7 @@ void KMdiMainFrm::detachWindow( KMdiChildView *pWnd, bool bShow )
#ifdef Q_WS_X11
if ( mdiMode() == KMdi::ToplevelMode )
{
- XSetTransientForHint( qt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() );
+ XSetTransientForHint( tqt_xdisplay(), pWnd->winId(), topLevelWidget() ->winId() );
}
#endif
@@ -1422,7 +1422,7 @@ void KMdiMainFrm::switchToToplevelMode()
for ( kmdicvit.toFirst(); ( *kmdicvit ); ++kmdicvit )
{
#ifdef Q_WS_X11
- XSetTransientForHint( qt_xdisplay(), ( *kmdicvit )->winId(), winId() );
+ XSetTransientForHint( tqt_xdisplay(), ( *kmdicvit )->winId(), winId() );
#endif
( *kmdicvit )->show();
}
diff --git a/krandr/libkrandr.cc b/krandr/libkrandr.cc
index b4f21e5fe..633411041 100644
--- a/krandr/libkrandr.cc
+++ b/krandr/libkrandr.cc
@@ -138,7 +138,7 @@ TQString KRandrSimpleAPI::applyIccFile(TQString screenName, TQString fileName) {
if (isValid() == true) {
screenNumber = -1;
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
if (randr_screen_info == NULL) {
return "";
@@ -203,7 +203,7 @@ TQString KRandrSimpleAPI::applyIccFile(TQString screenName, TQString fileName) {
if (isValid() == true) {
screenNumber = -1;
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
if (randr_screen_info == NULL) {
return "";
@@ -272,7 +272,7 @@ TQString KRandrSimpleAPI::applyIccConfiguration(TQString profileName, TQString k
// Find all screens
if (isValid() == true) {
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
if (randr_screen_info == NULL) {
return "";
@@ -597,7 +597,7 @@ bool KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQPtrList<SingleScreen
TQString command;
command = "xrandr";
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
for (i = 0; i < screenInfoArray.count(); i++) {
screendata = screenInfoArray.at(i);
@@ -658,7 +658,7 @@ bool KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQPtrList<SingleScreen
}
}
#else
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
// Turn off all displays
for (i = 0; i < screenInfoArray.count(); i++) {
@@ -899,7 +899,7 @@ void KRandrSimpleAPI::applySystemwideDisplayGamma(TQPtrList<SingleScreenData> sc
SingleScreenData *screendata;
if (isValid() == true) {
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
for (i = 0; i < screenInfoArray.count(); i++) {
screendata = screenInfoArray.at(i);
@@ -951,7 +951,7 @@ void KRandrSimpleAPI::applySystemwideDisplayDPMS(TQPtrList<SingleScreenData> scr
SingleScreenData *screendata;
if (isValid() == true) {
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
for (i = 0; i < screenInfoArray.count(); i++) {
screendata = screenInfoArray.at(i);
@@ -1006,7 +1006,7 @@ TQPtrList<SingleScreenData> KRandrSimpleAPI::readCurrentDisplayConfiguration() {
int numberOfScreens = 0;
if (isValid() == true) {
- randr_display = qt_xdisplay();
+ randr_display = tqt_xdisplay();
randr_screen_info = read_screen_info(randr_display);
for (i = 0; i < randr_screen_info->n_output; i++) {
output_info = randr_screen_info->outputs[i]->info;
@@ -1129,7 +1129,7 @@ TQPtrList<SingleScreenData> KRandrSimpleAPI::readCurrentDisplayConfiguration() {
screendata->supports_transformations = (cur_screen->rotations() != RandRScreen::Rotate0);
// Determine if this display is primary and/or extended
- RROutput primaryoutput = XRRGetOutputPrimary(qt_xdisplay(), DefaultRootWindow(qt_xdisplay()));
+ RROutput primaryoutput = XRRGetOutputPrimary(tqt_xdisplay(), DefaultRootWindow(tqt_xdisplay()));
if (primaryoutput == randr_screen_info->outputs[i]->id)
screendata->is_primary = false;
else
diff --git a/krandr/randr.cpp b/krandr/randr.cpp
index eb71a818a..3a8e77169 100644
--- a/krandr/randr.cpp
+++ b/krandr/randr.cpp
@@ -72,7 +72,7 @@ KDE_EXPORT void RandRScreen::loadSettings()
if (d->config)
XRRFreeScreenConfigInfo(d->config);
- d->config = XRRGetScreenInfo(qt_xdisplay(), RootWindow(qt_xdisplay(), m_screen));
+ d->config = XRRGetScreenInfo(tqt_xdisplay(), RootWindow(tqt_xdisplay(), m_screen));
Rotation rotation;
if (d->config) {
@@ -89,17 +89,17 @@ KDE_EXPORT void RandRScreen::loadSettings()
if (d->config) {
int numSizes;
- XRRScreenSize* sizes = XRRSizes(qt_xdisplay(), m_screen, &numSizes);
+ XRRScreenSize* sizes = XRRSizes(tqt_xdisplay(), m_screen, &numSizes);
for (int i = 0; i < numSizes; i++) {
m_pixelSizes.append(TQSize(sizes[i].width, sizes[i].height));
m_mmSizes.append(TQSize(sizes[i].mwidth, sizes[i].mheight));
}
- m_rotations = XRRRotations(qt_xdisplay(), m_screen, &rotation);
+ m_rotations = XRRRotations(tqt_xdisplay(), m_screen, &rotation);
}
else {
// Great, now we have to go after the information manually. Ughh.
- ScreenInfo *screeninfo = internal_read_screen_info(qt_xdisplay());
+ ScreenInfo *screeninfo = internal_read_screen_info(tqt_xdisplay());
XRROutputInfo *output_info = screeninfo->outputs[m_screen]->info;
CrtcInfo *current_crtc = screeninfo->outputs[m_screen]->cur_crtc;
int numSizes = screeninfo->res->nmode;
@@ -138,24 +138,24 @@ KDE_EXPORT bool RandRScreen::applyProposed()
Status status;
if (!d->config) {
- d->config = XRRGetScreenInfo(qt_xdisplay(), RootWindow(qt_xdisplay(), m_screen));
+ d->config = XRRGetScreenInfo(tqt_xdisplay(), RootWindow(tqt_xdisplay(), m_screen));
Q_ASSERT(d->config);
}
if (d->config) {
if (proposedRefreshRate() < 0)
- status = XRRSetScreenConfig(qt_xdisplay(), d->config, DefaultRootWindow(qt_xdisplay()), (SizeID)proposedSize(), (Rotation)proposedRotation(), CurrentTime);
+ status = XRRSetScreenConfig(tqt_xdisplay(), d->config, DefaultRootWindow(tqt_xdisplay()), (SizeID)proposedSize(), (Rotation)proposedRotation(), CurrentTime);
else {
if( refreshRateIndexToHz(proposedSize(), proposedRefreshRate()) <= 0 ) {
m_proposedRefreshRate = 0;
}
- status = XRRSetScreenConfigAndRate(qt_xdisplay(), d->config, DefaultRootWindow(qt_xdisplay()), (SizeID)proposedSize(), (Rotation)proposedRotation(), refreshRateIndexToHz(proposedSize(), proposedRefreshRate()), CurrentTime);
+ status = XRRSetScreenConfigAndRate(tqt_xdisplay(), d->config, DefaultRootWindow(tqt_xdisplay()), (SizeID)proposedSize(), (Rotation)proposedRotation(), refreshRateIndexToHz(proposedSize(), proposedRefreshRate()), CurrentTime);
}
}
else {
// Great, now we have to set the information manually. Ughh.
// FIXME--this does not work!
- ScreenInfo *screeninfo = internal_read_screen_info(qt_xdisplay());
+ ScreenInfo *screeninfo = internal_read_screen_info(tqt_xdisplay());
screeninfo->cur_width = (*m_pixelSizes.at(proposedSize())).width();
screeninfo->cur_height = (*m_pixelSizes.at(proposedSize())).height();
internal_main_low_apply(screeninfo);
@@ -441,14 +441,14 @@ KDE_EXPORT TQStringList RandRScreen::refreshRates(int size) const
TQStringList ret;
if (d->config) {
- short* rates = XRRRates(qt_xdisplay(), m_screen, (SizeID)size, &nrates);
+ short* rates = XRRRates(tqt_xdisplay(), m_screen, (SizeID)size, &nrates);
for (int i = 0; i < nrates; i++)
ret << refreshRateDirectDescription(rates[i]);
}
else {
// Great, now we have to go after the information manually. Ughh.
- ScreenInfo *screeninfo = internal_read_screen_info(qt_xdisplay());
+ ScreenInfo *screeninfo = internal_read_screen_info(tqt_xdisplay());
int numSizes = screeninfo->res->nmode;
for (int i = 0; i < numSizes; i++) {
int refresh_rate = ((screeninfo->res->modes[i].dotClock*1.0)/((screeninfo->res->modes[i].hTotal)*(screeninfo->res->modes[i].vTotal)*1.0));
@@ -505,7 +505,7 @@ KDE_EXPORT int RandRScreen::proposedRefreshRate() const
KDE_EXPORT int RandRScreen::refreshRateHzToIndex(int size, int hz) const
{
int nrates;
- short* rates = XRRRates(qt_xdisplay(), m_screen, (SizeID)size, &nrates);
+ short* rates = XRRRates(tqt_xdisplay(), m_screen, (SizeID)size, &nrates);
for (int i = 0; i < nrates; i++)
if (hz == rates[i])
@@ -521,7 +521,7 @@ KDE_EXPORT int RandRScreen::refreshRateHzToIndex(int size, int hz) const
KDE_EXPORT int RandRScreen::refreshRateIndexToHz(int size, int index) const
{
int nrates;
- short* rates = XRRRates(qt_xdisplay(), m_screen, (SizeID)size, &nrates);
+ short* rates = XRRRates(tqt_xdisplay(), m_screen, (SizeID)size, &nrates);
if (nrates == 0 || index < 0)
return 0;
@@ -622,7 +622,7 @@ KDE_EXPORT RandRDisplay::RandRDisplay()
: m_valid(true)
{
// Check extension
- Status s = XRRQueryExtension(qt_xdisplay(), &m_eventBase, &m_errorBase);
+ Status s = XRRQueryExtension(tqt_xdisplay(), &m_eventBase, &m_errorBase);
if (!s) {
m_errorCode = TQString("%1, base %1").arg(s).arg(m_errorBase);
m_valid = false;
@@ -644,14 +644,14 @@ KDE_EXPORT RandRDisplay::RandRDisplay()
}
int major_version, minor_version;
- XRRQueryVersion(qt_xdisplay(), &major_version, &minor_version);
+ XRRQueryVersion(tqt_xdisplay(), &major_version, &minor_version);
m_version = TQString("X Resize and Rotate extension version %1.%1").arg(major_version).arg(minor_version);
- m_numScreens = ScreenCount(qt_xdisplay());
+ m_numScreens = ScreenCount(tqt_xdisplay());
// This assumption is WRONG with Xinerama
- // Q_ASSERT(TQApplication::desktop()->numScreens() == ScreenCount(qt_xdisplay()));
+ // Q_ASSERT(TQApplication::desktop()->numScreens() == ScreenCount(tqt_xdisplay()));
m_screens.setAutoDelete(true);
for (int i = 0; i < m_numScreens; i++) {
diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp
index 8ebbe8683..3156ab307 100644
--- a/kstyles/keramik/keramik.cpp
+++ b/kstyles/keramik/keramik.cpp
@@ -2806,7 +2806,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
{3, resize->size().height()-3, resize->size().width()-7, 1}
};
- XShapeCombineRectangles(qt_xdisplay(), listbox->handle(), ShapeBounding, 0, 0,
+ XShapeCombineRectangles(tqt_xdisplay(), listbox->handle(), ShapeBounding, 0, 0,
rects, 5, ShapeSet, YXSorted);
}
break;
diff --git a/kutils/kcmoduleproxy.cpp b/kutils/kcmoduleproxy.cpp
index 877dacb2a..e0074defe 100644
--- a/kutils/kcmoduleproxy.cpp
+++ b/kutils/kcmoduleproxy.cpp
@@ -399,7 +399,7 @@ void KCModuleProxy::rootExited()
kdDebug(711) << k_funcinfo << endl;
if ( d->embedWidget->embeddedWinId() )
- XDestroyWindow(qt_xdisplay(), d->embedWidget->embeddedWinId());
+ XDestroyWindow(tqt_xdisplay(), d->embedWidget->embeddedWinId());
delete d->embedWidget;
d->embedWidget = 0;
@@ -436,7 +436,7 @@ KCModuleProxy::~KCModuleProxy()
void KCModuleProxy::deleteClient()
{
if( d->embedWidget )
- XKillClient(qt_xdisplay(), d->embedWidget->embeddedWinId());
+ XKillClient(tqt_xdisplay(), d->embedWidget->embeddedWinId());
delete d->kcm;
diff --git a/libkscreensaver/kscreensaver.cpp b/libkscreensaver/kscreensaver.cpp
index 92aa8f931..2b45c9a0f 100644
--- a/libkscreensaver/kscreensaver.cpp
+++ b/libkscreensaver/kscreensaver.cpp
@@ -55,7 +55,7 @@ KScreenSaver::KScreenSaver( WId id ) : TQWidget()
if ( id )
{
#ifdef Q_WS_X11 //FIXME
- XGetGeometry(qt_xdisplay(), (Drawable)id, &root, &ai, &ai,
+ XGetGeometry(tqt_xdisplay(), (Drawable)id, &root, &ai, &ai,
&w, &h, &au, &au);
#endif
@@ -79,7 +79,7 @@ void KScreenSaver::embed( TQWidget *w )
{
KApplication::sendPostedEvents();
#ifdef Q_WS_X11 //FIXME
- XReparentWindow(qt_xdisplay(), w->winId(), winId(), 0, 0);
+ XReparentWindow(tqt_xdisplay(), w->winId(), winId(), 0, 0);
#endif
w->setGeometry( 0, 0, width(), height() );
KApplication::sendPostedEvents();
diff --git a/libkscreensaver/main.cpp b/libkscreensaver/main.cpp
index e80dd6bff..0ff7c0a1b 100644
--- a/libkscreensaver/main.cpp
+++ b/libkscreensaver/main.cpp
@@ -127,7 +127,7 @@ KDE_EXPORT int main(int argc, char *argv[])
#ifdef Q_WS_X11 //FIXME
if (args->isSet("root"))
{
- saveWin = RootWindow(qt_xdisplay(), qt_xscreen());
+ saveWin = RootWindow(tqt_xdisplay(), tqt_xscreen());
}
#endif
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()));
diff --git a/tdefx/kstyle.cpp b/tdefx/kstyle.cpp
index ce84e2f50..d4cb9bda4 100644
--- a/tdefx/kstyle.cpp
+++ b/tdefx/kstyle.cpp
@@ -57,7 +57,7 @@
# include <X11/Xlib.h>
# ifdef HAVE_XRENDER
# include <X11/extensions/Xrender.h> // schroder
- extern bool qt_use_xrender;
+ extern bool tqt_use_xrender;
# endif
#else
#undef HAVE_XRENDER
@@ -2130,8 +2130,8 @@ void TransparencyHandler::createShadowWindows(const TQWidget* p)
se.w2 = new TQWidget(0, 0, (WFlags)(WStyle_Customize | WType_Popup | WX11BypassWM) );
se.w1->setGeometry(shadow1);
se.w2->setGeometry(shadow2);
- XSelectInput(qt_xdisplay(), se.w1->winId(), StructureNotifyMask );
- XSelectInput(qt_xdisplay(), se.w2->winId(), StructureNotifyMask );
+ XSelectInput(tqt_xdisplay(), se.w1->winId(), StructureNotifyMask );
+ XSelectInput(tqt_xdisplay(), se.w2->winId(), StructureNotifyMask );
// Insert a new ShadowMap entry
shadowMap()[p] = se;
@@ -2144,9 +2144,9 @@ void TransparencyHandler::createShadowWindows(const TQWidget* p)
pix_shadow2 = TQPixmap(shadow2.width(), shadow2.height());
}
else {
- pix_shadow1 = TQPixmap::grabWindow(qt_xrootwin(),
+ pix_shadow1 = TQPixmap::grabWindow(tqt_xrootwin(),
shadow1.x(), shadow1.y(), shadow1.width(), shadow1.height());
- pix_shadow2 = TQPixmap::grabWindow(qt_xrootwin(),
+ pix_shadow2 = TQPixmap::grabWindow(tqt_xrootwin(),
shadow2.x(), shadow2.y(), shadow2.width(), shadow2.height());
}
@@ -2166,8 +2166,8 @@ void TransparencyHandler::createShadowWindows(const TQWidget* p)
// Show the 'shadow' just before showing the popup menu window
// Don't use TQWidget::show() so we don't confuse QEffects, thus causing broken focus.
- XMapWindow(qt_xdisplay(), se.w1->winId());
- XMapWindow(qt_xdisplay(), se.w2->winId());
+ XMapWindow(tqt_xdisplay(), se.w1->winId());
+ XMapWindow(tqt_xdisplay(), se.w2->winId());
#else
Q_UNUSED( p )
#endif
@@ -2180,9 +2180,9 @@ void TransparencyHandler::removeShadowWindows(const TQWidget* p)
if (it != shadowMap().end())
{
ShadowElements se = it.data();
- XUnmapWindow(qt_xdisplay(), se.w1->winId()); // hide
- XUnmapWindow(qt_xdisplay(), se.w2->winId());
- XFlush(qt_xdisplay()); // try to hide faster
+ XUnmapWindow(tqt_xdisplay(), se.w1->winId()); // hide
+ XUnmapWindow(tqt_xdisplay(), se.w2->winId());
+ XFlush(tqt_xdisplay()); // try to hide faster
delete se.w1;
delete se.w2;
shadowMap().erase(it);
@@ -2207,13 +2207,13 @@ bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event )
// Handle translucency
if (te != Disabled)
{
- pix = TQPixmap::grabWindow(qt_xrootwin(),
+ pix = TQPixmap::grabWindow(tqt_xrootwin(),
p->x(), p->y(), p->width(), p->height());
switch (te) {
#ifdef HAVE_XRENDER
case XRender:
- if (qt_use_xrender) {
+ if (tqt_use_xrender) {
XRenderBlendToPixmap(p);
break;
}
@@ -2320,7 +2320,7 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p)
else
renderPix.fill(p->colorGroup().button()); // Just tint as the default behavior
- Display* dpy = qt_xdisplay();
+ Display* dpy = tqt_xdisplay();
Pixmap alphaPixmap;
Picture alphaPicture;
XRenderPictFormat Rpf;
diff --git a/tdeprint/kmfactory.cpp b/tdeprint/kmfactory.cpp
index 67fbd98ca..fe6470d9e 100644
--- a/tdeprint/kmfactory.cpp
+++ b/tdeprint/kmfactory.cpp
@@ -50,7 +50,7 @@
#define UNLOAD_OBJECT(x) if (x != 0) { delete x; x = 0; }
#ifdef Q_WS_X11
-extern void qt_generate_epsf( bool b );
+extern void tqt_generate_epsf( bool b );
#endif
KMFactory* KMFactory::m_self = 0;
@@ -102,7 +102,7 @@ KMFactory::KMFactory()
// If this is a problem for anyone, we can add a public method to set this flag.
// (David Faure, doing as advised by Lars Knoll)
#ifdef Q_WS_X11
- qt_generate_epsf( false );
+ tqt_generate_epsf( false );
#endif
#endif
diff --git a/tdeui/kcolordialog.cpp b/tdeui/kcolordialog.cpp
index ac0251107..ec3930fa3 100644
--- a/tdeui/kcolordialog.cpp
+++ b/tdeui/kcolordialog.cpp
@@ -70,7 +70,7 @@
// defined in qapplication_x11.cpp
typedef int (*QX11EventFilter) (XEvent*);
-extern QX11EventFilter qt_set_x11_event_filter (QX11EventFilter filter);
+extern QX11EventFilter tqt_set_x11_event_filter (QX11EventFilter filter);
#endif
struct ColorPaletteNameType
@@ -1179,7 +1179,7 @@ KColorDialog::~KColorDialog()
{
#ifdef Q_WS_X11
if (d->bColorPicking)
- qt_set_x11_event_filter(d->oldfilter);
+ tqt_set_x11_event_filter(d->oldfilter);
#endif
delete d;
}
@@ -1504,7 +1504,7 @@ KColorDialog::slotColorPicker()
{
d->bColorPicking = true;
#ifdef Q_WS_X11
- d->oldfilter = qt_set_x11_event_filter(kde_color_dlg_handler);
+ d->oldfilter = tqt_set_x11_event_filter(kde_color_dlg_handler);
#endif
kde_color_dlg_widget = this;
grabMouse( tqcrossCursor );
@@ -1518,7 +1518,7 @@ KColorDialog::mouseReleaseEvent( TQMouseEvent *e )
{
d->bColorPicking = false;
#ifdef Q_WS_X11
- qt_set_x11_event_filter(d->oldfilter);
+ tqt_set_x11_event_filter(d->oldfilter);
d->oldfilter = 0;
#endif
releaseMouse();
@@ -1547,7 +1547,7 @@ KColorDialog::keyPressEvent( TQKeyEvent *e )
{
d->bColorPicking = false;
#ifdef Q_WS_X11
- qt_set_x11_event_filter(d->oldfilter);
+ tqt_set_x11_event_filter(d->oldfilter);
d->oldfilter = 0;
#endif
releaseMouse();
diff --git a/tdeui/kdetrayproxy/kdetrayproxy.cpp b/tdeui/kdetrayproxy/kdetrayproxy.cpp
index 7cb621bd8..c6302a3cc 100644
--- a/tdeui/kdetrayproxy/kdetrayproxy.cpp
+++ b/tdeui/kdetrayproxy/kdetrayproxy.cpp
@@ -45,12 +45,12 @@ KDETrayProxy::KDETrayProxy()
Atom KDETrayProxy::makeSelectionAtom()
{
- return XInternAtom( qt_xdisplay(), "_NET_SYSTEM_TRAY_S" + TQCString().setNum( qt_xscreen()), False );
+ return XInternAtom( tqt_xdisplay(), "_NET_SYSTEM_TRAY_S" + TQCString().setNum( tqt_xscreen()), False );
}
void KDETrayProxy::windowAdded( WId w )
{
- NETWinInfo ni( qt_xdisplay(), w, qt_xrootwin(), NET::WMKDESystemTrayWinFor );
+ NETWinInfo ni( tqt_xdisplay(), w, tqt_xrootwin(), NET::WMKDESystemTrayWinFor );
WId trayWinFor = ni.kdeSystemTrayWinFor();
if ( !trayWinFor ) // not a KDE tray window
return;
@@ -93,7 +93,7 @@ bool KDETrayProxy::x11Event( XEvent* e )
}
if( e->type == ReparentNotify && tray_windows.contains( e->xreparent.window ))
{
- if( e->xreparent.parent == qt_xrootwin())
+ if( e->xreparent.parent == tqt_xrootwin())
{
if( !docked_windows.contains( e->xreparent.window ) || e->xreparent.serial >= docked_windows[ e->xreparent.window ] )
{
@@ -114,7 +114,7 @@ bool KDETrayProxy::x11Event( XEvent* e )
if( docked_windows.contains( e->xunmap.window ) && e->xunmap.serial >= docked_windows[ e->xunmap.window ] )
{
// kdDebug() << "Window unmapped:" << e->xunmap.window << endl;
- XReparentWindow( qt_xdisplay(), e->xunmap.window, qt_xrootwin(), 0, 0 );
+ XReparentWindow( tqt_xdisplay(), e->xunmap.window, tqt_xrootwin(), 0, 0 );
// ReparentNotify will take care of the rest
}
}
@@ -124,21 +124,21 @@ bool KDETrayProxy::x11Event( XEvent* e )
void KDETrayProxy::dockWindow( Window w, Window owner )
{
// kdDebug() << "Docking " << w << " into " << owner << endl;
- docked_windows[ w ] = XNextRequest( qt_xdisplay());
- static Atom prop = XInternAtom( qt_xdisplay(), "_XEMBED_INFO", False );
+ docked_windows[ w ] = XNextRequest( tqt_xdisplay());
+ static Atom prop = XInternAtom( tqt_xdisplay(), "_XEMBED_INFO", False );
long data[ 2 ] = { 0, 1 };
- XChangeProperty( qt_xdisplay(), w, prop, prop, 32, PropModeReplace, (unsigned char*)data, 2 );
+ XChangeProperty( tqt_xdisplay(), w, prop, prop, 32, PropModeReplace, (unsigned char*)data, 2 );
XSizeHints hints;
hints.flags = PMinSize | PMaxSize;
hints.min_width = 24;
hints.max_width = 24;
hints.min_height = 24;
hints.max_height = 24;
- XSetWMNormalHints( qt_xdisplay(), w, &hints );
+ XSetWMNormalHints( tqt_xdisplay(), w, &hints );
// kxerrorhandler ?
XEvent ev;
memset(&ev, 0, sizeof( ev ));
- static Atom atom = XInternAtom( qt_xdisplay(), "_NET_SYSTEM_TRAY_OPCODE", False );
+ static Atom atom = XInternAtom( tqt_xdisplay(), "_NET_SYSTEM_TRAY_OPCODE", False );
ev.xclient.type = ClientMessage;
ev.xclient.window = owner;
ev.xclient.message_type = atom;
@@ -148,20 +148,20 @@ void KDETrayProxy::dockWindow( Window w, Window owner )
ev.xclient.data.l[ 2 ] = w;
ev.xclient.data.l[ 3 ] = 0; // unused
ev.xclient.data.l[ 4 ] = 0; // unused
- XSendEvent( qt_xdisplay(), owner, False, NoEventMask, &ev );
+ XSendEvent( tqt_xdisplay(), owner, False, NoEventMask, &ev );
}
void KDETrayProxy::withdrawWindow( Window w )
{
- XWithdrawWindow( qt_xdisplay(), w, qt_xscreen());
- static Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False );
+ XWithdrawWindow( tqt_xdisplay(), w, tqt_xscreen());
+ static Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False );
for(;;)
{
Atom type;
int format;
unsigned long length, after;
unsigned char *data;
- int r = XGetWindowProperty( qt_xdisplay(), w, wm_state, 0, 2,
+ int r = XGetWindowProperty( tqt_xdisplay(), w, wm_state, 0, 2,
False, AnyPropertyType, &type, &format,
&length, &after, &data );
bool withdrawn = true;
diff --git a/tdeui/kdialog.cpp b/tdeui/kdialog.cpp
index f1fc79061..2d4d53977 100644
--- a/tdeui/kdialog.cpp
+++ b/tdeui/kdialog.cpp
@@ -130,7 +130,7 @@ void KDialog::setPlainCaption( const TQString &caption )
TQDialog::setCaption( caption );
#ifdef Q_WS_X11
- NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 );
+ NETWinInfo info( tqt_xdisplay(), winId(), tqt_xrootwin(), 0 );
info.setName( caption.utf8().data() );
#endif
}
@@ -398,8 +398,8 @@ KSMModalDialog::KSMModalDialog(TQWidget* parent)
{
// Signal that we do not want any window controls to be shown at all
Atom kde_wm_system_modal_notification;
- kde_wm_system_modal_notification = XInternAtom(qt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False);
- XChangeProperty(qt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
+ kde_wm_system_modal_notification = XInternAtom(tqt_xdisplay(), "_KDE_WM_MODAL_SYS_NOTIFICATION", False);
+ XChangeProperty(tqt_xdisplay(), winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L);
TQVBoxLayout* vbox = new TQVBoxLayout( this );
diff --git a/tdeui/kdockwidget.cpp b/tdeui/kdockwidget.cpp
index 591b7bb06..258dd72d0 100644
--- a/tdeui/kdockwidget.cpp
+++ b/tdeui/kdockwidget.cpp
@@ -820,7 +820,7 @@ void KDockWidget::applyToWidget( TQWidget* s, const TQPoint& p )
#ifndef NO_KDE2
#ifdef Q_WS_X11
if (d->transient && d->_parent)
- XSetTransientForHint( qt_xdisplay(), winId(), d->_parent->winId() );
+ XSetTransientForHint( tqt_xdisplay(), winId(), d->_parent->winId() );
#ifdef BORDERLESS_WINDOWS
KWin::setType( winId(), NET::Override); //d->windowType );
diff --git a/tdeui/kmainwindow.cpp b/tdeui/kmainwindow.cpp
index f4292029d..ffb59588b 100644
--- a/tdeui/kmainwindow.cpp
+++ b/tdeui/kmainwindow.cpp
@@ -592,7 +592,7 @@ void KMainWindow::setPlainCaption( const TQString &caption )
{
TQMainWindow::setCaption( caption );
#if defined Q_WS_X11
- NETWinInfo info( qt_xdisplay(), winId(), qt_xrootwin(), 0 );
+ NETWinInfo info( tqt_xdisplay(), winId(), tqt_xrootwin(), 0 );
info.setName( caption.utf8().data() );
#endif
}
diff --git a/tdeui/kmenubar.cpp b/tdeui/kmenubar.cpp
index 7c13b6911..7f6983275 100644
--- a/tdeui/kmenubar.cpp
+++ b/tdeui/kmenubar.cpp
@@ -109,11 +109,11 @@ static
void initAtoms()
{
char nm[ 100 ];
- sprintf( nm, "_KDE_TOPMENU_OWNER_S%d", DefaultScreen( qt_xdisplay()));
+ sprintf( nm, "_KDE_TOPMENU_OWNER_S%d", DefaultScreen( tqt_xdisplay()));
char nm2[] = "_KDE_TOPMENU_MINSIZE";
char* names[ 2 ] = { nm, nm2 };
Atom atoms[ 2 ];
- XInternAtoms( qt_xdisplay(), names, 2, False, atoms );
+ XInternAtoms( tqt_xdisplay(), names, 2, False, atoms );
selection_atom = atoms[ 0 ];
msg_type_atom = atoms[ 1 ];
}
@@ -178,7 +178,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
{
#ifdef Q_WS_X11
d->selection = new KSelectionWatcher( KMenuBarPrivate::makeSelectionAtom(),
- DefaultScreen( qt_xdisplay()));
+ DefaultScreen( tqt_xdisplay()));
connect( d->selection, TQT_SIGNAL( newOwner( Window )),
this, TQT_SLOT( updateFallbackSize()));
connect( d->selection, TQT_SIGNAL( lostOwner()),
@@ -193,7 +193,7 @@ void KMenuBar::setTopLevelMenuInternal(bool top_level)
#ifdef Q_WS_X11
KWin::setType( winId(), NET::TopMenu );
if( parentWidget())
- XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
+ XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
#endif
TQMenuBar::setFrameStyle( NoFrame );
TQMenuBar::setLineWidth( 0 );
@@ -260,7 +260,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
if( parentWidget() && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(parentWidget()) && ev->type() == TQEvent::Reparent )
{
#ifdef Q_WS_X11
- XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
+ XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
#else
//TODO: WIN32?
#endif
@@ -271,7 +271,7 @@ bool KMenuBar::eventFilter(TQObject *obj, TQEvent *ev)
if( ev->type() == TQEvent::Show )
{
#ifdef Q_WS_X11
- XSetTransientForHint( qt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
+ XSetTransientForHint( tqt_xdisplay(), winId(), parentWidget()->topLevelWidget()->winId());
#else
//TODO: WIN32?
#endif
diff --git a/tdeui/kmessagebox.cpp b/tdeui/kmessagebox.cpp
index 8ffdc0e6d..ee526dcdb 100644
--- a/tdeui/kmessagebox.cpp
+++ b/tdeui/kmessagebox.cpp
@@ -434,7 +434,7 @@ KMessageBox::questionYesNoListWId(WId parent_id, const TQString &text,
dialog->setPlainCaption( caption );
#ifdef Q_WS_X11
if( parent == NULL && parent_id )
- XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif
bool checkboxResult = false;
@@ -485,7 +485,7 @@ KMessageBox::questionYesNoCancelWId(WId parent_id,
dialog->setPlainCaption( caption );
#ifdef Q_WS_X11
if( parent == NULL && parent_id )
- XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif
bool checkboxResult = false;
@@ -567,7 +567,7 @@ KMessageBox::warningYesNoListWId(WId parent_id, const TQString &text,
dialog->setPlainCaption( caption );
#ifdef Q_WS_X11
if( parent == NULL && parent_id )
- XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif
bool checkboxResult = false;
@@ -639,7 +639,7 @@ KMessageBox::warningContinueCancelListWId(WId parent_id, const TQString &text,
dialog->setPlainCaption( caption );
#ifdef Q_WS_X11
if( parent == NULL && parent_id )
- XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif
bool checkboxResult = false;
@@ -715,7 +715,7 @@ KMessageBox::warningYesNoCancelListWId(WId parent_id, const TQString &text,
dialog->setPlainCaption( caption );
#ifdef Q_WS_X11
if( parent == NULL && parent_id )
- XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif
bool checkboxResult = false;
@@ -766,7 +766,7 @@ KMessageBox::errorListWId(WId parent_id, const TQString &text, const TQStringLi
dialog->setPlainCaption( caption );
#ifdef Q_WS_X11
if( parent == NULL && parent_id )
- XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif
createKMessageBox(dialog, TQMessageBox::Critical, text, strlist, TQString::null, 0, options);
@@ -796,7 +796,7 @@ KMessageBox::detailedErrorWId(WId parent_id, const TQString &text,
dialog->setPlainCaption( caption );
#ifdef Q_WS_X11
if( parent == NULL && parent_id )
- XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif
createKMessageBox(dialog, TQMessageBox::Critical, text, TQStringList(), TQString::null, 0, options, details);
@@ -843,7 +843,7 @@ KMessageBox::sorryWId(WId parent_id, const TQString &text,
dialog->setPlainCaption( caption );
#ifdef Q_WS_X11
if( parent == NULL && parent_id )
- XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif
createKMessageBox(dialog, TQMessageBox::Warning, text, TQStringList(), TQString::null, 0, options);
@@ -873,7 +873,7 @@ KMessageBox::detailedSorryWId(WId parent_id, const TQString &text,
dialog->setPlainCaption( caption );
#ifdef Q_WS_X11
if( parent == NULL && parent_id )
- XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif
createKMessageBox(dialog, TQMessageBox::Warning, text, TQStringList(), TQString::null, 0, options, details);
@@ -919,7 +919,7 @@ KMessageBox::informationListWId(WId parent_id,const TQString &text, const TQStri
dialog->setPlainCaption( caption );
#ifdef Q_WS_X11
if( parent == NULL && parent_id )
- XSetTransientForHint( qt_xdisplay(), dialog->winId(), parent_id );
+ XSetTransientForHint( tqt_xdisplay(), dialog->winId(), parent_id );
#endif
bool checkboxResult = false;
diff --git a/tdeui/kpassivepopup.cpp b/tdeui/kpassivepopup.cpp
index b348e1040..1e86bc57f 100644
--- a/tdeui/kpassivepopup.cpp
+++ b/tdeui/kpassivepopup.cpp
@@ -234,7 +234,7 @@ void KPassivePopup::hideEvent( TQHideEvent * )
TQRect KPassivePopup::defaultArea() const
{
#ifdef Q_WS_X11
- NETRootInfo info( qt_xdisplay(),
+ NETRootInfo info( tqt_xdisplay(),
NET::NumberOfDesktops |
NET::CurrentDesktop |
NET::WorkArea,
@@ -261,7 +261,7 @@ void KPassivePopup::positionSelf()
}
else {
- NETWinInfo ni( qt_xdisplay(), window, qt_xrootwin(),
+ NETWinInfo ni( tqt_xdisplay(), window, tqt_xrootwin(),
NET::WMIconGeometry | NET::WMKDESystemTrayWinFor );
// Figure out where to put the popup. Note that we must handle
diff --git a/tdeui/kpixmapio.cpp b/tdeui/kpixmapio.cpp
index 1900da11f..aafb7f3c2 100644
--- a/tdeui/kpixmapio.cpp
+++ b/tdeui/kpixmapio.cpp
@@ -92,9 +92,9 @@ KPixmapIO::KPixmapIO()
return;
int ignore;
- if (XQueryExtension(qt_xdisplay(), "MIT-SHM", &ignore, &ignore, &ignore))
+ if (XQueryExtension(tqt_xdisplay(), "MIT-SHM", &ignore, &ignore, &ignore))
{
- if (XShmQueryExtension(qt_xdisplay()))
+ if (XShmQueryExtension(tqt_xdisplay()))
m_bShm = true;
}
if (!m_bShm)
@@ -108,7 +108,7 @@ KPixmapIO::KPixmapIO()
// Sort out bit format. Create a temporary XImage for this.
d->shminfo = new XShmSegmentInfo;
- d->ximage = XShmCreateImage(qt_xdisplay(), (Visual *) TQPaintDevice::x11AppVisual(),
+ d->ximage = XShmCreateImage(tqt_xdisplay(), (Visual *) TQPaintDevice::x11AppVisual(),
TQPaintDevice::x11AppDepth(), ZPixmap, 0L, d->shminfo, 10, 10);
d->bpp = d->ximage->bits_per_pixel;
d->first_try = true;
@@ -231,10 +231,10 @@ void KPixmapIO::putImage(TQPixmap *dst, int dx, int dy, const TQImage *src)
if( initXImage(src->width(), src->height()))
{
convertToXImage(*src);
- XShmPutImage(qt_xdisplay(), dst->handle(), qt_xget_temp_gc(qt_xscreen(), false), d->ximage,
+ XShmPutImage(tqt_xdisplay(), dst->handle(), tqt_xget_temp_gc(tqt_xscreen(), false), d->ximage,
dx, dy, 0, 0, src->width(), src->height(), false);
// coolo: do we really need this here? I see no good for it
- XSync(qt_xdisplay(), false);
+ XSync(tqt_xdisplay(), false);
doneXImage();
fallback = false;
}
@@ -265,7 +265,7 @@ TQImage KPixmapIO::getImage(const TQPixmap *src, int sx, int sy, int sw, int sh)
#ifdef HAVE_MITSHM
if( initXImage(sw, sh))
{
- XShmGetImage(qt_xdisplay(), src->handle(), d->ximage, sx, sy, AllPlanes);
+ XShmGetImage(tqt_xdisplay(), src->handle(), d->ximage, sx, sy, AllPlanes);
image = convertFromXImage();
doneXImage();
fallback = false;
@@ -353,7 +353,7 @@ void KPixmapIO::destroyXImage()
bool KPixmapIO::createXImage(int w, int h)
{
destroyXImage();
- d->ximage = XShmCreateImage(qt_xdisplay(), (Visual *) TQPaintDevice::x11AppVisual(),
+ d->ximage = XShmCreateImage(tqt_xdisplay(), (Visual *) TQPaintDevice::x11AppVisual(),
TQPaintDevice::x11AppDepth(), ZPixmap, 0L, d->shminfo, w, h);
return d->ximage != None;
}
@@ -363,7 +363,7 @@ void KPixmapIO::destroyShmSegment()
{
if (d->shmsize)
{
- XShmDetach(qt_xdisplay(), d->shminfo);
+ XShmDetach(tqt_xdisplay(), d->shminfo);
shmdt(d->shminfo->shmaddr);
shmctl(d->shminfo->shmid, IPC_RMID, 0);
d->shmsize = 0;
@@ -412,12 +412,12 @@ bool KPixmapIO::createShmSegment(int size)
if (d->first_try) {
// make sure that we don't get errors of old stuff
- XSync(qt_xdisplay(), False);
+ XSync(tqt_xdisplay(), False);
old_errhandler = XSetErrorHandler(kpixmapio_errorhandler);
- kpixmapio_serial = NextRequest(qt_xdisplay());
+ kpixmapio_serial = NextRequest(tqt_xdisplay());
}
- if ( !XShmAttach(qt_xdisplay(), d->shminfo))
+ if ( !XShmAttach(tqt_xdisplay(), d->shminfo))
{
kdWarning() << "X-Server could not attach shared memory segment.\n";
m_bShm = false;
@@ -426,7 +426,7 @@ bool KPixmapIO::createShmSegment(int size)
}
if (d->first_try) {
- XSync(qt_xdisplay(), false);
+ XSync(tqt_xdisplay(), false);
if (!use_xshm)
m_bShm = false;
@@ -464,7 +464,7 @@ TQImage KPixmapIO::convertFromXImage()
XColor *cmap = new XColor[ncells];
for (i=0; i<ncells; i++)
cmap[i].pixel = i;
- XQueryColors(qt_xdisplay(), TQPaintDevice::x11AppColormap(),
+ XQueryColors(tqt_xdisplay(), TQPaintDevice::x11AppColormap(),
cmap, ncells);
image.setNumColors(ncells);
for (i=0; i<ncells; i++)
diff --git a/tdeui/krootpixmap.cpp b/tdeui/krootpixmap.cpp
index 8b188c480..539a45e27 100644
--- a/tdeui/krootpixmap.cpp
+++ b/tdeui/krootpixmap.cpp
@@ -92,7 +92,7 @@ KRootPixmap::~KRootPixmap()
int KRootPixmap::currentDesktop() const
{
#ifdef Q_WS_X11
- NETRootInfo rinfo( qt_xdisplay(), NET::CurrentDesktop );
+ NETRootInfo rinfo( tqt_xdisplay(), NET::CurrentDesktop );
rinfo.activate();
return rinfo.currentDesktop();
#else
@@ -263,7 +263,7 @@ bool KRootPixmap::isAvailable() const
TQString KRootPixmap::pixmapName(int desk) {
TQString pattern = TQString("DESKTOP%1");
#ifdef Q_WS_X11
- int screen_number = DefaultScreen(qt_xdisplay());
+ int screen_number = DefaultScreen(tqt_xdisplay());
if (screen_number) {
pattern = TQString("SCREEN%1-DESKTOP").arg(screen_number) + "%1";
}
@@ -284,7 +284,7 @@ void KRootPixmap::enableExports()
args << 1;
TQCString appname( "kdesktop" );
- int screen_number = DefaultScreen(qt_xdisplay());
+ int screen_number = DefaultScreen(tqt_xdisplay());
if ( screen_number )
appname.sprintf("kdesktop-screen-%d", screen_number );
diff --git a/tdeui/ksharedpixmap.cpp b/tdeui/ksharedpixmap.cpp
index 29c670265..91babd672 100644
--- a/tdeui/ksharedpixmap.cpp
+++ b/tdeui/ksharedpixmap.cpp
@@ -77,10 +77,10 @@ KSharedPixmap::~KSharedPixmap()
void KSharedPixmap::init()
{
- d->pixmap = XInternAtom(qt_xdisplay(), "PIXMAP", false);
+ d->pixmap = XInternAtom(tqt_xdisplay(), "PIXMAP", false);
TQCString atom;
atom.sprintf("target prop for window %lx", static_cast<unsigned long int>(winId()));
- d->target = XInternAtom(qt_xdisplay(), atom.data(), false);
+ d->target = XInternAtom(tqt_xdisplay(), atom.data(), false);
d->selection = None;
}
@@ -88,10 +88,10 @@ void KSharedPixmap::init()
bool KSharedPixmap::isAvailable(const TQString & name) const
{
TQString str = TQString("KDESHPIXMAP:%1").arg(name);
- Atom sel = XInternAtom(qt_xdisplay(), str.latin1(), true);
+ Atom sel = XInternAtom(tqt_xdisplay(), str.latin1(), true);
if (sel == None)
return false;
- return XGetSelectionOwner(qt_xdisplay(), sel) != None;
+ return XGetSelectionOwner(tqt_xdisplay(), sel) != None;
}
@@ -105,16 +105,16 @@ bool KSharedPixmap::loadFromShared(const TQString & name, const TQRect & rect)
TQPixmap::resize(0, 0); // invalidate
TQString str = TQString("KDESHPIXMAP:%1").arg(name);
- d->selection = XInternAtom(qt_xdisplay(), str.latin1(), true);
+ d->selection = XInternAtom(tqt_xdisplay(), str.latin1(), true);
if (d->selection == None)
return false;
- if (XGetSelectionOwner(qt_xdisplay(), d->selection) == None)
+ if (XGetSelectionOwner(tqt_xdisplay(), d->selection) == None)
{
d->selection = None;
return false;
}
- XConvertSelection(qt_xdisplay(), d->selection, d->pixmap, d->target,
+ XConvertSelection(tqt_xdisplay(), d->selection, d->pixmap, d->target,
winId(), CurrentTime);
return true;
}
@@ -144,7 +144,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
unsigned char *pixmap_id = 0;
Atom type;
- XGetWindowProperty(qt_xdisplay(), winId(), ev->property, 0, 1, false,
+ XGetWindowProperty(tqt_xdisplay(), winId(), ev->property, 0, 1, false,
d->pixmap, &type, &format, &nitems, &ldummy,
&pixmap_id);
@@ -160,7 +160,7 @@ bool KSharedPixmap::x11Event(XEvent *event)
void *drawable_id = (void *) pixmap_id;
Drawable pixmap = *(Drawable*) drawable_id;
- Status status = XGetGeometry(qt_xdisplay(), pixmap, &root, &dummy, &dummy, &width, &height, &udummy, &udummy);
+ Status status = XGetGeometry(tqt_xdisplay(), pixmap, &root, &dummy, &dummy, &width, &height, &udummy, &udummy);
if (status == BadDrawable)
return false;
@@ -168,11 +168,11 @@ bool KSharedPixmap::x11Event(XEvent *event)
if (d->rect.isEmpty())
{
TQPixmap::resize(width, height);
- XCopyArea(qt_xdisplay(), pixmap, ((KPixmap*)this)->handle(), qt_xget_temp_gc(qt_xscreen(), false),
+ XCopyArea(tqt_xdisplay(), pixmap, ((KPixmap*)this)->handle(), tqt_xget_temp_gc(tqt_xscreen(), false),
0, 0, width, height, 0, 0);
XFree(pixmap_id);
- XDeleteProperty(qt_xdisplay(), winId(), ev->property);
+ XDeleteProperty(tqt_xdisplay(), winId(), ev->property);
d->selection = None;
emit done(true);
return true;
@@ -206,19 +206,19 @@ bool KSharedPixmap::x11Event(XEvent *event)
TQPixmap::resize( tw+origin.x(), th+origin.y() );
- XCopyArea(qt_xdisplay(), pixmap, (static_cast<KPixmap*>(this))->handle(), qt_xget_temp_gc(qt_xscreen(), false),
+ XCopyArea(tqt_xdisplay(), pixmap, (static_cast<KPixmap*>(this))->handle(), tqt_xget_temp_gc(tqt_xscreen(), false),
xa, ya, t1w+origin.x(), t1h+origin.y(), origin.x(), origin.y() );
- XCopyArea(qt_xdisplay(), pixmap, (static_cast<KPixmap*>(this))->handle(), qt_xget_temp_gc(qt_xscreen(), false),
+ XCopyArea(tqt_xdisplay(), pixmap, (static_cast<KPixmap*>(this))->handle(), tqt_xget_temp_gc(tqt_xscreen(), false),
0, ya, tw-t1w, t1h, t1w, 0);
- XCopyArea(qt_xdisplay(), pixmap, (static_cast<KPixmap*>(this))->handle(), qt_xget_temp_gc(qt_xscreen(), false),
+ XCopyArea(tqt_xdisplay(), pixmap, (static_cast<KPixmap*>(this))->handle(), tqt_xget_temp_gc(tqt_xscreen(), false),
xa, 0, t1w, th-t1h, 0, t1h);
- XCopyArea(qt_xdisplay(), pixmap, (static_cast<KPixmap*>(this))->handle(), qt_xget_temp_gc(qt_xscreen(), false),
+ XCopyArea(tqt_xdisplay(), pixmap, (static_cast<KPixmap*>(this))->handle(), tqt_xget_temp_gc(tqt_xscreen(), false),
0, 0, tw-t1w, th-t1h, t1w, t1h);
XFree(pixmap_id);
d->selection = None;
- XDeleteProperty(qt_xdisplay(), winId(), ev->property);
+ XDeleteProperty(tqt_xdisplay(), winId(), ev->property);
emit done(true);
return true;
}
diff --git a/tdeui/ksystemtray.cpp b/tdeui/ksystemtray.cpp
index 100f86df8..1ae786d67 100644
--- a/tdeui/ksystemtray.cpp
+++ b/tdeui/ksystemtray.cpp
@@ -69,7 +69,7 @@ KSystemTray::KSystemTray( TQWidget* parent, const char* name )
d->actionCollection = new KActionCollection(this);
#ifdef Q_WS_X11
- KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): qt_xrootwin() );
+ KWin::setSystemTrayWindowFor( winId(), parent?parent->topLevelWidget()->winId(): tqt_xrootwin() );
#endif
setBackgroundMode(X11ParentRelative);
setBackgroundOrigin(WindowOrigin);
diff --git a/tdeui/qxembed.cpp b/tdeui/qxembed.cpp
index 95bd1bc9b..b62f45ead 100644
--- a/tdeui/qxembed.cpp
+++ b/tdeui/qxembed.cpp
@@ -97,10 +97,10 @@ const int XKeyRelease = KeyRelease;
# undef FocusIn
// L0005: Variables defined in qapplication_x11.cpp
-extern Atom qt_wm_protocols;
-extern Atom qt_wm_delete_window;
-extern Atom qt_wm_take_focus;
-extern Atom qt_wm_state;
+extern Atom tqt_wm_protocols;
+extern Atom tqt_wm_delete_window;
+extern Atom tqt_wm_take_focus;
+extern Atom tqt_wm_state;
// L0006: X11 atoms private to QXEmbed
static Atom xembed = 0;
@@ -184,7 +184,7 @@ public:
// L0400: This sets a very low level filter for X11 messages.
// See qapplication_x11.cpp
typedef int (*QX11EventFilter) (XEvent*);
-extern QX11EventFilter qt_set_x11_event_filter (QX11EventFilter filter);
+extern QX11EventFilter tqt_set_x11_event_filter (QX11EventFilter filter);
static QX11EventFilter oldFilter = 0;
@@ -204,7 +204,7 @@ static void sendXEmbedMessage( WId window, long message, long detail = 0,
ev.xclient.data.l[2] = detail;
ev.xclient.data.l[3] = data1;
ev.xclient.data.l[4] = data2;
- XSendEvent(qt_xdisplay(), window, false, NoEventMask, &ev);
+ XSendEvent(tqt_xdisplay(), window, false, NoEventMask, &ev);
}
// L0501: Helper to send ICCCM Client messages.
@@ -220,7 +220,7 @@ static void sendClientMessage(Window window, Atom a, long x)
ev.xclient.format = 32;
ev.xclient.data.l[0] = x;
ev.xclient.data.l[1] = GET_QT_X_TIME();
- XSendEvent(qt_xdisplay(), window, false, NoEventMask, &ev);
+ XSendEvent(tqt_xdisplay(), window, false, NoEventMask, &ev);
}
// L0502: Helper to send fake X11 focus messages.
@@ -234,7 +234,7 @@ static void sendFocusMessage(Window window, int type, int mode, int detail)
ev.xfocus.window = window;
ev.xfocus.mode = mode;
ev.xfocus.detail = detail;
- XSendEvent(qt_xdisplay(), window, false, FocusChangeMask, &ev);
+ XSendEvent(tqt_xdisplay(), window, false, FocusChangeMask, &ev);
}
@@ -462,7 +462,7 @@ static int qxembed_x11_event_filter( XEvent* e)
// widget might later be set in L0680.
XEvent ev;
memset(&ev, 0, sizeof(ev));
- ev.xfocus.display = qt_xdisplay();
+ ev.xfocus.display = tqt_xdisplay();
ev.xfocus.type = XFocusIn;
ev.xfocus.window = w->topLevelWidget()->winId();
ev.xfocus.mode = NotifyNormal;
@@ -476,7 +476,7 @@ static int qxembed_x11_event_filter( XEvent* e)
// receive extra Qt FocusOut events but we do not care.
XEvent ev;
memset(&ev, 0, sizeof(ev));
- ev.xfocus.display = qt_xdisplay();
+ ev.xfocus.display = tqt_xdisplay();
ev.xfocus.type = XFocusOut;
ev.xfocus.window = w->topLevelWidget()->winId();
ev.xfocus.mode = NotifyNormal;
@@ -555,7 +555,7 @@ static int qxembed_x11_event_filter( XEvent* e)
break;
}
} else if ( e->xclient.format == 32 && e->xclient.message_type ) {
- if ( e->xclient.message_type == qt_wm_protocols ) {
+ if ( e->xclient.message_type == tqt_wm_protocols ) {
TQWidget* w = TQT_TQWIDGET(TQWidget::find( e->xclient.window ));
if ( !w )
break;
@@ -567,7 +567,7 @@ static int qxembed_x11_event_filter( XEvent* e)
// changed the X11 focus. We want to make sure it goes
// to the focus proxy window eventually.
Atom a = e->xclient.data.l[0];
- if ( a == qt_wm_take_focus ) {
+ if ( a == tqt_wm_take_focus ) {
// L0695: update Qt message time variable
if ( (ulong) e->xclient.data.l[1] > GET_QT_X_TIME() )
SET_QT_X_TIME(e->xclient.data.l[1]);
@@ -607,9 +607,9 @@ void QXEmbed::initialize()
return;
// L0710: Atom used by the XEMBED protocol.
- xembed = XInternAtom( qt_xdisplay(), "_XEMBED", false );
+ xembed = XInternAtom( tqt_xdisplay(), "_XEMBED", false );
// L0720: Install low level filter for X11 events (L0650)
- oldFilter = qt_set_x11_event_filter( qxembed_x11_event_filter );
+ oldFilter = tqt_set_x11_event_filter( qxembed_x11_event_filter );
// L0730: See L0610 for an explanation about focusMap.
focusMap = new TQPtrDict<TQGuardedPtr<TQWidget> >;
focusMap->setAutoDelete( true );
@@ -670,7 +670,7 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f)
// L0912: We are mostly interested in SubstructureNotify
// This is sent when something happens to the children of
// the X11 window associated with the QXEmbed widget.
- XSelectInput(qt_xdisplay(), winId(),
+ XSelectInput(tqt_xdisplay(), winId(),
KeyPressMask | KeyReleaseMask |
ButtonPressMask | ButtonReleaseMask |
KeymapStateMask |
@@ -693,7 +693,7 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f)
// See L1581 to know why we do not use isActiveWindow().
if ( tqApp->activeWindow() == topLevelWidget() )
if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded )
- XSetInputFocus( qt_xdisplay(), d->focusProxy->winId(),
+ XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
RevertToParent, GET_QT_X_TIME() );
// L0915: ??? [drag&drop?]
setAcceptDrops( true );
@@ -704,7 +704,7 @@ QXEmbed::~QXEmbed()
{
// L1010: Make sure no pointer grab is left.
if ( d && d->xgrab)
- XUngrabButton( qt_xdisplay(), AnyButton, AnyModifier, winId() );
+ XUngrabButton( tqt_xdisplay(), AnyButton, AnyModifier, winId() );
if ( window && ( autoDelete() || !d->xplain ))
{
// L1021: Hide the window and safely reparent it into the root,
@@ -720,17 +720,17 @@ QXEmbed::~QXEmbed()
// themselves they have been released from systray, but KWin requires them
// to be visible to allow next Kicker instance to swallow them.
// See also below the L1022 comment.
-// XUnmapWindow( qt_xdisplay(), window );
+// XUnmapWindow( tqt_xdisplay(), window );
#else
if( autoDelete())
- XUnmapWindow( qt_xdisplay(), window );
+ XUnmapWindow( tqt_xdisplay(), window );
#endif
- XReparentWindow(qt_xdisplay(), window, qt_xrootwin(), 0, 0);
+ XReparentWindow(tqt_xdisplay(), window, tqt_xrootwin(), 0, 0);
if( !d->xplain )
- XRemoveFromSaveSet( qt_xdisplay(), window );
+ XRemoveFromSaveSet( tqt_xdisplay(), window );
if( d->mapAfterRelease )
- XMapWindow( qt_xdisplay(), window );
- XSync(qt_xdisplay(), false);
+ XMapWindow( tqt_xdisplay(), window );
+ XSync(tqt_xdisplay(), false);
// L1022: Send the WM_DELETE_WINDOW message
if( autoDelete() /*&& d->xplain*/ )
// This sendDelete should only apply to XPLAIN.
@@ -744,9 +744,9 @@ QXEmbed::~QXEmbed()
// Make sure that the X11 focus is not lost in the process.
Window focus;
int revert;
- XGetInputFocus( qt_xdisplay(), &focus, &revert );
+ XGetInputFocus( tqt_xdisplay(), &focus, &revert );
if( focus == d->focusProxy->winId())
- XSetInputFocus( qt_xdisplay(), topLevelWidget()->winId(), RevertToParent, GET_QT_X_TIME() );
+ XSetInputFocus( tqt_xdisplay(), topLevelWidget()->winId(), RevertToParent, GET_QT_X_TIME() );
// L01045: Delete our private data.
delete d;
}
@@ -759,8 +759,8 @@ void QXEmbed::sendDelete( void )
{
if (window)
{
- sendClientMessage(window, qt_wm_protocols, qt_wm_delete_window);
- XFlush( qt_xdisplay() );
+ sendClientMessage(window, tqt_wm_protocols, tqt_wm_delete_window);
+ XFlush( tqt_xdisplay() );
}
}
@@ -793,14 +793,14 @@ QXEmbed::Protocol QXEmbed::protocol()
void QXEmbed::resizeEvent(TQResizeEvent*)
{
if (window)
- XResizeWindow(qt_xdisplay(), window, width(), height());
+ XResizeWindow(tqt_xdisplay(), window, width(), height());
}
// L1250: QXEmbed widget is shown: make sure embedded window is visible.
void QXEmbed::showEvent(TQShowEvent*)
{
if (window)
- XMapRaised(qt_xdisplay(), window);
+ XMapRaised(tqt_xdisplay(), window);
}
@@ -815,7 +815,7 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e)
// Make sure the X11 focus is on the focus proxy window. See L0686.
if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded )
if (! hasFocus() )
- XSetInputFocus( qt_xdisplay(), d->focusProxy->winId(),
+ XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
RevertToParent, GET_QT_X_TIME() );
if (d->xplain)
// L1311: Activation has changed. Grab state might change. See L2800.
@@ -874,7 +874,7 @@ void QXEmbed::keyPressEvent( TQKeyEvent *)
if (!window)
return;
last_key_event.window = window;
- XSendEvent(qt_xdisplay(), window, false, KeyPressMask, (XEvent*)&last_key_event);
+ XSendEvent(tqt_xdisplay(), window, false, KeyPressMask, (XEvent*)&last_key_event);
}
@@ -885,7 +885,7 @@ void QXEmbed::keyReleaseEvent( TQKeyEvent *)
if (!window)
return;
last_key_event.window = window;
- XSendEvent(qt_xdisplay(), window, false, KeyReleaseMask, (XEvent*)&last_key_event);
+ XSendEvent(tqt_xdisplay(), window, false, KeyReleaseMask, (XEvent*)&last_key_event);
}
// L1500: Handle Qt focus in event.
@@ -899,7 +899,7 @@ void QXEmbed::focusInEvent( TQFocusEvent * e ){
// L1511: Alter X focus only when window is active.
// This is dual safety here because FocusIn implies this.
// But see L1581 for an example where this really matters.
- XSetInputFocus( qt_xdisplay(), d->focusProxy->winId(),
+ XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
RevertToParent, GET_QT_X_TIME() );
if (d->xplain) {
// L1520: Qt focus has changed. Grab state might change. See L2800.
@@ -949,7 +949,7 @@ void QXEmbed::focusOutEvent( TQFocusEvent * ){
// The test above is not the same as isActiveWindow().
// Function isActiveWindow() also returns true when a modal
// dialog child of this window is active.
- XSetInputFocus( qt_xdisplay(), d->focusProxy->winId(),
+ XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
RevertToParent, GET_QT_X_TIME() );
}
@@ -973,7 +973,7 @@ static bool wstate_withdrawn( WId winid )
int format;
unsigned long length, after;
unsigned char *data;
- int r = XGetWindowProperty( qt_xdisplay(), winid, qt_wm_state, 0, 2,
+ int r = XGetWindowProperty( tqt_xdisplay(), winid, tqt_wm_state, 0, 2,
false, AnyPropertyType, &type, &format,
&length, &after, &data );
bool withdrawn = true;
@@ -993,7 +993,7 @@ static int get_parent(WId winid, Window *out_parent)
{
Window root, *children=0;
unsigned int nchildren;
- int st = XQueryTree(qt_xdisplay(), winid, &root, out_parent, &children, &nchildren);
+ int st = XQueryTree(tqt_xdisplay(), winid, &root, out_parent, &children, &nchildren);
if (st && children)
XFree(children);
return st;
@@ -1016,14 +1016,14 @@ void QXEmbed::embed(WId w)
// This makes sure that the window manager will
// no longer try to manage this window.
if ( !wstate_withdrawn(window) ) {
- XWithdrawWindow(qt_xdisplay(), window, qt_xscreen());
+ XWithdrawWindow(tqt_xdisplay(), window, tqt_xscreen());
TQApplication::flushX();
// L1711: See L1610
for (int i=0; i < 10000; ++i) {
if (wstate_withdrawn(window)) {
Window parent = 0;
get_parent(w, &parent);
- if (parent == qt_xrootwin()) break;
+ if (parent == tqt_xrootwin()) break;
}
USLEEP(1000);
}
@@ -1039,8 +1039,8 @@ void QXEmbed::embed(WId w)
// this is done once more when finishing embedding, but it's done also here
// just in case we crash before reaching that place
if( !d->xplain )
- XAddToSaveSet( qt_xdisplay(), w );
- XReparentWindow(qt_xdisplay(), w, winId(), 0, 0);
+ XAddToSaveSet( tqt_xdisplay(), w );
+ XReparentWindow(tqt_xdisplay(), w, winId(), 0, 0);
if (get_parent(w, &parent) && parent == winId()) {
kdDebug() << TQString(TQString("> Loop %1: ").arg(i))
<< TQString(TQString("> reparent of 0x%1").arg(w,0,16))
@@ -1066,9 +1066,9 @@ void QXEmbed::handleEmbed()
// only XEMBED apps can survive crash,
// see http://lists.kde.org/?l=kfm-devel&m=106752026501968&w=2
if( !d->xplain )
- XAddToSaveSet( qt_xdisplay(), window );
- XResizeWindow(qt_xdisplay(), window, width(), height());
- XMapRaised(qt_xdisplay(), window);
+ XAddToSaveSet( tqt_xdisplay(), window );
+ XResizeWindow(tqt_xdisplay(), window, width(), height());
+ XMapRaised(tqt_xdisplay(), window);
// L2024: see L2900.
sendSyntheticConfigureNotifyEvent();
// L2025: ??? [any idea about drag&drop?]
@@ -1155,7 +1155,7 @@ bool QXEmbed::x11Event( XEvent* e)
// ??? [not sure it is good to touch this window since
// someone else has taken control of it already.]
if( !d->xplain )
- XRemoveFromSaveSet( qt_xdisplay(), window );
+ XRemoveFromSaveSet( tqt_xdisplay(), window );
} else if ( e->xreparent.parent == winId()){
if( window == 0 ) // something started embedding from the outside
window = e->xreparent.window;
@@ -1176,7 +1176,7 @@ bool QXEmbed::x11Event( XEvent* e)
TQFocusEvent::resetReason();
#endif // USE_QT4
// L2064: Resume X11 event processing.
- XAllowEvents(qt_xdisplay(), ReplayPointer, CurrentTime);
+ XAllowEvents(tqt_xdisplay(), ReplayPointer, CurrentTime);
// L2065: Qt should not know about this.
return true;
}
@@ -1184,14 +1184,14 @@ bool QXEmbed::x11Event( XEvent* e)
case ButtonRelease:
if (d->xplain && d->xgrab) {
// L2064: Resume X11 event processing after passive grab (see L2060)
- XAllowEvents(qt_xdisplay(), SyncPointer, CurrentTime);
+ XAllowEvents(tqt_xdisplay(), SyncPointer, CurrentTime);
return true;
}
break;
case MapRequest:
// L2070: Behave like a window manager.
if ( window && e->xmaprequest.window == window )
- XMapRaised(qt_xdisplay(), window );
+ XMapRaised(tqt_xdisplay(), window );
break;
case ClientMessage:
// L2080: This is where the QXEmbed object receives XEMBED
@@ -1268,7 +1268,7 @@ void QXEmbed::enterWhatsThisMode()
TQWhatsThis::leaveWhatsThisMode();
if ( !context_help )
context_help = XInternAtom( x11Display(), "_NET_WM_CONTEXT_HELP", false );
- sendClientMessage(window , qt_wm_protocols, context_help );
+ sendClientMessage(window , tqt_wm_protocols, context_help );
}
@@ -1315,7 +1315,7 @@ bool QXEmbed::processClientCmdline( TQWidget* client, int& argc, char ** argv )
void QXEmbed::embedClientIntoWindow(TQWidget* client, WId window)
{
initialize();
- XReparentWindow(qt_xdisplay(), client->winId(), window, 0, 0);
+ XReparentWindow(tqt_xdisplay(), client->winId(), window, 0, 0);
// L2451: These two lines are redundant. See L0680.
((QXEmbed*)client)->topData()->embedded = true;
#ifdef USE_QT4
@@ -1353,7 +1353,7 @@ TQSize QXEmbed::minimumSizeHint() const
if ( window ) {
XSizeHints size;
long msize;
- if (XGetWMNormalHints(qt_xdisplay(), window, &size, &msize)
+ if (XGetWMNormalHints(tqt_xdisplay(), window, &size, &msize)
&& ( size.flags & PMinSize) ) {
minw = size.min_width;
minh = size.min_height;
@@ -1391,13 +1391,13 @@ void QXEmbed::checkGrab()
{
if (d->xplain && isActiveWindow() && !hasFocus()) {
if (! d->xgrab)
- XGrabButton(qt_xdisplay(), AnyButton, AnyModifier, winId(),
+ XGrabButton(tqt_xdisplay(), AnyButton, AnyModifier, winId(),
false, ButtonPressMask, GrabModeSync, GrabModeAsync,
None, None );
d->xgrab = true;
} else {
if (d->xgrab)
- XUngrabButton( qt_xdisplay(), AnyButton, AnyModifier, winId() );
+ XUngrabButton( tqt_xdisplay(), AnyButton, AnyModifier, winId() );
d->xgrab = false;
}
}
@@ -1415,7 +1415,7 @@ void QXEmbed::sendSyntheticConfigureNotifyEvent()
XConfigureEvent c;
memset(&c, 0, sizeof(c));
c.type = ConfigureNotify;
- c.display = qt_xdisplay();
+ c.display = tqt_xdisplay();
c.send_event = True;
c.event = window;
c.window = window;
@@ -1426,11 +1426,11 @@ void QXEmbed::sendSyntheticConfigureNotifyEvent()
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 );
#endif
// Yes, this doesn't make sense at all. See the commit message.
- XSetWindowBorderWidth( qt_xdisplay(), window, 1 );
- XSetWindowBorderWidth( qt_xdisplay(), window, 0 );
+ XSetWindowBorderWidth( tqt_xdisplay(), window, 1 );
+ XSetWindowBorderWidth( tqt_xdisplay(), window, 0 );
}
}
diff --git a/tdeui/tests/qxembedtest.cpp b/tdeui/tests/qxembedtest.cpp
index 5e870ba8f..4965e5487 100644
--- a/tdeui/tests/qxembedtest.cpp
+++ b/tdeui/tests/qxembedtest.cpp
@@ -84,5 +84,5 @@ Window Window_With_Name(Display *dpy, Window top, const char *name)
WId windowWithName(const char *name)
{
- return Window_With_Name(qt_xdisplay(), qt_xrootwin(), name);
+ return Window_With_Name(tqt_xdisplay(), tqt_xrootwin(), name);
}
diff --git a/tdeui/twindowlistmenu.cpp b/tdeui/twindowlistmenu.cpp
index 5058695a3..b1d05c57e 100644
--- a/tdeui/twindowlistmenu.cpp
+++ b/tdeui/twindowlistmenu.cpp
@@ -47,7 +47,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
static TQCString twinName() {
TQCString appname;
- int screen_number = DefaultScreen(qt_xdisplay());
+ int screen_number = DefaultScreen(tqt_xdisplay());
if (screen_number == 0)
appname = "twin";
else
@@ -100,7 +100,7 @@ static bool standaloneDialog( const KWin::WindowInfo* info, const NameSortedInfo
WId group = info->groupLeader();
if( group == 0 )
{
- return info->transientFor() == qt_xrootwin();
+ return info->transientFor() == tqt_xrootwin();
}
for( TQPtrListIterator< KWin::WindowInfo > it( list );
it.current() != NULL;