Replaced time related '#define' with actual strings

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/240/head
Michele Calgaro 1 year ago
parent 80c2465371
commit 73dba53e4a
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1602,7 +1602,7 @@ void NETRootInfo::updateSupportedProperties( Atom atom )
} }
void NETRootInfo::setActiveWindow(Window window) { void NETRootInfo::setActiveWindow(Window window) {
setActiveWindow( window, FromUnknown, GET_QT_X_USER_TIME(), None ); setActiveWindow( window, FromUnknown, get_tqt_x_user_time(), None );
} }
void NETRootInfo::setActiveWindow(Window window, NET::RequestSource src, void NETRootInfo::setActiveWindow(Window window, NET::RequestSource src,
@ -1811,7 +1811,7 @@ void NETRootInfo::moveResizeWindowRequest(Window window, int flags, int x, int y
void NETRootInfo::restackRequest(Window window, Window above, int detail) void NETRootInfo::restackRequest(Window window, Window above, int detail)
{ {
restackRequest( window, FromTool, above, detail, GET_QT_X_USER_TIME() ); restackRequest( window, FromTool, above, detail, get_tqt_x_user_time() );
} }
void NETRootInfo::restackRequest(Window window, RequestSource src, Window above, int detail, Time timestamp ) void NETRootInfo::restackRequest(Window window, RequestSource src, Window above, int detail, Time timestamp )

@ -2281,16 +2281,16 @@ void TDEApplication::updateUserTimestamp( unsigned long time )
time = ev.xproperty.time; time = ev.xproperty.time;
XDestroyWindow( display, w ); XDestroyWindow( display, w );
} }
if( GET_QT_X_USER_TIME() == 0 if( get_tqt_x_user_time() == 0
|| NET::timestampCompare( time, GET_QT_X_USER_TIME() ) > 0 ) // check time > tqt_x_user_time || NET::timestampCompare( time, get_tqt_x_user_time() ) > 0 ) // check time > tqt_x_user_time
SET_QT_X_USER_TIME(time); set_tqt_x_user_time(time);
#endif #endif
} }
unsigned long TDEApplication::userTimestamp() const unsigned long TDEApplication::userTimestamp() const
{ {
#if defined Q_WS_X11 #if defined Q_WS_X11
return GET_QT_X_USER_TIME(); return get_tqt_x_user_time();
#else #else
return 0; return 0;
#endif #endif
@ -2300,7 +2300,7 @@ void TDEApplication::updateRemoteUserTimestamp( const TQCString& dcopId, unsigne
{ {
#if defined Q_WS_X11 #if defined Q_WS_X11
if( time == 0 ) if( time == 0 )
time = GET_QT_X_USER_TIME(); time = get_tqt_x_user_time();
DCOPRef( dcopId, "MainApplication-Interface" ).call( "updateUserTimestamp", time ); DCOPRef( dcopId, "MainApplication-Interface" ).call( "updateUserTimestamp", time );
#endif #endif
} }

@ -930,7 +930,7 @@ TQCString TDEStartupInfo::createNewStartupId()
if (!gethostname( hostname, 255 )) if (!gethostname( hostname, 255 ))
hostname[sizeof(hostname)-1] = '\0'; hostname[sizeof(hostname)-1] = '\0';
TQCString id = TQString(TQString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec ) TQCString id = TQString(TQString( "%1;%2;%3;%4_TIME%5" ).arg( hostname ).arg( tm.tv_sec )
.arg( tm.tv_usec ).arg( getpid()).arg( GET_QT_X_USER_TIME() )).utf8(); .arg( tm.tv_usec ).arg( getpid()).arg( get_tqt_x_user_time() )).utf8();
kdDebug( 172 ) << "[tdecore-tdestartupinfo] creating: " << id << ":" << tqAppName() << endl; kdDebug( 172 ) << "[tdecore-tdestartupinfo] creating: " << id << ":" << tqAppName() << endl;
return id; return id;
} }

