diff options
author | Timothy Pearson <[email protected]> | 2012-03-02 02:13:02 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2012-03-02 02:13:02 -0600 |
commit | 8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96 (patch) | |
tree | bf71d4bfa94d0561e80456400ae5fe2bb501fbd8 /kdesktop | |
parent | e8a1cdc01d38125bea12d5494db977ae6429919a (diff) | |
download | tdebase-8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96.tar.gz tdebase-8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96.zip |
Rename additional global functions and variables for tqt3
Diffstat (limited to 'kdesktop')
-rw-r--r-- | kdesktop/bgmanager.cc | 24 | ||||
-rw-r--r-- | kdesktop/desktop.cc | 30 | ||||
-rw-r--r-- | kdesktop/kdesktopapp.cpp | 10 | ||||
-rw-r--r-- | kdesktop/krootwm.cc | 4 | ||||
-rw-r--r-- | kdesktop/lock/autologout.cc | 4 | ||||
-rw-r--r-- | kdesktop/lock/infodlg.cc | 4 | ||||
-rw-r--r-- | kdesktop/lock/lockdlg.cc | 14 | ||||
-rw-r--r-- | kdesktop/lock/lockprocess.cc | 132 | ||||
-rw-r--r-- | kdesktop/lock/querydlg.cc | 4 | ||||
-rw-r--r-- | kdesktop/lock/sakdlg.cc | 4 | ||||
-rw-r--r-- | kdesktop/lock/securedlg.cc | 4 | ||||
-rw-r--r-- | kdesktop/lockeng.cc | 24 | ||||
-rw-r--r-- | kdesktop/minicli.cpp | 2 | ||||
-rw-r--r-- | kdesktop/pixmapserver.cc | 26 | ||||
-rw-r--r-- | kdesktop/startupid.cpp | 16 | ||||
-rw-r--r-- | kdesktop/xautolock.cc | 26 |
16 files changed, 164 insertions, 164 deletions
diff --git a/kdesktop/bgmanager.cc b/kdesktop/bgmanager.cc index 341cc5b88..b36219692 100644 --- a/kdesktop/bgmanager.cc +++ b/kdesktop/bgmanager.cc @@ -64,7 +64,7 @@ KBackgroundManager::KBackgroundManager(TQWidget *desktop, KWinModule* twinModule { if( !properties_inited ) { - prop_root = XInternAtom(qt_xdisplay(), "_XROOTPMAP_ID", False); + prop_root = XInternAtom(tqt_xdisplay(), "_XROOTPMAP_ID", False); properties_inited = true; } m_bBgInitDone = false; @@ -146,7 +146,7 @@ KBackgroundManager::~KBackgroundManager() int format; unsigned long length, after; unsigned char* data_root; - if( XGetWindowProperty( qt_xdisplay(), qt_xrootwin(), prop_root, 0L, 1L, False, AnyPropertyType, + if( XGetWindowProperty( tqt_xdisplay(), tqt_xrootwin(), prop_root, 0L, 1L, False, AnyPropertyType, &type, &format, &length, &after, &data_root) == Success && data_root != NULL ) { if (type == XA_PIXMAP) @@ -155,7 +155,7 @@ KBackgroundManager::~KBackgroundManager() } // only if it's our pixmap if( pm == m_xrootpmap ) - XDeleteProperty(qt_xdisplay(), qt_xrootwin(), prop_root); + XDeleteProperty(tqt_xdisplay(), tqt_xrootwin(), prop_root); m_xrootpmap = None; if (m_bExport) @@ -488,7 +488,7 @@ void KBackgroundManager::setPixmap(KPixmap *pm, int hash, int desk) && !myApp->cmBackground()) { XRenderPictFormat *format; - format = XRenderFindStandardFormat (qt_xdisplay(), PictStandardARGB32); + format = XRenderFindStandardFormat (tqt_xdisplay(), PictStandardARGB32); XRenderColor fillColor; @@ -498,18 +498,18 @@ void KBackgroundManager::setPixmap(KPixmap *pm, int hash, int desk) fillColor.blue = color; fillColor.alpha = color; - Picture fill = XRenderCreateSolidFill (qt_xdisplay(), &fillColor); - Picture src = XRenderCreatePicture(qt_xdisplay(), pm->handle(), + Picture fill = XRenderCreateSolidFill (tqt_xdisplay(), &fillColor); + Picture src = XRenderCreatePicture(tqt_xdisplay(), pm->handle(), format, 0, NULL); - Picture dst = XRenderCreatePicture(qt_xdisplay(), ep->handle(), + Picture dst = XRenderCreatePicture(tqt_xdisplay(), ep->handle(), format, 0, NULL); - XRenderComposite (qt_xdisplay(), PictOpSrc, src, fill, dst, 0, 0, 0, + XRenderComposite (tqt_xdisplay(), PictOpSrc, src, fill, dst, 0, 0, 0, 0, 0, 0, pm->width(), pm->height()); - XRenderFreePicture (qt_xdisplay(), fill); - XRenderFreePicture (qt_xdisplay(), src); - XRenderFreePicture (qt_xdisplay(), dst); + XRenderFreePicture (tqt_xdisplay(), fill); + XRenderFreePicture (tqt_xdisplay(), src); + XRenderFreePicture (tqt_xdisplay(), dst); } } #endif @@ -546,7 +546,7 @@ void KBackgroundManager::setPixmap(KPixmap *pm, int hash, int desk) // don't set the ESETROOT_PMAP_ID property - that would result in possible XKillClient() // done on kdesktop - XChangeProperty(qt_xdisplay(), qt_xrootwin(), prop_root, XA_PIXMAP, 32, PropModeReplace, + XChangeProperty(tqt_xdisplay(), tqt_xrootwin(), prop_root, XA_PIXMAP, 32, PropModeReplace, (unsigned char *) &bgPm, 1); m_xrootpmap = bgPm; diff --git a/kdesktop/desktop.cc b/kdesktop/desktop.cc index 2690f0341..9b37e3ccc 100644 --- a/kdesktop/desktop.cc +++ b/kdesktop/desktop.cc @@ -140,7 +140,7 @@ KDesktop::KDesktop( bool x_root_hack, bool wait_for_kded ) : // those two WStyle_ break kdesktop when the root-hack isn't used (no Dnd) startup_id( NULL ), m_waitForKicker(0) { - NETRootInfo i( qt_xdisplay(), NET::Supported ); + NETRootInfo i( tqt_xdisplay(), NET::Supported ); m_wmSupport = i.isSupported( NET::WM2ShowingDesktop ); m_bWaitForKded = wait_for_kded; @@ -173,8 +173,8 @@ KDesktop::KDesktop( bool x_root_hack, bool wait_for_kded ) : unsigned long data[2]; data[0] = (unsigned long) 1; data[1] = (unsigned long) 0; // None; (Werner) - Atom wm_state = XInternAtom(qt_xdisplay(), "WM_STATE", False); - XChangeProperty(qt_xdisplay(), winId(), wm_state, wm_state, 32, + Atom wm_state = XInternAtom(tqt_xdisplay(), "WM_STATE", False); + XChangeProperty(tqt_xdisplay(), winId(), wm_state, wm_state, 32, PropModeReplace, (unsigned char *)data, 2); } @@ -210,7 +210,7 @@ KDesktop::KDesktop( bool x_root_hack, bool wait_for_kded ) : void KDesktop::initRoot() { - Display *dpy = qt_xdisplay(); + Display *dpy = tqt_xdisplay(); Window root = RootWindow(dpy, kdesktop_screen_number); XDefineCursor(dpy, root, cursor().handle()); @@ -515,7 +515,7 @@ void KDesktop::popupExecuteCommand(const TQString& command) m_miniCli->setCommand(command); // Move minicli to the current desktop - NETWinInfo info( qt_xdisplay(), m_miniCli->winId(), qt_xrootwin(), NET::WMDesktop ); + NETWinInfo info( tqt_xdisplay(), m_miniCli->winId(), tqt_xrootwin(), NET::WMDesktop ); int currentDesktop = twinModule()->currentDesktop(); if ( info.desktop() != currentDesktop ) info.setDesktop( currentDesktop ); @@ -523,7 +523,7 @@ void KDesktop::popupExecuteCommand(const TQString& command) if ( m_miniCli->isVisible() ) { KWin::forceActiveWindow( m_miniCli->winId() ); } else { - NETRootInfo i( qt_xdisplay(), NET::Supported ); + NETRootInfo i( tqt_xdisplay(), NET::Supported ); if( !i.isSupported( NET::WM2FullPlacement )) { TQRect rect = KGlobalSettings::desktopGeometry(TQCursor::pos()); m_miniCli->move(rect.x() + (rect.width() - m_miniCli->width())/2, @@ -607,7 +607,7 @@ void KDesktop::setShowDesktop( bool b ) if( m_wmSupport ) { - NETRootInfo i( qt_xdisplay(), 0 ); + NETRootInfo i( tqt_xdisplay(), 0 ); i.setShowingDesktop( b ); return; } @@ -624,7 +624,7 @@ void KDesktop::setShowDesktop( bool b ) { WId w = *it; - NETWinInfo info( qt_xdisplay(), w, qt_xrootwin(), + NETWinInfo info( tqt_xdisplay(), w, tqt_xrootwin(), NET::XAWMState | NET::WMDesktop ); if (info.mappingState() == NET::Visible && @@ -689,7 +689,7 @@ void KDesktop::slotWindowAdded(WId w) return; } - NETWinInfo inf(qt_xdisplay(), w, qt_xrootwin(), + NETWinInfo inf(tqt_xdisplay(), w, tqt_xrootwin(), NET::XAWMState | NET::WMWindowType); NET::WindowType windowType = inf.windowType(NET::AllTypesMask); @@ -723,7 +723,7 @@ void KDesktop::slotWindowChanged(WId w, unsigned int dirty) if (dirty & NET::XAWMState) { - NETWinInfo inf(qt_xdisplay(), w, qt_xrootwin(), + NETWinInfo inf(tqt_xdisplay(), w, tqt_xrootwin(), NET::XAWMState | NET::WMWindowType); NET::WindowType windowType = inf.windowType(NET::AllTypesMask); @@ -852,15 +852,15 @@ void KDesktop::slotSetVRoot() return; } - unsigned long rw = RootWindowOfScreen(ScreenOfDisplay(qt_xdisplay(), qt_xscreen())); + unsigned long rw = RootWindowOfScreen(ScreenOfDisplay(tqt_xdisplay(), tqt_xscreen())); unsigned long vroot_data[1] = { m_pIconView->viewport()->winId() }; - static Atom vroot = XInternAtom(qt_xdisplay(), "__SWM_VROOT", False); + static Atom vroot = XInternAtom(tqt_xdisplay(), "__SWM_VROOT", False); Window rootReturn, parentReturn, *children; unsigned int numChildren; Window top = winId(); while (1) { - /*int ret = */XQueryTree(qt_xdisplay(), top , &rootReturn, &parentReturn, + /*int ret = */XQueryTree(tqt_xdisplay(), top , &rootReturn, &parentReturn, &children, &numChildren); if (children) XFree((char *)children); @@ -870,10 +870,10 @@ void KDesktop::slotSetVRoot() top = parentReturn; } if ( set_vroot ) - XChangeProperty(qt_xdisplay(), top, vroot, XA_WINDOW, 32, + XChangeProperty(tqt_xdisplay(), top, vroot, XA_WINDOW, 32, PropModeReplace, (unsigned char *)vroot_data, 1); else - XDeleteProperty (qt_xdisplay(), top, vroot); + XDeleteProperty (tqt_xdisplay(), top, vroot); } // ----------------------------------------------------------------------------- diff --git a/kdesktop/kdesktopapp.cpp b/kdesktop/kdesktopapp.cpp index f7324362c..ba05dc655 100644 --- a/kdesktop/kdesktopapp.cpp +++ b/kdesktop/kdesktopapp.cpp @@ -45,11 +45,11 @@ void KDesktopApp::initCmBackground() m_bgSupported = false; m_cmBackground = - XInternAtom (qt_xdisplay(), "_COMPIZ_WALLPAPER_SUPPORTED", false); + XInternAtom (tqt_xdisplay(), "_COMPIZ_WALLPAPER_SUPPORTED", false); - XSelectInput (qt_xdisplay(), qt_xrootwin(), PropertyChangeMask); + XSelectInput (tqt_xdisplay(), tqt_xrootwin(), PropertyChangeMask); - if (XGetWindowProperty (qt_xdisplay(), qt_xrootwin(), m_cmBackground, + if (XGetWindowProperty (tqt_xdisplay(), tqt_xrootwin(), m_cmBackground, 0, 1, FALSE, XA_CARDINAL, &type, &format, &num, &rest, &data) == Success && num) { @@ -62,7 +62,7 @@ void KDesktopApp::initCmBackground() bool KDesktopApp::x11EventFilter (XEvent * xevent) { if (xevent->type == PropertyNotify && - xevent->xproperty.window == qt_xrootwin() && + xevent->xproperty.window == tqt_xrootwin() && xevent->xproperty.atom == m_cmBackground) { Atom type; @@ -72,7 +72,7 @@ bool KDesktopApp::x11EventFilter (XEvent * xevent) Bool supported = false; - if (XGetWindowProperty (qt_xdisplay(), qt_xrootwin(), m_cmBackground, + if (XGetWindowProperty (tqt_xdisplay(), tqt_xrootwin(), m_cmBackground, 0, 1, FALSE, XA_CARDINAL, &type, &format, &num, &rest, &data) == Success && num) { diff --git a/kdesktop/krootwm.cc b/kdesktop/krootwm.cc index 1f5aee86f..f7f8de0ef 100644 --- a/kdesktop/krootwm.cc +++ b/kdesktop/krootwm.cc @@ -579,8 +579,8 @@ void KRootWm::activateMenu( menuChoice choice, const TQPoint& global ) case APPMENU: { // This allows the menu to disappear when clicking on the background another time - XUngrabPointer(qt_xdisplay(), CurrentTime); - XSync(qt_xdisplay(), False); + XUngrabPointer(tqt_xdisplay(), CurrentTime); + XSync(tqt_xdisplay(), False); // Ask kicker to showup the menu DCOPRef( kicker_name, kicker_name ).send( "popupKMenu", global ); diff --git a/kdesktop/lock/autologout.cc b/kdesktop/lock/autologout.cc index bef39ddf0..024425d2c 100644 --- a/kdesktop/lock/autologout.cc +++ b/kdesktop/lock/autologout.cc @@ -36,8 +36,8 @@ AutoLogout::AutoLogout(LockProcess *parent) : TQDialog(parent, "password dialog" if (trinity_desktop_lock_use_system_modal_dialogs) { // 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); } setCaption(i18n("Automatic Logout Notification")); diff --git a/kdesktop/lock/infodlg.cc b/kdesktop/lock/infodlg.cc index 3fbc276f4..725122134 100644 --- a/kdesktop/lock/infodlg.cc +++ b/kdesktop/lock/infodlg.cc @@ -68,8 +68,8 @@ InfoDlg::InfoDlg(LockProcess *parent) if (trinity_desktop_lock_use_system_modal_dialogs) { // 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); } setCaption(i18n("Information")); diff --git a/kdesktop/lock/lockdlg.cc b/kdesktop/lock/lockdlg.cc index f3eeee0b8..1ae046520 100644 --- a/kdesktop/lock/lockdlg.cc +++ b/kdesktop/lock/lockdlg.cc @@ -103,8 +103,8 @@ void PasswordDlg::init(GreeterPluginHandle *plugin) if (trinity_desktop_lock_use_system_modal_dialogs) { // 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); } setCaption(i18n("Desktop Session Locked")); @@ -617,8 +617,8 @@ void PasswordDlg::slotStartNewSession() if (trinity_desktop_lock_use_system_modal_dialogs) { // 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(), dialog->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(), dialog->winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } dialog->setCaption(i18n("New Session")); @@ -743,8 +743,8 @@ void PasswordDlg::slotSwitchUser() if (trinity_desktop_lock_use_system_modal_dialogs) { // 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(), dialog.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(), dialog.winId(), kde_wm_system_modal_notification, XA_INTEGER, 32, PropModeReplace, (unsigned char *) "TRUE", 1L); } dialog.setCaption(i18n("Switch User")); @@ -840,7 +840,7 @@ void PasswordDlg::capsLocked() unsigned int lmask; Window dummy1, dummy2; int dummy3, dummy4, dummy5, dummy6; - XQueryPointer(qt_xdisplay(), DefaultRootWindow( qt_xdisplay() ), &dummy1, &dummy2, &dummy3, &dummy4, &dummy5, &dummy6, &lmask); + XQueryPointer(tqt_xdisplay(), DefaultRootWindow( tqt_xdisplay() ), &dummy1, &dummy2, &dummy3, &dummy4, &dummy5, &dummy6, &lmask); mCapsLocked = lmask & LockMask; updateLabel(); } diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc index 22862d2ba..ad075ba22 100644 --- a/kdesktop/lock/lockprocess.cc +++ b/kdesktop/lock/lockprocess.cc @@ -132,7 +132,7 @@ static void segv_handler(int) sleep(1); } -extern Atom qt_wm_state; +extern Atom tqt_wm_state; extern bool trinity_desktop_lock_use_system_modal_dialogs; extern bool trinity_desktop_lock_delay_screensaver_start; extern bool trinity_desktop_lock_use_sak; @@ -220,15 +220,15 @@ LockProcess::LockProcess(bool child, bool useBlankOnly) // Get root window size XWindowAttributes rootAttr; - XGetWindowAttributes(qt_xdisplay(), RootWindow(qt_xdisplay(), - qt_xscreen()), &rootAttr); + XGetWindowAttributes(tqt_xdisplay(), RootWindow(tqt_xdisplay(), + tqt_xscreen()), &rootAttr); mRootWidth = rootAttr.width; mRootHeight = rootAttr.height; { // trigger creation of QToolTipManager, it does XSelectInput() on the root window TQWidget w; TQToolTip::add( &w, "foo" ); } - XSelectInput( qt_xdisplay(), qt_xrootwin(), + XSelectInput( tqt_xdisplay(), tqt_xrootwin(), SubstructureNotifyMask | rootAttr.your_event_mask ); // Add non-KDE path @@ -249,8 +249,8 @@ LockProcess::LockProcess(bool child, bool useBlankOnly) relPath); // virtual root property - gXA_VROOT = XInternAtom (qt_xdisplay(), "__SWM_VROOT", False); - gXA_SCREENSAVER_VERSION = XInternAtom (qt_xdisplay(), "_SCREENSAVER_VERSION", False); + gXA_VROOT = XInternAtom (tqt_xdisplay(), "__SWM_VROOT", False); + gXA_SCREENSAVER_VERSION = XInternAtom (tqt_xdisplay(), "_SCREENSAVER_VERSION", False); connect(&mHackProc, TQT_SIGNAL(processExited(KProcess *)), TQT_SLOT(hackExited(KProcess *))); @@ -270,7 +270,7 @@ LockProcess::LockProcess(bool child, bool useBlankOnly) if (mDPMSDepend) { BOOL on; CARD16 state; - DPMSInfo(qt_xdisplay(), &state, &on); + DPMSInfo(tqt_xdisplay(), &state, &on); if (on) { connect(&mCheckDPMS, TQT_SIGNAL(timeout()), TQT_SLOT(checkDPMSActive())); @@ -876,14 +876,14 @@ void LockProcess::createSaverWindow() // Some xscreensaver hacks check for this property const char *version = "KDE 2.0"; - XChangeProperty (qt_xdisplay(), winId(), + XChangeProperty (tqt_xdisplay(), winId(), gXA_SCREENSAVER_VERSION, XA_STRING, 8, PropModeReplace, (unsigned char *) version, strlen(version)); XSetWindowAttributes attr; attr.event_mask = KeyPressMask | ButtonPressMask | PointerMotionMask | VisibilityChangeMask | ExposureMask; - XChangeWindowAttributes(qt_xdisplay(), winId(), + XChangeWindowAttributes(tqt_xdisplay(), winId(), CWEventMask, &attr); // erase(); @@ -905,7 +905,7 @@ void LockProcess::desktopResized() // Get root window size XWindowAttributes rootAttr; - XGetWindowAttributes(qt_xdisplay(), RootWindow(qt_xdisplay(), qt_xscreen()), &rootAttr); + XGetWindowAttributes(tqt_xdisplay(), RootWindow(tqt_xdisplay(), tqt_xscreen()), &rootAttr); mRootWidth = rootAttr.width; mRootHeight = rootAttr.height; @@ -958,14 +958,14 @@ void LockProcess::hideSaverWindow() hide(); lower(); removeVRoot(winId()); - XDeleteProperty(qt_xdisplay(), winId(), gXA_SCREENSAVER_VERSION); + XDeleteProperty(tqt_xdisplay(), winId(), gXA_SCREENSAVER_VERSION); if ( gVRoot ) { unsigned long vroot_data[1] = { gVRootData }; - XChangeProperty(qt_xdisplay(), gVRoot, gXA_VROOT, XA_WINDOW, 32, + XChangeProperty(tqt_xdisplay(), gVRoot, gXA_VROOT, XA_WINDOW, 32, PropModeReplace, (unsigned char *)vroot_data, 1); gVRoot = 0; } - XSync(qt_xdisplay(), False); + XSync(tqt_xdisplay(), False); } //--------------------------------------------------------------------------- @@ -982,7 +982,7 @@ void LockProcess::saveVRoot() { Window rootReturn, parentReturn, *children; unsigned int numChildren; - Window root = RootWindowOfScreen(ScreenOfDisplay(qt_xdisplay(), qt_xscreen())); + Window root = RootWindowOfScreen(ScreenOfDisplay(tqt_xdisplay(), tqt_xscreen())); gVRoot = 0; gVRootData = 0; @@ -990,7 +990,7 @@ void LockProcess::saveVRoot() int (*oldHandler)(Display *, XErrorEvent *); oldHandler = XSetErrorHandler(ignoreXError); - if (XQueryTree(qt_xdisplay(), root, &rootReturn, &parentReturn, + if (XQueryTree(tqt_xdisplay(), root, &rootReturn, &parentReturn, &children, &numChildren)) { for (unsigned int i = 0; i < numChildren; i++) @@ -1000,7 +1000,7 @@ void LockProcess::saveVRoot() unsigned long nitems, bytesafter; unsigned char *newRoot = 0; - if ((XGetWindowProperty(qt_xdisplay(), children[i], gXA_VROOT, 0, 1, + if ((XGetWindowProperty(tqt_xdisplay(), children[i], gXA_VROOT, 0, 1, False, XA_WINDOW, &actual_type, &actual_format, &nitems, &bytesafter, &newRoot) == Success) && newRoot) { @@ -1029,14 +1029,14 @@ void LockProcess::setVRoot(Window win, Window vr) if (gVRoot) removeVRoot(gVRoot); - unsigned long rw = RootWindowOfScreen(ScreenOfDisplay(qt_xdisplay(), qt_xscreen())); + unsigned long rw = RootWindowOfScreen(ScreenOfDisplay(tqt_xdisplay(), tqt_xscreen())); unsigned long vroot_data[1] = { vr }; Window rootReturn, parentReturn, *children; unsigned int numChildren; Window top = win; while (1) { - XQueryTree(qt_xdisplay(), top , &rootReturn, &parentReturn, + XQueryTree(tqt_xdisplay(), top , &rootReturn, &parentReturn, &children, &numChildren); if (children) XFree((char *)children); @@ -1046,7 +1046,7 @@ void LockProcess::setVRoot(Window win, Window vr) top = parentReturn; } - XChangeProperty(qt_xdisplay(), top, gXA_VROOT, XA_WINDOW, 32, + XChangeProperty(tqt_xdisplay(), top, gXA_VROOT, XA_WINDOW, 32, PropModeReplace, (unsigned char *)vroot_data, 1); } @@ -1056,7 +1056,7 @@ void LockProcess::setVRoot(Window win, Window vr) // void LockProcess::removeVRoot(Window win) { - XDeleteProperty (qt_xdisplay(), win, gXA_VROOT); + XDeleteProperty (tqt_xdisplay(), win, gXA_VROOT); } //--------------------------------------------------------------------------- @@ -1065,7 +1065,7 @@ void LockProcess::removeVRoot(Window win) // bool LockProcess::grabKeyboard() { - int rv = XGrabKeyboard( qt_xdisplay(), TQApplication::desktop()->winId(), + int rv = XGrabKeyboard( tqt_xdisplay(), TQApplication::desktop()->winId(), True, GrabModeAsync, GrabModeAsync, CurrentTime ); return (rv == GrabSuccess); @@ -1080,7 +1080,7 @@ bool LockProcess::grabKeyboard() // bool LockProcess::grabMouse() { - int rv = XGrabPointer( qt_xdisplay(), TQApplication::desktop()->winId(), + int rv = XGrabPointer( tqt_xdisplay(), TQApplication::desktop()->winId(), True, GRABEVENTS, GrabModeAsync, GrabModeAsync, None, TQCursor(tqbusyCursor).handle(), CurrentTime ); @@ -1093,7 +1093,7 @@ bool LockProcess::grabMouse() // bool LockProcess::grabInput() { - XSync(qt_xdisplay(), False); + XSync(tqt_xdisplay(), False); if (!grabKeyboard()) { @@ -1110,7 +1110,7 @@ bool LockProcess::grabInput() usleep(100000); if (!grabMouse()) { - XUngrabKeyboard(qt_xdisplay(), CurrentTime); + XUngrabKeyboard(tqt_xdisplay(), CurrentTime); return false; } } @@ -1127,8 +1127,8 @@ bool LockProcess::grabInput() // void LockProcess::ungrabInput() { - XUngrabKeyboard(qt_xdisplay(), CurrentTime); - XUngrabPointer(qt_xdisplay(), CurrentTime); + XUngrabKeyboard(tqt_xdisplay(), CurrentTime); + XUngrabPointer(tqt_xdisplay(), CurrentTime); unlockXF86(); } @@ -1171,7 +1171,7 @@ bool LockProcess::startSaver() show(); raise(); - XSync(qt_xdisplay(), False); + XSync(tqt_xdisplay(), False); setVRoot( winId(), winId() ); if (!(trinity_desktop_lock_delay_screensaver_start && (trinity_desktop_lock_forced || trinity_desktop_lock_in_sec_dlg))) { if (backingPixmap.isNull()) @@ -1551,7 +1551,7 @@ void LockProcess::resume( bool force ) } if ((mSuspended) && (mHackProc.isRunning())) { - XForceScreenSaver(qt_xdisplay(), ScreenSaverReset ); + XForceScreenSaver(tqt_xdisplay(), ScreenSaverReset ); bitBlt( this, 0, 0, &mSavedScreen ); TQApplication::syncX(); mHackProc.kill(SIGCONT); @@ -1597,12 +1597,12 @@ bool LockProcess::checkPass() mForceReject = false; XWindowAttributes rootAttr; - XGetWindowAttributes(qt_xdisplay(), RootWindow(qt_xdisplay(), - qt_xscreen()), &rootAttr); + XGetWindowAttributes(tqt_xdisplay(), RootWindow(tqt_xdisplay(), + tqt_xscreen()), &rootAttr); if(( rootAttr.your_event_mask & SubstructureNotifyMask ) == 0 ) { kdWarning() << "ERROR: Something removed SubstructureNotifyMask from the root window!!!" << endl; - XSelectInput( qt_xdisplay(), qt_xrootwin(), + XSelectInput( tqt_xdisplay(), tqt_xrootwin(), SubstructureNotifyMask | rootAttr.your_event_mask ); } @@ -1621,12 +1621,12 @@ static void fakeFocusIn( WId window ) // window, so that it will correctly show cursor in the dialog. XEvent ev; memset(&ev, 0, sizeof(ev)); - ev.xfocus.display = qt_xdisplay(); + ev.xfocus.display = tqt_xdisplay(); ev.xfocus.type = FocusIn; ev.xfocus.window = window; ev.xfocus.mode = NotifyNormal; ev.xfocus.detail = NotifyAncestor; - XSendEvent( qt_xdisplay(), window, False, NoEventMask, &ev ); + XSendEvent( tqt_xdisplay(), window, False, NoEventMask, &ev ); } void LockProcess::resumeUnforced() @@ -1646,7 +1646,7 @@ int LockProcess::execDialog( TQDialog *dlg ) if (mDialogs.isEmpty()) { suspend(); - XChangeActivePointerGrab( qt_xdisplay(), GRABEVENTS, + XChangeActivePointerGrab( tqt_xdisplay(), GRABEVENTS, TQCursor(tqarrowCursor).handle(), CurrentTime); } mDialogs.prepend( dlg ); @@ -1661,7 +1661,7 @@ int LockProcess::execDialog( TQDialog *dlg ) currentDialog = NULL; mDialogs.remove( dlg ); if( mDialogs.isEmpty() ) { - XChangeActivePointerGrab( qt_xdisplay(), GRABEVENTS, + XChangeActivePointerGrab( tqt_xdisplay(), GRABEVENTS, TQCursor(tqbusyCursor).handle(), CurrentTime); if (trinity_desktop_lock_use_system_modal_dialogs) { // Slight delay before screensaver resume to allow the dialog window to fully disappear @@ -1744,7 +1744,7 @@ void LockProcess::doFunctionKeyBroadcast() { if ((!trinity_desktop_lock_use_system_modal_dialogs) && (!trinity_desktop_lock_use_sak)) { mBusy=true; TQTimer::singleShot(1000, this, TQT_SLOT(slotDeadTimePassed())); - if (mkeyCode == XKeysymToKeycode(qt_xdisplay(), XF86XK_Display)) { + if (mkeyCode == XKeysymToKeycode(tqt_xdisplay(), XF86XK_Display)) { while (mDialogControlLock == true) usleep(100000); mDialogControlLock = true; currentDialog->close(); // DO NOT use closeCurrentWindow() here! @@ -1845,7 +1845,7 @@ bool LockProcess::x11Event(XEvent *event) break; case ConfigureNotify: // from SubstructureNotifyMask on the root window - if(event->xconfigure.event == qt_xrootwin()) + if(event->xconfigure.event == tqt_xrootwin()) stayOnTop(); for( TQValueList< VkbdWindow >::Iterator it = mVkbdWindows.begin(); it != mVkbdWindows.end(); @@ -1859,7 +1859,7 @@ bool LockProcess::x11Event(XEvent *event) break; case MapNotify: // from SubstructureNotifyMask on the root window windowAdded( event->xmap.window, false ); - if( event->xmap.event == qt_xrootwin()) + if( event->xmap.event == tqt_xrootwin()) stayOnTop(); break; case DestroyNotify: @@ -1903,9 +1903,9 @@ void LockProcess::stayOnTop() // and no ConfigureNotify will be generated, // thus avoiding possible infinite loops if( !mVkbdWindows.isEmpty()) - XRaiseWindow( qt_xdisplay(), mVkbdWindows.first().id ); + XRaiseWindow( tqt_xdisplay(), mVkbdWindows.first().id ); else - XRaiseWindow( qt_xdisplay(), mDialogs.first()->winId()); // raise topmost + XRaiseWindow( tqt_xdisplay(), mDialogs.first()->winId()); // raise topmost // and stack others below it Window* stack = new Window[ mDialogs.count() + mVkbdWindows.count() + 1 ]; int count = 0; @@ -1922,7 +1922,7 @@ void LockProcess::stayOnTop() delete[] stack; } else - XRaiseWindow(qt_xdisplay(), winId()); + XRaiseWindow(tqt_xdisplay(), winId()); } void LockProcess::checkDPMSActive() @@ -1930,7 +1930,7 @@ void LockProcess::checkDPMSActive() #ifdef HAVE_DPMS BOOL on; CARD16 state; - DPMSInfo(qt_xdisplay(), &state, &on); + DPMSInfo(tqt_xdisplay(), &state, &on); //kdDebug() << "checkDPMSActive " << on << " " << state << endl; if (state == DPMSModeStandby || state == DPMSModeSuspend || state == DPMSModeOff) { @@ -1952,7 +1952,7 @@ void LockProcess::lockXF86() if( can_do_xf86_lock == Unknown ) { int major, minor; - if( XF86MiscQueryVersion( qt_xdisplay(), &major, &minor ) + if( XF86MiscQueryVersion( tqt_xdisplay(), &major, &minor ) && major >= 0 && minor >= 5 ) can_do_xf86_lock = Yes; else @@ -1962,7 +1962,7 @@ void LockProcess::lockXF86() return; if( mRestoreXF86Lock ) return; - if( XF86MiscSetGrabKeysState( qt_xdisplay(), False ) != MiscExtGrabStateSuccess ) + if( XF86MiscSetGrabKeysState( tqt_xdisplay(), False ) != MiscExtGrabStateSuccess ) return; // success mRestoreXF86Lock = true; @@ -1974,7 +1974,7 @@ void LockProcess::unlockXF86() return; if( !mRestoreXF86Lock ) return; - XF86MiscSetGrabKeysState( qt_xdisplay(), True ); + XF86MiscSetGrabKeysState( tqt_xdisplay(), True ); mRestoreXF86Lock = false; } #else @@ -2059,13 +2059,13 @@ void LockProcess::windowAdded( WId w, bool managed ) if( managed ) { // withdraw the window, wait for it to be withdrawn, reparent it directly // to root at the right position - XWithdrawWindow( qt_xdisplay(), w, qt_xscreen()); + XWithdrawWindow( tqt_xdisplay(), w, tqt_xscreen()); for(;;) { Atom type; int format; unsigned long length, after; unsigned char *data; - int r = XGetWindowProperty( qt_xdisplay(), w, qt_wm_state, 0, 2, + int r = XGetWindowProperty( tqt_xdisplay(), w, tqt_wm_state, 0, 2, false, AnyPropertyType, &type, &format, &length, &after, &data ); bool withdrawn = true; @@ -2078,18 +2078,18 @@ void LockProcess::windowAdded( WId w, bool managed ) break; } } - XSelectInput( qt_xdisplay(), w, StructureNotifyMask ); + XSelectInput( tqt_xdisplay(), w, StructureNotifyMask ); XWindowAttributes attr_geom; - if( !XGetWindowAttributes( qt_xdisplay(), w, &attr_geom )) + if( !XGetWindowAttributes( tqt_xdisplay(), w, &attr_geom )) return; - int x = XDisplayWidth( qt_xdisplay(), qt_xscreen()) - attr_geom.width; - int y = XDisplayHeight( qt_xdisplay(), qt_xscreen()) - attr_geom.height; + int x = XDisplayWidth( tqt_xdisplay(), tqt_xscreen()) - attr_geom.width; + int y = XDisplayHeight( tqt_xdisplay(), tqt_xscreen()) - attr_geom.height; if( managed ) { XSetWindowAttributes attr; attr.override_redirect = True; - XChangeWindowAttributes( qt_xdisplay(), w, CWOverrideRedirect, &attr ); - XReparentWindow( qt_xdisplay(), w, qt_xrootwin(), x, y ); - XMapWindow( qt_xdisplay(), w ); + XChangeWindowAttributes( tqt_xdisplay(), w, CWOverrideRedirect, &attr ); + XReparentWindow( tqt_xdisplay(), w, tqt_xrootwin(), x, y ); + XMapWindow( tqt_xdisplay(), w ); } VkbdWindow data; data.id = w; @@ -2129,7 +2129,7 @@ bool LockProcess::forwardVkbdEvent( XEvent* event ) int root_x, root_y, x, y; unsigned int mask; for(;;) { - if( !XQueryPointer( qt_xdisplay(), window, &root, &child, &root_x, &root_y, &x, &y, &mask )) + if( !XQueryPointer( tqt_xdisplay(), window, &root, &child, &root_x, &root_y, &x, &y, &mask )) return false; if( child == None ) break; @@ -2151,7 +2151,7 @@ bool LockProcess::forwardVkbdEvent( XEvent* event ) } event->xany.window = window; sendVkbdFocusInOut( window, time ); - XSendEvent( qt_xdisplay(), window, False, 0, event ); + XSendEvent( tqt_xdisplay(), window, False, 0, event ); return true; } } @@ -2169,9 +2169,9 @@ void LockProcess::sendVkbdFocusInOut( WId window, Time t ) if( mVkbdLastEventWindow != None ) { XEvent e; e.xcrossing.type = LeaveNotify; - e.xcrossing.display = qt_xdisplay(); + e.xcrossing.display = tqt_xdisplay(); e.xcrossing.window = mVkbdLastEventWindow; - e.xcrossing.root = qt_xrootwin(); + e.xcrossing.root = tqt_xrootwin(); e.xcrossing.subwindow = None; e.xcrossing.time = t; e.xcrossing.x = 0; @@ -2183,15 +2183,15 @@ void LockProcess::sendVkbdFocusInOut( WId window, Time t ) e.xcrossing.same_screen = True; e.xcrossing.focus = False; e.xcrossing.state = 0; - XSendEvent( qt_xdisplay(), mVkbdLastEventWindow, False, 0, &e ); + XSendEvent( tqt_xdisplay(), mVkbdLastEventWindow, False, 0, &e ); } mVkbdLastEventWindow = window; if( mVkbdLastEventWindow != None ) { XEvent e; e.xcrossing.type = EnterNotify; - e.xcrossing.display = qt_xdisplay(); + e.xcrossing.display = tqt_xdisplay(); e.xcrossing.window = mVkbdLastEventWindow; - e.xcrossing.root = qt_xrootwin(); + e.xcrossing.root = tqt_xrootwin(); e.xcrossing.subwindow = None; e.xcrossing.time = t; e.xcrossing.x = 0; @@ -2203,7 +2203,7 @@ void LockProcess::sendVkbdFocusInOut( WId window, Time t ) e.xcrossing.same_screen = True; e.xcrossing.focus = False; e.xcrossing.state = 0; - XSendEvent( qt_xdisplay(), mVkbdLastEventWindow, False, 0, &e ); + XSendEvent( tqt_xdisplay(), mVkbdLastEventWindow, False, 0, &e ); } } @@ -2228,10 +2228,10 @@ void LockProcess::slotMouseActivity(XEvent *event) // Clicked inside dialog; set focus if (inFrame == TRUE) { WId window = mDialogs.first()->winId(); - XSetInputFocus(qt_xdisplay(), window, RevertToParent, CurrentTime); + XSetInputFocus(tqt_xdisplay(), window, RevertToParent, CurrentTime); fakeFocusIn(window); // Why this needs to be repeated I have no idea... - XSetInputFocus(qt_xdisplay(), window, RevertToParent, CurrentTime); + XSetInputFocus(tqt_xdisplay(), window, RevertToParent, CurrentTime); fakeFocusIn(window); } @@ -2243,7 +2243,7 @@ void LockProcess::slotMouseActivity(XEvent *event) m_dialogPrevY = oldPoint.y(); m_mousePrevX = be->x_root; m_mousePrevY = be->y_root; - XChangeActivePointerGrab( qt_xdisplay(), GRABEVENTS, TQCursor(tqsizeAllCursor).handle(), CurrentTime); + XChangeActivePointerGrab( tqt_xdisplay(), GRABEVENTS, TQCursor(tqsizeAllCursor).handle(), CurrentTime); } } @@ -2263,7 +2263,7 @@ void LockProcess::slotMouseActivity(XEvent *event) if (event->type == ButtonRelease) { m_mouseDown = 0; - XChangeActivePointerGrab( qt_xdisplay(), GRABEVENTS, TQCursor(tqarrowCursor).handle(), CurrentTime); + XChangeActivePointerGrab( tqt_xdisplay(), GRABEVENTS, TQCursor(tqarrowCursor).handle(), CurrentTime); } } diff --git a/kdesktop/lock/querydlg.cc b/kdesktop/lock/querydlg.cc index 5f50cbe25..401370b21 100644 --- a/kdesktop/lock/querydlg.cc +++ b/kdesktop/lock/querydlg.cc @@ -68,8 +68,8 @@ QueryDlg::QueryDlg(LockProcess *parent) if (trinity_desktop_lock_use_system_modal_dialogs) { // 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); } setCaption(i18n("Information Needed")); diff --git a/kdesktop/lock/sakdlg.cc b/kdesktop/lock/sakdlg.cc index d96e0afc3..a79d0e508 100644 --- a/kdesktop/lock/sakdlg.cc +++ b/kdesktop/lock/sakdlg.cc @@ -70,8 +70,8 @@ SAKDlg::SAKDlg(LockProcess *parent) if (trinity_desktop_lock_use_system_modal_dialogs) { // 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); } setCaption(i18n("Desktop Session Locked")); diff --git a/kdesktop/lock/securedlg.cc b/kdesktop/lock/securedlg.cc index 37524f762..7f203f0c0 100644 --- a/kdesktop/lock/securedlg.cc +++ b/kdesktop/lock/securedlg.cc @@ -70,8 +70,8 @@ SecureDlg::SecureDlg(LockProcess *parent) if (trinity_desktop_lock_use_system_modal_dialogs) { // 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); } setCaption(i18n("Secure Desktop Area")); diff --git a/kdesktop/lockeng.cc b/kdesktop/lockeng.cc index 79d27dbcb..3abfd495d 100644 --- a/kdesktop/lockeng.cc +++ b/kdesktop/lockeng.cc @@ -62,7 +62,7 @@ SaverEngine::SaverEngine() sigaction(SIGUSR1, &act, 0L); // Save X screensaver parameters - XGetScreenSaver(qt_xdisplay(), &mXTimeout, &mXInterval, + XGetScreenSaver(tqt_xdisplay(), &mXTimeout, &mXInterval, &mXBlanking, &mXExposures); mState = Waiting; @@ -108,7 +108,7 @@ SaverEngine::~SaverEngine() delete mXAutoLock; // Restore X screensaver parameters - XSetScreenSaver(qt_xdisplay(), mXTimeout, mXInterval, mXBlanking, + XSetScreenSaver(tqt_xdisplay(), mXTimeout, mXInterval, mXBlanking, mXExposures); } @@ -208,7 +208,7 @@ bool SaverEngine::enable( bool e ) //mXAutoLock->changeCornerLockStatus( mLockCornerTopLeft, mLockCornerTopRight, mLockCornerBottomLeft, mLockCornerBottomRight); // We'll handle blanking - XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, PreferBlanking, mXExposures); + XSetScreenSaver(tqt_xdisplay(), mTimeout + 10, mXInterval, PreferBlanking, mXExposures); kdDebug() << "XSetScreenSaver " << mTimeout + 10 << endl; mXAutoLock->start(); @@ -223,8 +223,8 @@ bool SaverEngine::enable( bool e ) mXAutoLock = 0; } - XForceScreenSaver(qt_xdisplay(), ScreenSaverReset ); - XSetScreenSaver(qt_xdisplay(), 0, mXInterval, PreferBlanking, DontAllowExposures); + XForceScreenSaver(tqt_xdisplay(), ScreenSaverReset ); + XSetScreenSaver(tqt_xdisplay(), 0, mXInterval, PreferBlanking, DontAllowExposures); kdDebug(1204) << "Saver Engine disabled" << endl; } @@ -355,7 +355,7 @@ bool SaverEngine::startLockProcess( LockType lock_type ) } mLockProcess.kill(SIGTTOU); // Start lock - XSetScreenSaver(qt_xdisplay(), 0, mXInterval, PreferBlanking, mXExposures); + XSetScreenSaver(tqt_xdisplay(), 0, mXInterval, PreferBlanking, mXExposures); mState = Preparing; if (mXAutoLock) @@ -388,8 +388,8 @@ void SaverEngine::stopLockProcess() { mXAutoLock->start(); } - XForceScreenSaver(qt_xdisplay(), ScreenSaverReset ); - XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, PreferBlanking, mXExposures); + XForceScreenSaver(tqt_xdisplay(), ScreenSaverReset ); + XSetScreenSaver(tqt_xdisplay(), mTimeout + 10, mXInterval, PreferBlanking, mXExposures); } processLockTransactions(); mState = Waiting; @@ -457,8 +457,8 @@ void SaverEngine::lockProcessWaiting() { mXAutoLock->start(); } - XForceScreenSaver(qt_xdisplay(), ScreenSaverReset ); - XSetScreenSaver(qt_xdisplay(), mTimeout + 10, mXInterval, PreferBlanking, mXExposures); + XForceScreenSaver(tqt_xdisplay(), ScreenSaverReset ); + XSetScreenSaver(tqt_xdisplay(), mTimeout + 10, mXInterval, PreferBlanking, mXExposures); } processLockTransactions(); mState = Waiting; @@ -471,8 +471,8 @@ void SaverEngine::lockProcessWaiting() void SaverEngine::idleTimeout() { // disable X screensaver - XForceScreenSaver(qt_xdisplay(), ScreenSaverReset ); - XSetScreenSaver(qt_xdisplay(), 0, mXInterval, PreferBlanking, DontAllowExposures); + XForceScreenSaver(tqt_xdisplay(), ScreenSaverReset ); + XSetScreenSaver(tqt_xdisplay(), 0, mXInterval, PreferBlanking, DontAllowExposures); mSAKProcess->kill(SIGTERM); startLockProcess( DefaultLock ); } diff --git a/kdesktop/minicli.cpp b/kdesktop/minicli.cpp index d5350339d..51520b9e7 100644 --- a/kdesktop/minicli.cpp +++ b/kdesktop/minicli.cpp @@ -322,7 +322,7 @@ void Minicli::accept() if ( lock ) { TQCString appname( "kdesktop" ); - int kicker_screen_number = qt_xscreen(); + int kicker_screen_number = tqt_xscreen(); if ( kicker_screen_number ) appname.sprintf("kdesktop-screen-%d", kicker_screen_number); kapp->dcopClient()->send(appname, "KScreensaverIface", "lock()", TQString("")); diff --git a/kdesktop/pixmapserver.cc b/kdesktop/pixmapserver.cc index bc869d341..58389ae56 100644 --- a/kdesktop/pixmapserver.cc +++ b/kdesktop/pixmapserver.cc @@ -40,7 +40,7 @@ KPixmapServer::KPixmapServer() : TQWidget(0L, "shpixmap comm window") { kapp->installX11EventFilter(this); - pixmap = XInternAtom(qt_xdisplay(), "PIXMAP", false); + pixmap = XInternAtom(tqt_xdisplay(), "PIXMAP", false); } @@ -48,7 +48,7 @@ KPixmapServer::~KPixmapServer() { SelectionIterator it; for (it=m_Selections.begin(); it!=m_Selections.end(); it++) - XSetSelectionOwner(qt_xdisplay(), it.key(), None, CurrentTime); + XSetSelectionOwner(tqt_xdisplay(), it.key(), None, CurrentTime); DataIterator it2; for (it2=m_Data.begin(); it2!=m_Data.end(); it2++) @@ -66,7 +66,7 @@ void KPixmapServer::add(TQString name, TQPixmap *pm, bool overwrite) } TQString str = TQString("KDESHPIXMAP:%1").arg(name); - Atom sel = XInternAtom(qt_xdisplay(), str.latin1(), false); + Atom sel = XInternAtom(tqt_xdisplay(), str.latin1(), false); KPixmapInode pi; pi.handle = pm->handle(); pi.selection = sel; @@ -88,7 +88,7 @@ void KPixmapServer::add(TQString name, TQPixmap *pm, bool overwrite) } else it.data().refcount++; - XSetSelectionOwner(qt_xdisplay(), sel, winId(), CurrentTime); + XSetSelectionOwner(tqt_xdisplay(), sel, winId(), CurrentTime); } @@ -105,7 +105,7 @@ void KPixmapServer::remove(TQString name) SelectionIterator it2 = m_Selections.find(pi.selection); assert(it2 != m_Selections.end()); m_Selections.remove(it2); - XSetSelectionOwner(qt_xdisplay(), pi.selection, None, CurrentTime); + XSetSelectionOwner(tqt_xdisplay(), pi.selection, None, CurrentTime); // Decrease refcount on data DataIterator it3 = m_Data.find(pi.handle); @@ -135,7 +135,7 @@ void KPixmapServer::setOwner(TQString name) if (it == m_Names.end()) return; - XSetSelectionOwner(qt_xdisplay(), it.data().selection, winId(), CurrentTime); + XSetSelectionOwner(tqt_xdisplay(), it.data().selection, winId(), CurrentTime); } @@ -151,7 +151,7 @@ bool KPixmapServer::x11Event(XEvent *event) // Build negative reply XEvent reply; reply.type = SelectionNotify; - reply.xselection.display = qt_xdisplay(); + reply.xselection.display = tqt_xdisplay(); reply.xselection.requestor = ev->requestor; reply.xselection.selection = ev->selection; reply.xselection.target = pixmap; @@ -169,7 +169,7 @@ bool KPixmapServer::x11Event(XEvent *event) if (ev->target != pixmap) { kdDebug(1204) << ID << "illegal target\n"; - XSendEvent(qt_xdisplay(), ev->requestor, false, 0, &reply); + XSendEvent(tqt_xdisplay(), ev->requestor, false, 0, &reply); return true; } @@ -177,7 +177,7 @@ bool KPixmapServer::x11Event(XEvent *event) if (m_Active.contains(ev->property)) { kdDebug(1204) << ID << "selection is busy.\n"; - XSendEvent(qt_xdisplay(), ev->requestor, false, 0, &reply); + XSendEvent(tqt_xdisplay(), ev->requestor, false, 0, &reply); return true; } @@ -186,25 +186,25 @@ bool KPixmapServer::x11Event(XEvent *event) if (it2 == m_Data.end()) { kdDebug(1204) << ID << "selection has been deleted.\n"; - XSendEvent(qt_xdisplay(), ev->requestor, false, 0, &reply); + XSendEvent(tqt_xdisplay(), ev->requestor, false, 0, &reply); return true; } kdDebug(1204) << ID << "request for " << si.name << "\n"; // All OK: pass the pixmap handle. - XChangeProperty(qt_xdisplay(), ev->requestor, ev->property, pixmap, + XChangeProperty(tqt_xdisplay(), ev->requestor, ev->property, pixmap, 32, PropModeReplace, (unsigned char *) &si.handle, 1); it2.data().usecount++; m_Active[ev->property] = si.handle; // Request PropertyNotify events for the target window // XXX: The target window better not be handled by us! - XSelectInput(qt_xdisplay(), ev->requestor, PropertyChangeMask); + XSelectInput(tqt_xdisplay(), ev->requestor, PropertyChangeMask); // Acknowledge to the client and return reply.xselection.property = ev->property; - XSendEvent(qt_xdisplay(), ev->requestor, false, 0, &reply); + XSendEvent(tqt_xdisplay(), ev->requestor, false, 0, &reply); return true; } diff --git a/kdesktop/startupid.cpp b/kdesktop/startupid.cpp index fdde3dbde..3bec0f9af 100644 --- a/kdesktop/startupid.cpp +++ b/kdesktop/startupid.cpp @@ -50,10 +50,10 @@ StartupId::StartupId( TQWidget* parent, const char* name ) hide(); // is TQWidget only because of x11Event() if( kde_startup_status == StartupPre ) { - kde_splash_progress = XInternAtom( qt_xdisplay(), "_KDE_SPLASH_PROGRESS", False ); + kde_splash_progress = XInternAtom( tqt_xdisplay(), "_KDE_SPLASH_PROGRESS", False ); XWindowAttributes attrs; - XGetWindowAttributes( qt_xdisplay(), qt_xrootwin(), &attrs); - XSelectInput( qt_xdisplay(), qt_xrootwin(), attrs.your_event_mask | SubstructureNotifyMask); + XGetWindowAttributes( tqt_xdisplay(), tqt_xrootwin(), &attrs); + XSelectInput( tqt_xdisplay(), tqt_xrootwin(), attrs.your_event_mask | SubstructureNotifyMask); kapp->installX11EventFilter( this ); } connect( &update_timer, TQT_SIGNAL( timeout()), TQT_SLOT( update_startupid())); @@ -119,7 +119,7 @@ void StartupId::gotRemoveStartup( const KStartupInfoId& id_P ) bool StartupId::x11Event( XEvent* e ) { - if( e->type == ClientMessage && e->xclient.window == qt_xrootwin() + if( e->type == ClientMessage && e->xclient.window == tqt_xrootwin() && e->xclient.message_type == kde_splash_progress ) { const char* s = e->xclient.data.b; @@ -188,7 +188,7 @@ void StartupId::start_startupid( const TQString& icon_P ) startup_widget = new TQWidget( NULL, NULL, WX11BypassWM ); XSetWindowAttributes attr; attr.save_under = True; // useful saveunder if possible to avoid redrawing - XChangeWindowAttributes( qt_xdisplay(), startup_widget->winId(), CWSaveUnder, &attr ); + XChangeWindowAttributes( tqt_xdisplay(), startup_widget->winId(), CWSaveUnder, &attr ); } startup_widget->resize( icon_pixmap.width(), icon_pixmap.height()); if( blinking ) @@ -268,7 +268,7 @@ void StartupId::update_startupid() int x, y; int dummy3, dummy4; unsigned int dummy5; - if( !XQueryPointer( qt_xdisplay(), qt_xrootwin(), &dummy1, &dummy2, &x, &y, &dummy3, &dummy4, &dummy5 )) + if( !XQueryPointer( tqt_xdisplay(), tqt_xrootwin(), &dummy1, &dummy2, &x, &y, &dummy3, &dummy4, &dummy5 )) { startup_widget->hide(); update_timer.start( 100, true ); @@ -277,7 +277,7 @@ void StartupId::update_startupid() TQPoint c_pos( x, y ); int cursor_size = 0; #ifdef HAVE_XCURSOR - cursor_size = XcursorGetDefaultSize( qt_xdisplay()); + cursor_size = XcursorGetDefaultSize( tqt_xdisplay()); #endif int X_DIFF; if( cursor_size <= 16 ) @@ -293,7 +293,7 @@ void StartupId::update_startupid() || startup_widget->y() != c_pos.y() + Y_DIFF + yoffset ) startup_widget->move( c_pos.x() + X_DIFF, c_pos.y() + Y_DIFF + yoffset ); startup_widget->show(); - XRaiseWindow( qt_xdisplay(), startup_widget->winId()); + XRaiseWindow( tqt_xdisplay(), startup_widget->winId()); update_timer.start( bouncing ? 30 : 100, true ); TQApplication::flushX(); } diff --git a/kdesktop/xautolock.cc b/kdesktop/xautolock.cc index b69325f17..a2e18a0cd 100644 --- a/kdesktop/xautolock.cc +++ b/kdesktop/xautolock.cc @@ -62,21 +62,21 @@ XAutoLock::XAutoLock() xautolock_useMit = 0; #ifdef HAVE_XIDLE int dummy1; - xautolock_useXidle = XidleQueryExtension( qt_xdisplay(), &dummy1, &dummy1 ); + xautolock_useXidle = XidleQueryExtension( tqt_xdisplay(), &dummy1, &dummy1 ); #endif #ifdef HAVE_XSCREENSAVER int dummy2; if( !xautolock_useXidle ) - xautolock_useMit = XScreenSaverQueryExtension( qt_xdisplay(), &dummy2, &dummy2 ); + xautolock_useMit = XScreenSaverQueryExtension( tqt_xdisplay(), &dummy2, &dummy2 ); #endif if( !xautolock_useXidle && !xautolock_useMit ) { kapp->installX11EventFilter( this ); int (*oldHandler)(Display *, XErrorEvent *); oldHandler = XSetErrorHandler(catchFalseAlarms); - XSync(qt_xdisplay(), False ); - xautolock_initDiy( qt_xdisplay()); - XSync(qt_xdisplay(), False ); + XSync(tqt_xdisplay(), False ); + xautolock_initDiy( tqt_xdisplay()); + XSync(tqt_xdisplay(), False ); XSetErrorHandler(oldHandler); } @@ -115,7 +115,7 @@ void XAutoLock::setDPMS(bool s) #ifdef HAVE_DPMS BOOL on; CARD16 state; - DPMSInfo( qt_xdisplay(), &state, &on ); + DPMSInfo( tqt_xdisplay(), &state, &on ); if (!on) s = false; #endif @@ -184,7 +184,7 @@ void XAutoLock::timerEvent(TQTimerEvent *ev) int (*oldHandler)(Display *, XErrorEvent *) = NULL; if( !xautolock_useXidle && !xautolock_useMit ) { // only the diy way needs special X handler - XSync( qt_xdisplay(), False ); + XSync( tqt_xdisplay(), False ); oldHandler = XSetErrorHandler(catchFalseAlarms); } @@ -202,8 +202,8 @@ void XAutoLock::timerEvent(TQTimerEvent *ev) mLastTimeout = now; - xautolock_queryIdleTime( qt_xdisplay()); - xautolock_queryPointer( qt_xdisplay()); + xautolock_queryIdleTime( tqt_xdisplay()); + xautolock_queryPointer( tqt_xdisplay()); if( !xautolock_useXidle && !xautolock_useMit ) XSetErrorHandler(oldHandler); @@ -220,7 +220,7 @@ void XAutoLock::timerEvent(TQTimerEvent *ev) #ifdef HAVE_DPMS BOOL on; CARD16 state; - DPMSInfo( qt_xdisplay(), &state, &on ); + DPMSInfo( tqt_xdisplay(), &state, &on ); //kdDebug() << "DPMSInfo " << state << " " << on << endl; // If DPMS is active, it makes XScreenSaverQueryInfo() report idle time @@ -232,7 +232,7 @@ void XAutoLock::timerEvent(TQTimerEvent *ev) if(!on && mDPMS) { activate = false; #ifdef HAVE_XSCREENSAVER - XForceScreenSaver(qt_xdisplay(), ScreenSaverReset ); + XForceScreenSaver(tqt_xdisplay(), ScreenSaverReset ); #endif resetTrigger(); } @@ -241,7 +241,7 @@ void XAutoLock::timerEvent(TQTimerEvent *ev) #ifdef HAVE_XSCREENSAVER static XScreenSaverInfo* mitInfo = 0; if (!mitInfo) mitInfo = XScreenSaverAllocInfo (); - if (XScreenSaverQueryInfo (qt_xdisplay(), DefaultRootWindow (qt_xdisplay()), mitInfo)) { + if (XScreenSaverQueryInfo (tqt_xdisplay(), DefaultRootWindow (tqt_xdisplay()), mitInfo)) { //kdDebug() << "XScreenSaverQueryInfo " << mitInfo->state << " " << ScreenSaverDisabled << endl; if (mitInfo->state == ScreenSaverDisabled) activate = false; @@ -265,7 +265,7 @@ bool XAutoLock::x11Event( XEvent* ev ) bool XAutoLock::ignoreWindow( WId w ) { - if( w != qt_xrootwin() && TQWidget::find( w )) + if( w != tqt_xrootwin() && TQWidget::find( w )) return true; return false; } |