Rename additional global functions and variables for tqt3

pull/2/head
Timothy Pearson 13 years ago
parent e8a1cdc01d
commit 8bd291c0e8

@ -178,7 +178,7 @@ KCMInit::KCMInit( KCmdLineArgs* args )
KConfig config("kcmdisplayrc", true );
config.setGroup("X11");
bool multihead = !config.readBoolEntry( "disableMultihead", false) &&
(ScreenCount(qt_xdisplay()) > 1);
(ScreenCount(tqt_xdisplay()) > 1);
// Pass env. var to tdeinit.
TQCString name = "TDE_MULTIHEAD";
TQCString value = multihead ? "true" : "false";

@ -107,7 +107,7 @@ KAccessApp::KAccessApp(bool allowStyles, bool GUIenabled)
initMasks();
XkbStateRec state_return;
XkbGetState (qt_xdisplay(), XkbUseCoreKbd, &state_return);
XkbGetState (tqt_xdisplay(), XkbUseCoreKbd, &state_return);
unsigned char latched = XkbStateMods (&state_return);
unsigned char locked = XkbModLocks (&state_return);
state = ((int)locked)<<8 | latched;
@ -138,23 +138,23 @@ void KAccessApp::readSettings()
// select bell events if we need them
int state = (_artsBell || _visibleBell) ? XkbBellNotifyMask : 0;
XkbSelectEvents(qt_xdisplay(), XkbUseCoreKbd, XkbBellNotifyMask, state);
XkbSelectEvents(tqt_xdisplay(), XkbUseCoreKbd, XkbBellNotifyMask, state);
// deactivate system bell if not needed
if (!_systemBell)
XkbChangeEnabledControls(qt_xdisplay(), XkbUseCoreKbd, XkbAudibleBellMask, 0);
XkbChangeEnabledControls(tqt_xdisplay(), XkbUseCoreKbd, XkbAudibleBellMask, 0);
else
XkbChangeEnabledControls(qt_xdisplay(), XkbUseCoreKbd, XkbAudibleBellMask, XkbAudibleBellMask);
XkbChangeEnabledControls(tqt_xdisplay(), XkbUseCoreKbd, XkbAudibleBellMask, XkbAudibleBellMask);
// keyboard -------------------------------------------------------------
config->setGroup("Keyboard");
// get keyboard state
XkbDescPtr xkb = XkbGetMap(qt_xdisplay(), 0, XkbUseCoreKbd);
XkbDescPtr xkb = XkbGetMap(tqt_xdisplay(), 0, XkbUseCoreKbd);
if (!xkb)
return;
if (XkbGetControls(qt_xdisplay(), XkbAllControlsMask, xkb) != Success)
if (XkbGetControls(tqt_xdisplay(), XkbAllControlsMask, xkb) != Success)
return;
// sticky keys
@ -279,10 +279,10 @@ void KAccessApp::readSettings()
if (dialog == 0)
requestedFeatures = features;
// set state
XkbSetControls(qt_xdisplay(), XkbControlsEnabledMask | XkbMouseKeysAccelMask | XkbStickyKeysMask | XkbSlowKeysMask | XkbBounceKeysMask | XkbAccessXKeysMask | XkbAccessXTimeoutMask, xkb);
XkbSetControls(tqt_xdisplay(), XkbControlsEnabledMask | XkbMouseKeysAccelMask | XkbStickyKeysMask | XkbSlowKeysMask | XkbBounceKeysMask | XkbAccessXKeysMask | XkbAccessXTimeoutMask, xkb);
// select AccessX events
XkbSelectEvents(qt_xdisplay(), XkbUseCoreKbd, XkbAllEventsMask, XkbAllEventsMask);
XkbSelectEvents(tqt_xdisplay(), XkbUseCoreKbd, XkbAllEventsMask, XkbAllEventsMask);
if (!_artsBell && !_visibleBell && !_gestureConfirmation
&& !_kNotifyModifiers && !_kNotifyAccessX) {
@ -290,13 +290,13 @@ void KAccessApp::readSettings()
// We will exit, but the features need to stay configured
uint ctrls = XkbStickyKeysMask | XkbSlowKeysMask | XkbBounceKeysMask | XkbMouseKeysMask | XkbAudibleBellMask | XkbControlsNotifyMask;
uint values = xkb->ctrls->enabled_ctrls & ctrls;
XkbSetAutoResetControls(qt_xdisplay(), ctrls, &ctrls, &values);
XkbSetAutoResetControls(tqt_xdisplay(), ctrls, &ctrls, &values);
exit(0);
} else {
// reset them after program exit
uint ctrls = XkbStickyKeysMask | XkbSlowKeysMask | XkbBounceKeysMask | XkbMouseKeysMask | XkbAudibleBellMask | XkbControlsNotifyMask;
uint values = XkbAudibleBellMask;
XkbSetAutoResetControls(qt_xdisplay(), ctrls, &ctrls, &values);
XkbSetAutoResetControls(tqt_xdisplay(), ctrls, &ctrls, &values);
}
delete overlay;
@ -319,14 +319,14 @@ void KAccessApp::initMasks() {
int mask = modifierKeys[i].mask;
if (mask == 0)
if (modifierKeys[i].keysym != 0)
mask = XkbKeysymToModifiers (qt_xdisplay(), modifierKeys[i].keysym);
mask = XkbKeysymToModifiers (tqt_xdisplay(), modifierKeys[i].keysym);
else if (!strcmp(modifierKeys[i].name, "Win"))
mask = KKeyNative::modX(KKey::WIN);
else
mask = XkbKeysymToModifiers (qt_xdisplay(), XK_Mode_switch)
| XkbKeysymToModifiers (qt_xdisplay(), XK_ISO_Level3_Shift)
| XkbKeysymToModifiers (qt_xdisplay(), XK_ISO_Level3_Latch)
| XkbKeysymToModifiers (qt_xdisplay(), XK_ISO_Level3_Lock);
mask = XkbKeysymToModifiers (tqt_xdisplay(), XK_Mode_switch)
| XkbKeysymToModifiers (tqt_xdisplay(), XK_ISO_Level3_Shift)
| XkbKeysymToModifiers (tqt_xdisplay(), XK_ISO_Level3_Latch)
| XkbKeysymToModifiers (tqt_xdisplay(), XK_ISO_Level3_Lock);
int bit = maskToBit (mask);
if (bit != -1 && keys[bit] == -1)
@ -376,7 +376,7 @@ void KAccessApp::activeWindowChanged(WId wid)
void KAccessApp::xkbStateNotify () {
XkbStateRec state_return;
XkbGetState (qt_xdisplay(), XkbUseCoreKbd, &state_return);
XkbGetState (tqt_xdisplay(), XkbUseCoreKbd, &state_return);
unsigned char latched = XkbStateMods (&state_return);
unsigned char locked = XkbModLocks (&state_return);
int mods = ((int)locked)<<8 | latched;
@ -430,7 +430,7 @@ void KAccessApp::xkbBellNotify(XkbBellNotifyEvent *event)
WId id = _activeWindow;
NETRect frame, window;
NETWinInfo net(qt_xdisplay(), id, desktop()->winId(), 0);
NETWinInfo net(tqt_xdisplay(), id, desktop()->winId(), 0);
net.kdeGeometry(frame, window);
@ -733,7 +733,7 @@ void KAccessApp::xkbControlsNotify(XkbControlsNotifyEvent *event)
else if ((enabled | disabled) == XkbStickyKeysMask)
explanation = i18n("You pressed the Shift key 5 consecutive times or an application has requested to change this setting.");
else if ((enabled | disabled) == XkbMouseKeysMask) {
TQString shortcut = mouseKeysShortcut(qt_xdisplay());
TQString shortcut = mouseKeysShortcut(tqt_xdisplay());
if (!shortcut.isEmpty() && !shortcut.isNull())
explanation = i18n("You pressed %1 or an application has requested to change this setting.").arg(shortcut);
}

@ -27,7 +27,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char * argv[] )
}
kdDebug() << "Xlib XKB extension major=" << major << " minor=" << minor << endl;
// we need an application object for qt_xdisplay()
// we need an application object for tqt_xdisplay()
KAccessApp app;
// verify the X server has matching XKB extension
@ -35,7 +35,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char * argv[] )
int opcode_rtrn;
int error_rtrn;
int xkb_opcode;
if (!XkbQueryExtension(qt_xdisplay(), &opcode_rtrn, &xkb_opcode, &error_rtrn,
if (!XkbQueryExtension(tqt_xdisplay(), &opcode_rtrn, &xkb_opcode, &error_rtrn,
&major, &minor))
{
kdError() << "X server has not matching XKB extension" << endl;

@ -51,8 +51,8 @@
static TQCString desktopConfigname()
{
int desktop=0;
if (qt_xdisplay())
desktop = DefaultScreen(qt_xdisplay());
if (tqt_xdisplay())
desktop = DefaultScreen(tqt_xdisplay());
TQCString name;
if (desktop == 0)
name = "kdesktoprc";

@ -192,7 +192,7 @@ int KBackgroundRenderer::doBackground(bool quit)
// some dithering may be needed even with bpb==15/16, so don't use tileWidth==1
// for them
// with tileWidth>2, repainting the desktop causes nasty effect (XFree86 4.1.0 )
if( XQueryBestTile( qt_xdisplay(), qt_xrootwin(), tile_val, tile_val,
if( XQueryBestTile( tqt_xdisplay(), tqt_xrootwin(), tile_val, tile_val,
&tileWidth, &tileHeight ) != Success )
tileWidth = tileHeight = tile_val; // some defaults
}
@ -549,12 +549,12 @@ bool KBackgroundRenderer::canTile() const
return m_TilingEnabled && optimize();
}
extern bool qt_use_xrender; // in Qt ( qapplication_x11.cpp )
extern bool tqt_use_xrender; // in Qt ( qapplication_x11.cpp )
void KBackgroundRenderer::wallpaperBlend()
{
if( !enabled() || wallpaperMode() == NoWallpaper
|| (blendMode() == NoBlending && ( qt_use_xrender || !m_Wallpaper.hasAlphaBuffer()))) {
|| (blendMode() == NoBlending && ( tqt_use_xrender || !m_Wallpaper.hasAlphaBuffer()))) {
fastWallpaperBlend();
}
else {
@ -1030,8 +1030,8 @@ KVirtualBGRenderer::KVirtualBGRenderer( int desk, KConfig *config )
// The following code is borrowed from KBackgroundSettings::KBackgroundSettings
if (!config) {
int screen_number = 0;
if (qt_xdisplay())
screen_number = DefaultScreen(qt_xdisplay());
if (tqt_xdisplay())
screen_number = DefaultScreen(tqt_xdisplay());
TQCString configname;
if (screen_number == 0)
configname = "kdesktoprc";

@ -493,8 +493,8 @@ KBackgroundSettings::KBackgroundSettings(int desk, int screen, bool drawBackgrou
if (!config) {
int screen_number = 0;
if (qt_xdisplay())
screen_number = DefaultScreen(qt_xdisplay());
if (tqt_xdisplay())
screen_number = DefaultScreen(tqt_xdisplay());
TQCString configname;
if (screen_number == 0)
configname = "kdesktoprc";
@ -1215,7 +1215,7 @@ void KGlobalBackgroundSettings::readSettings()
m_CacheSize = m_pConfig->readNumEntry("CacheSize", _defCacheSize);
m_Names.clear();
NETRootInfo info( qt_xdisplay(), NET::DesktopNames | NET::NumberOfDesktops );
NETRootInfo info( tqt_xdisplay(), NET::DesktopNames | NET::NumberOfDesktops );
m_bDrawBackgroundPerScreen.resize(info.numberOfDesktops());
for ( int i = 0 ; i < info.numberOfDesktops() ; ++i )
m_bDrawBackgroundPerScreen[i] = m_pConfig->readBoolEntry( TQString("DrawBackgroundPerScreen_%1").arg(i), _defDrawBackgroundPerScreen );

@ -45,8 +45,8 @@ KBackground::KBackground(TQWidget *parent, const char *name, const TQStringList
: KCModule(KBackGndFactory::instance(), parent, name)
{
int screen_number = 0;
if (qt_xdisplay())
screen_number = DefaultScreen(qt_xdisplay());
if (tqt_xdisplay())
screen_number = DefaultScreen(tqt_xdisplay());
TQCString configname;
if (screen_number == 0)
configname = "kdesktoprc";
@ -105,8 +105,8 @@ void KBackground::save()
client->attach();
int screen_number = 0;
if (qt_xdisplay())
screen_number = DefaultScreen(qt_xdisplay());
if (tqt_xdisplay())
screen_number = DefaultScreen(tqt_xdisplay());
TQCString appname;
if (screen_number == 0)
appname = "kdesktop";

@ -399,7 +399,7 @@ void KColorScheme::save()
#if defined Q_WS_X11 && !defined K_WS_QTONLY
// Undo the property xrdb has placed on the root window (if any),
// i.e. remove all entries, including ours
XDeleteProperty( qt_xdisplay(), qt_xrootwin(), XA_RESOURCE_MANAGER );
XDeleteProperty( tqt_xdisplay(), tqt_xrootwin(), XA_RESOURCE_MANAGER );
#endif
}
runRdb( flags ); // Save the palette to qtrc for KStyles

@ -856,7 +856,7 @@ void KDisplayConfig::identifyMonitors () {
ScreenInfo *randr_screen_info;
XRROutputInfo *output_info;
randr_display = qt_xdisplay();
randr_display = tqt_xdisplay();
randr_screen_info = m_randrsimple->read_screen_info(randr_display);
for (i = 0; i < m_screenInfoArray.count(); i++) {

@ -94,7 +94,7 @@ extern "C" {
KConfig *cfg = new KConfig("kcmdisplayrc", true /*readonly*/, false /*no globals*/);
cfg->setGroup("DisplayEnergy");
Display *dpy = qt_xdisplay();
Display *dpy = tqt_xdisplay();
CARD16 pre_configured_status;
BOOL pre_configured_enabled;
CARD16 pre_configured_standby;
@ -153,7 +153,7 @@ KEnergy::KEnergy(TQWidget *parent, const char *name)
#ifdef HAVE_DPMS
int dummy;
m_bDPMS = DPMSQueryExtension(qt_xdisplay(), &dummy, &dummy);
m_bDPMS = DPMSQueryExtension(tqt_xdisplay(), &dummy, &dummy);
#endif
TQVBoxLayout *top = new TQVBoxLayout(this, 0, KDialog::spacingHint());
@ -333,7 +333,7 @@ void KEnergy::applySettings(bool enable, int standby, int suspend, int off)
XErrFunc defaultHandler;
defaultHandler = XSetErrorHandler(dropError);
Display *dpy = qt_xdisplay();
Display *dpy = tqt_xdisplay();
int dummy;
bool hasDPMS = DPMSQueryExtension(dpy, &dummy, &dummy);

@ -164,7 +164,7 @@ int main(int argc, char ** argv)
bool ok;
long id = args->getOption("parent").toLong(&ok);
if (ok)
XSetTransientForHint( qt_xdisplay(), dlg.winId(), id );
XSetTransientForHint( tqt_xdisplay(), dlg.winId(), id );
}
#endif
args->clear();

@ -495,8 +495,8 @@ int FontAASettings::exec()
static TQCString desktopConfigName()
{
int desktop=0;
if (qt_xdisplay())
desktop = DefaultScreen(qt_xdisplay());
if (tqt_xdisplay())
desktop = DefaultScreen(tqt_xdisplay());
TQCString name;
if (desktop == 0)
name = "kdesktoprc";

@ -62,23 +62,23 @@ extern "C"
// use a default value for theme only if it's not configured at all, not even in X resources
if( theme.isEmpty()
&& TQCString( XGetDefault( qt_xdisplay(), "Xcursor", "theme" )).isEmpty()
&& TQCString( XcursorGetTheme( qt_xdisplay())).isEmpty())
&& TQCString( XGetDefault( tqt_xdisplay(), "Xcursor", "theme" )).isEmpty()
&& TQCString( XcursorGetTheme( tqt_xdisplay())).isEmpty())
{
theme = "default";
}
// Apply the KDE cursor theme to ourselves
if( !theme.isEmpty())
XcursorSetTheme(qt_xdisplay(), theme.data());
XcursorSetTheme(tqt_xdisplay(), theme.data());
if (!size.isEmpty())
XcursorSetDefaultSize(qt_xdisplay(), size.toUInt());
XcursorSetDefaultSize(tqt_xdisplay(), size.toUInt());
// Load the default cursor from the theme and apply it to the root window.
Cursor handle = XcursorLibraryLoadCursor(qt_xdisplay(), "left_ptr");
XDefineCursor(qt_xdisplay(), qt_xrootwin(), handle);
XFreeCursor(qt_xdisplay(), handle); // Don't leak the cursor
Cursor handle = XcursorLibraryLoadCursor(tqt_xdisplay(), "left_ptr");
XDefineCursor(tqt_xdisplay(), tqt_xrootwin(), handle);
XFreeCursor(tqt_xdisplay(), handle); // Don't leak the cursor
// Tell klauncher to set the XCURSOR_THEME and XCURSOR_SIZE environment
// variables when launching applications.

@ -34,8 +34,8 @@
#include "previewwidget.h"
extern bool qt_has_xft;
extern bool qt_use_xrender;
extern bool tqt_has_xft;
extern bool tqt_use_xrender;
namespace {
@ -314,7 +314,7 @@ void PreviewWidget::paintEvent( TQPaintEvent * )
p.fillRect( rect(), colorGroup().brush( TQColorGroup::Background ) );
Picture dest;
if ( !qt_has_xft || !qt_use_xrender ) {
if ( !tqt_has_xft || !tqt_use_xrender ) {
XRenderPictFormat *fmt = XRenderFindVisualFormat( x11Display(), (Visual*)buffer.x11Visual() );
dest = XRenderCreatePicture( x11Display(), buffer.handle(), fmt, 0, NULL );
} else
@ -334,7 +334,7 @@ void PreviewWidget::paintEvent( TQPaintEvent * )
bitBlt( this, 0, 0, &buffer );
if ( !qt_has_xft || !qt_use_xrender )
if ( !tqt_has_xft || !tqt_use_xrender )
XRenderFreePicture( x11Display(), dest );
}

@ -90,7 +90,7 @@ ProxyWidget *ConfigModule::module()
void ConfigModule::deleteClient()
{
if (_embedWidget)
XKillClient(qt_xdisplay(), _embedWidget->embeddedWinId());
XKillClient(tqt_xdisplay(), _embedWidget->embeddedWinId());
delete _rootProcess;
_rootProcess = 0;
@ -229,7 +229,7 @@ void ConfigModule::runAsRoot()
void ConfigModule::rootExited(KProcess *)
{
if (_embedWidget->embeddedWinId())
XDestroyWindow(qt_xdisplay(), _embedWidget->embeddedWinId());
XDestroyWindow(tqt_xdisplay(), _embedWidget->embeddedWinId());
delete _embedWidget;
_embedWidget = 0;

@ -139,10 +139,10 @@ void ModifiersModule::setupMacModifierKeys()
//const int CODE_Alt_L = 0x40, CODE_Alt_R = 0x71;
int keyCodeMin, keyCodeMax, nKeyCodes, nSymsPerCode;
XDisplayKeycodes( qt_xdisplay(), &keyCodeMin, &keyCodeMax );
XDisplayKeycodes( tqt_xdisplay(), &keyCodeMin, &keyCodeMax );
nKeyCodes = keyCodeMax - keyCodeMin + 1;
KeySym* rgKeySyms = XGetKeyboardMapping( qt_xdisplay(), keyCodeMin, nKeyCodes, &nSymsPerCode );
XModifierKeymap* xmk = XGetModifierMapping( qt_xdisplay() );
KeySym* rgKeySyms = XGetKeyboardMapping( tqt_xdisplay(), keyCodeMin, nKeyCodes, &nSymsPerCode );
XModifierKeymap* xmk = XGetModifierMapping( tqt_xdisplay() );
SET_CODE_SYM( CODE_Ctrl_L, XK_Super_L )
SET_CODE_SYM( CODE_Ctrl_R, XK_Super_R )
@ -159,8 +159,8 @@ void ModifiersModule::setupMacModifierKeys()
//SET_MOD_CODE( Mod1MapIndex, CODE_Win_L, CODE_Win_R );
//SET_MOD_CODE( Mod4MapIndex, CODE_Ctrl_L, CODE_Ctrl_R );
XSetModifierMapping( qt_xdisplay(), xmk );
XChangeKeyboardMapping( qt_xdisplay(), keyCodeMin, nSymsPerCode, rgKeySyms, nKeyCodes );
XSetModifierMapping( tqt_xdisplay(), xmk );
XChangeKeyboardMapping( tqt_xdisplay(), keyCodeMin, nSymsPerCode, rgKeySyms, nKeyCodes );
XFree( rgKeySyms );
XFreeModifiermap( xmk );
}
@ -291,7 +291,7 @@ void ModifiersModule::updateWidgets()
m_pchkMacSwap->setEnabled( false );
}
XModifierKeymap* xmk = XGetModifierMapping( qt_xdisplay() );
XModifierKeymap* xmk = XGetModifierMapping( tqt_xdisplay() );
for( int iKey = m_plstXMods->columns()-1; iKey < xmk->max_keypermod; iKey++ )
m_plstXMods->addColumn( i18n("Key %1").arg(iKey+1) );
@ -300,7 +300,7 @@ void ModifiersModule::updateWidgets()
for( int iMod = 0; iMod < 8; iMod++ ) {
// Find the default modifier index for the Win key.
/*if( iMod > Mod2Index ) {
uint symX = XKeycodeToKeysym( qt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * iMod], 0 );
uint symX = XKeycodeToKeysym( tqt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * iMod], 0 );
if( symX == XK_Super_L || symX == XK_Super_R )
iModWinDef = iMod;
else if( iModWinDef == -1 && (symX == XK_Meta_L || symX == XK_Meta_R) )
@ -309,7 +309,7 @@ void ModifiersModule::updateWidgets()
// Insert items into X modifier map list
for( int iKey = 0; iKey < xmk->max_keypermod; iKey++ ) {
uint symX = XKeycodeToKeysym( qt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * iMod + iKey], 0 );
uint symX = XKeycodeToKeysym( tqt_xdisplay(), xmk->modifiermap[xmk->max_keypermod * iMod + iKey], 0 );
m_plstXMods->itemAtIndex( iMod )->setText( 1 + iKey, XKeysymToString( symX ) );
}
}

@ -57,7 +57,7 @@ KickerConfig::KickerConfig(TQWidget *parent, const char *name)
configFileWatch(new KDirWatch(this)),
m_currentPanelIndex(0)
{
m_screenNumber = qt_xdisplay() ? DefaultScreen(qt_xdisplay()) : 0;
m_screenNumber = tqt_xdisplay() ? DefaultScreen(tqt_xdisplay()) : 0;
KickerSettings::instance(configName().latin1());

@ -128,12 +128,12 @@ void KDesktopConfig::load()
void KDesktopConfig::load( bool useDefaults )
{
// get number of desktops
NETRootInfo info( qt_xdisplay(), NET::NumberOfDesktops | NET::DesktopNames );
NETRootInfo info( tqt_xdisplay(), NET::NumberOfDesktops | NET::DesktopNames );
int n = info.numberOfDesktops();
int konq_screen_number = 0;
if (qt_xdisplay())
konq_screen_number = DefaultScreen(qt_xdisplay());
if (tqt_xdisplay())
konq_screen_number = DefaultScreen(tqt_xdisplay());
TQCString groupname;
if (konq_screen_number == 0)
@ -193,7 +193,7 @@ void KDesktopConfig::load( bool useDefaults )
void KDesktopConfig::save()
{
NETRootInfo info( qt_xdisplay(), NET::NumberOfDesktops | NET::DesktopNames );
NETRootInfo info( tqt_xdisplay(), NET::NumberOfDesktops | NET::DesktopNames );
// set desktop names
for(int i = 1; i <= maxDesktops; i++)
{
@ -204,11 +204,11 @@ void KDesktopConfig::save()
info.setNumberOfDesktops(_numInput->value());
info.activate();
XSync(qt_xdisplay(), FALSE);
XSync(tqt_xdisplay(), FALSE);
int konq_screen_number = 0;
if (qt_xdisplay())
konq_screen_number = DefaultScreen(qt_xdisplay());
if (tqt_xdisplay())
konq_screen_number = DefaultScreen(tqt_xdisplay());
TQCString appname;
if (konq_screen_number == 0)

@ -596,13 +596,13 @@ void runRdb( uint flags )
if (!qt_settings_timestamp) {
TQString atomname("_QT_SETTINGS_TIMESTAMP_");
atomname += XDisplayName( 0 ); // Use the $DISPLAY envvar.
qt_settings_timestamp = XInternAtom( qt_xdisplay(), atomname.latin1(), False);
qt_settings_timestamp = XInternAtom( tqt_xdisplay(), atomname.latin1(), False);
}
TQBuffer stamp;
TQDataStream s(stamp.buffer(), IO_WriteOnly);
s << settingsstamp;
XChangeProperty( qt_xdisplay(), qt_xrootwin(), qt_settings_timestamp,
XChangeProperty( tqt_xdisplay(), tqt_xrootwin(), qt_settings_timestamp,
qt_settings_timestamp, 8, PropModeReplace,
(unsigned char*) stamp.buffer().data(),
stamp.buffer().size() );

@ -869,7 +869,7 @@ void KTheme::addPreview()
{
TQString file = m_kgd->saveLocation( "themes", m_name + "/" ) + m_name + ".preview.png";
kdDebug() << "Adding preview: " << file << endl;
TQPixmap snapshot = TQPixmap::grabWindow( qt_xrootwin() );
TQPixmap snapshot = TQPixmap::grabWindow( tqt_xrootwin() );
snapshot.save( file, "PNG" );
}

@ -56,7 +56,7 @@ extern "C"
KDE_EXPORT bool test_randr()
{
int eventBase, errorBase;
if( XRRQueryExtension(qt_xdisplay(), &eventBase, &errorBase ) )
if( XRRQueryExtension(tqt_xdisplay(), &eventBase, &errorBase ) )
return true;
return false;
}

@ -45,7 +45,7 @@ KRandrPassivePopup* KRandrPassivePopup::message( const TQString &caption, const
void KRandrPassivePopup::startWatchingWidget( TQWidget* widget_P )
{
static Atom wm_state = XInternAtom( qt_xdisplay() , "WM_STATE", False );
static Atom wm_state = XInternAtom( tqt_xdisplay() , "WM_STATE", False );
Window win = widget_P->winId();
bool x11_events = false;
for(;;)
@ -53,7 +53,7 @@ void KRandrPassivePopup::startWatchingWidget( TQWidget* widget_P )
Window root, parent;
Window* children;
unsigned int nchildren;
XQueryTree( qt_xdisplay(), win, &root, &parent, &children, &nchildren );
XQueryTree( tqt_xdisplay(), win, &root, &parent, &children, &nchildren );
if( children != NULL )
XFree( children );
if( win == root ) // huh?
@ -69,8 +69,8 @@ void KRandrPassivePopup::startWatchingWidget( TQWidget* widget_P )
else
{
XWindowAttributes attrs;
XGetWindowAttributes( qt_xdisplay(), win, &attrs );
XSelectInput( qt_xdisplay(), win, attrs.your_event_mask | StructureNotifyMask );
XGetWindowAttributes( tqt_xdisplay(), win, &attrs );
XSelectInput( tqt_xdisplay(), win, attrs.your_event_mask | StructureNotifyMask );
watched_windows.append( win );
x11_events = true;
}
@ -78,7 +78,7 @@ void KRandrPassivePopup::startWatchingWidget( TQWidget* widget_P )
int format;
unsigned long nitems, after;
unsigned char* data;
if( XGetWindowProperty( qt_xdisplay(), win, wm_state, 0, 0, False, AnyPropertyType,
if( XGetWindowProperty( tqt_xdisplay(), win, wm_state, 0, 0, False, AnyPropertyType,
&type, &format, &nitems, &after, &data ) == Success )
{
if( data != NULL )

@ -582,7 +582,7 @@ void KScreenSaver::slotPreviewExited(KProcess *)
(mMonitorLabel->height()-186)/2+14, 151, 115);
mMonitor->show();
// So that hacks can XSelectInput ButtonPressMask
XSelectInput(qt_xdisplay(), mMonitor->winId(), widgetEventMask );
XSelectInput(tqt_xdisplay(), mMonitor->winId(), widgetEventMask );
if (mSelected >= 0) {
mPreviewProc->clearArguments();
@ -781,7 +781,7 @@ void KScreenSaver::slotTest()
mTestWin->raise();
mTestWin->setFocus();
// So that hacks can XSelectInput ButtonPressMask
XSelectInput(qt_xdisplay(), mTestWin->winId(), widgetEventMask );
XSelectInput(tqt_xdisplay(), mTestWin->winId(), widgetEventMask );
grabMouse();
grabKeyboard();

@ -97,12 +97,12 @@ extern "C"
TQDataStream d(properties, IO_WriteOnly);
d.setVersion( 3 ); // Qt2 apps need this.
d << kapp->palette() << KGlobalSettings::generalFont();
Atom a = XInternAtom(qt_xdisplay(), "_QT_DESKTOP_PROPERTIES", false);
Atom a = XInternAtom(tqt_xdisplay(), "_QT_DESKTOP_PROPERTIES", false);
// do it for all root windows - multihead support
int screen_count = ScreenCount(qt_xdisplay());
int screen_count = ScreenCount(tqt_xdisplay());
for (int i = 0; i < screen_count; i++)
XChangeProperty(qt_xdisplay(), RootWindow(qt_xdisplay(), i),
XChangeProperty(tqt_xdisplay(), RootWindow(tqt_xdisplay(), i),
a, a, 8, PropModeReplace,
(unsigned char*) properties.data(), properties.size());
#endif

@ -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;

@ -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);
}
// -----------------------------------------------------------------------------

@ -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)
{

@ -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 );

@ -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"));

@ -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"));

@ -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();
}

@ -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);