@ -239,7 +239,7 @@ void KWin::activateWindow( WId win, long time )
#ifdef Q_WS_X11 #ifdef Q_WS_X11
NETRootInfo info( tqt_xdisplay(), 0 ); NETRootInfo info( tqt_xdisplay(), 0 );
if( time == 0 ) if( time == 0 )
time = GET_QT_X_USER_TIME(); time = get_tqt_x_user_time();
info.setActiveWindow( win, NET::FromApplication, time, info.setActiveWindow( win, NET::FromApplication, time,
kapp->activeWindow() ? kapp->activeWindow()->winId() : 0 ); kapp->activeWindow() ? kapp->activeWindow()->winId() : 0 );
#endif // Q_WS_X11 ... #endif // Q_WS_X11 ...
@ -251,7 +251,7 @@ void KWin::forceActiveWindow( WId win, long time )
#ifdef Q_WS_X11 #ifdef Q_WS_X11
NETRootInfo info( tqt_xdisplay(), 0 ); NETRootInfo info( tqt_xdisplay(), 0 );
if( time == 0 ) if( time == 0 )
time = GET_QT_X_TIME(); time = get_tqt_x_time();
info.setActiveWindow( win, NET::FromTool, time, 0 ); info.setActiveWindow( win, NET::FromTool, time, 0 );
#endif // Q_WS_X11 #endif // Q_WS_X11
KUniqueApplication::setHandleAutoStarted(); KUniqueApplication::setHandleAutoStarted();

@ -143,7 +143,7 @@ void KDETrayProxy::dockWindow( Window w, Window owner )
ev.xclient.window = owner; ev.xclient.window = owner;
ev.xclient.message_type = atom; ev.xclient.message_type = atom;
ev.xclient.format = 32; ev.xclient.format = 32;
ev.xclient.data.l[ 0 ] = GET_QT_X_TIME(); ev.xclient.data.l[ 0 ] = get_tqt_x_time();
ev.xclient.data.l[ 1 ] = 0; // SYSTEM_TRAY_REQUEST_DOCK ev.xclient.data.l[ 1 ] = 0; // SYSTEM_TRAY_REQUEST_DOCK
ev.xclient.data.l[ 2 ] = w; ev.xclient.data.l[ 2 ] = w;
ev.xclient.data.l[ 3 ] = 0; // unused ev.xclient.data.l[ 3 ] = 0; // unused

@ -199,7 +199,7 @@ static void sendXEmbedMessage( WId window, long message, long detail = 0,
ev.xclient.window = window; ev.xclient.window = window;
ev.xclient.message_type = xembed; ev.xclient.message_type = xembed;
ev.xclient.format = 32; ev.xclient.format = 32;
ev.xclient.data.l[0] = GET_QT_X_TIME(); ev.xclient.data.l[0] = get_tqt_x_time();
ev.xclient.data.l[1] = message; ev.xclient.data.l[1] = message;
ev.xclient.data.l[2] = detail; ev.xclient.data.l[2] = detail;
ev.xclient.data.l[3] = data1; ev.xclient.data.l[3] = data1;
@ -219,7 +219,7 @@ static void sendClientMessage(Window window, Atom a, long x)
ev.xclient.message_type = a; ev.xclient.message_type = a;
ev.xclient.format = 32; ev.xclient.format = 32;
ev.xclient.data.l[0] = x; ev.xclient.data.l[0] = x;
ev.xclient.data.l[1] = GET_QT_X_TIME(); ev.xclient.data.l[1] = get_tqt_x_time();
XSendEvent(tqt_xdisplay(), window, false, NoEventMask, &ev); XSendEvent(tqt_xdisplay(), window, false, NoEventMask, &ev);
} }
@ -419,8 +419,8 @@ static int qxembed_x11_event_filter( XEvent* e)
long message = e->xclient.data.l[1]; long message = e->xclient.data.l[1];
long detail = e->xclient.data.l[2]; long detail = e->xclient.data.l[2];
// L0671: Keep Qt message time up to date // L0671: Keep Qt message time up to date
if ( msgtime > GET_QT_X_TIME() ) if ( msgtime > get_tqt_x_time() )
SET_QT_X_TIME(msgtime); set_tqt_x_time(msgtime);
TQWidget* w = TQT_TQWIDGET(TQWidget::find( e->xclient.window )); TQWidget* w = TQT_TQWIDGET(TQWidget::find( e->xclient.window ));
if ( !w ) if ( !w )
break; break;
@ -538,8 +538,8 @@ static int qxembed_x11_event_filter( XEvent* e)
Atom a = e->xclient.data.l[0]; Atom a = e->xclient.data.l[0];
if ( a == tqt_wm_take_focus ) { if ( a == tqt_wm_take_focus ) {
// L0695: update Qt message time variable // L0695: update Qt message time variable
if ( (ulong) e->xclient.data.l[1] > GET_QT_X_TIME() ) if ( (ulong) e->xclient.data.l[1] > get_tqt_x_time() )
SET_QT_X_TIME(e->xclient.data.l[1]); set_tqt_x_time(e->xclient.data.l[1]);
// L0696: There is no problem when the window is not active. // L0696: There is no problem when the window is not active.
// Qt will generate a WindowActivate event that will // Qt will generate a WindowActivate event that will
// do the job (L1310). This does not happen if the // do the job (L1310). This does not happen if the
@ -663,7 +663,7 @@ QXEmbed::QXEmbed(TQWidget *parent, const char *name, WFlags f)
if ( tqApp->activeWindow() == topLevelWidget() ) if ( tqApp->activeWindow() == topLevelWidget() )
if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded )
XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(), XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
RevertToParent, GET_QT_X_TIME() ); RevertToParent, get_tqt_x_time() );
// L0915: ??? [drag&drop?] // L0915: ??? [drag&drop?]
setAcceptDrops( true ); setAcceptDrops( true );
} }
@ -715,7 +715,7 @@ QXEmbed::~QXEmbed()
int revert; int revert;
XGetInputFocus( tqt_xdisplay(), &focus, &revert ); XGetInputFocus( tqt_xdisplay(), &focus, &revert );
if( focus == d->focusProxy->winId()) if( focus == d->focusProxy->winId())
XSetInputFocus( tqt_xdisplay(), topLevelWidget()->winId(), RevertToParent, GET_QT_X_TIME() ); XSetInputFocus( tqt_xdisplay(), topLevelWidget()->winId(), RevertToParent, get_tqt_x_time() );
// L01045: Delete our private data. // L01045: Delete our private data.
delete d; delete d;
} }
@ -785,7 +785,7 @@ bool QXEmbed::eventFilter( TQObject *o, TQEvent * e)
if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded ) if ( !((QPublicWidget*) topLevelWidget())->topData()->embedded )
if (! hasFocus() ) if (! hasFocus() )
XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(), XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
RevertToParent, GET_QT_X_TIME() ); RevertToParent, get_tqt_x_time() );
if (d->xplain) if (d->xplain)
// L1311: Activation has changed. Grab state might change. See L2800. // L1311: Activation has changed. Grab state might change. See L2800.
checkGrab(); checkGrab();
@ -869,7 +869,7 @@ void QXEmbed::focusInEvent( TQFocusEvent * e ){
// This is dual safety here because FocusIn implies this. // This is dual safety here because FocusIn implies this.
// But see L1581 for an example where this really matters. // But see L1581 for an example where this really matters.
XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(), XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
RevertToParent, GET_QT_X_TIME() ); RevertToParent, get_tqt_x_time() );
if (d->xplain) { if (d->xplain) {
// L1520: Qt focus has changed. Grab state might change. See L2800. // L1520: Qt focus has changed. Grab state might change. See L2800.
checkGrab(); checkGrab();
@ -919,7 +919,7 @@ void QXEmbed::focusOutEvent( TQFocusEvent * ){
// Function isActiveWindow() also returns true when a modal // Function isActiveWindow() also returns true when a modal
// dialog child of this window is active. // dialog child of this window is active.
XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(), XSetInputFocus( tqt_xdisplay(), d->focusProxy->winId(),
RevertToParent, GET_QT_X_TIME() ); RevertToParent, get_tqt_x_time() );
} }

Loading…
Cancel
Save