Replaced time related '#define' with actual strings

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 81ad1f9e3c)
pull/478/head
Michele Calgaro 6 months ago
parent 7272c289be
commit bf17c1e940
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -476,7 +476,7 @@ void MenuEmbed::setMinimumSize( int w, int h )
assert( msg_type_atom != None ); assert( msg_type_atom != None );
ev.xclient.message_type = msg_type_atom; ev.xclient.message_type = msg_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] = minimumWidth(); ev.xclient.data.l[1] = minimumWidth();
ev.xclient.data.l[2] = minimumHeight(); ev.xclient.data.l[2] = minimumHeight();
ev.xclient.data.l[3] = 0; ev.xclient.data.l[3] = 0;

@ -114,7 +114,7 @@ void ClipboardPoll::initPolling()
timer.start( 1000, false ); timer.start( 1000, false );
selection.atom = XA_PRIMARY; selection.atom = XA_PRIMARY;
clipboard.atom = xa_clipboard; clipboard.atom = xa_clipboard;
selection.last_change = clipboard.last_change = GET_QT_X_TIME(); // don't trigger right after startup selection.last_change = clipboard.last_change = get_tqt_x_time(); // don't trigger right after startup
selection.last_owner = XGetSelectionOwner( tqt_xdisplay(), XA_PRIMARY ); selection.last_owner = XGetSelectionOwner( tqt_xdisplay(), XA_PRIMARY );
#ifdef NOISY_KLIPPER_ #ifdef NOISY_KLIPPER_
kdDebug() << "(1) Setting last_owner for =" << "selection" << ":" << selection.last_owner << endl; kdDebug() << "(1) Setting last_owner for =" << "selection" << ":" << selection.last_owner << endl;
@ -151,7 +151,7 @@ bool ClipboardPoll::x11Event( XEvent* e )
#ifdef NOISY_KLIPPER_ #ifdef NOISY_KLIPPER_
kdDebug() << "SELECTION CHANGED (XFIXES)" << endl; kdDebug() << "SELECTION CHANGED (XFIXES)" << endl;
#endif #endif
SET_QT_X_TIME(ev->timestamp); set_tqt_x_time(ev->timestamp);
emit clipboardChanged( true ); emit clipboardChanged( true );
} }
else if( ev->selection == xa_clipboard && !kapp->clipboard()->ownsClipboard()) else if( ev->selection == xa_clipboard && !kapp->clipboard()->ownsClipboard())
@ -159,7 +159,7 @@ bool ClipboardPoll::x11Event( XEvent* e )
#ifdef NOISY_KLIPPER_ #ifdef NOISY_KLIPPER_
kdDebug() << "CLIPBOARD CHANGED (XFIXES)" << endl; kdDebug() << "CLIPBOARD CHANGED (XFIXES)" << endl;
#endif #endif
SET_QT_X_TIME(ev->timestamp); set_tqt_x_time(ev->timestamp);
emit clipboardChanged( false ); emit clipboardChanged( false );
} }
} }
@ -269,9 +269,9 @@ bool ClipboardPoll::checkTimestamp( SelectionData& data )
return false; return false;
} }
XDeleteProperty( tqt_xdisplay(), winId(), data.timestamp_atom ); XDeleteProperty( tqt_xdisplay(), winId(), data.timestamp_atom );
XConvertSelection( tqt_xdisplay(), data.atom, xa_timestamp, data.timestamp_atom, winId(), GET_QT_X_TIME() ); XConvertSelection( tqt_xdisplay(), data.atom, xa_timestamp, data.timestamp_atom, winId(), get_tqt_x_time() );
data.waiting_for_timestamp = true; data.waiting_for_timestamp = true;
data.waiting_x_time = GET_QT_X_TIME(); data.waiting_x_time = get_tqt_x_time();
#ifdef REALLY_NOISY_KLIPPER_ #ifdef REALLY_NOISY_KLIPPER_
kdDebug() << "WAITING TIMESTAMP:" << ( data.atom == XA_PRIMARY ) << endl; kdDebug() << "WAITING TIMESTAMP:" << ( data.atom == XA_PRIMARY ) << endl;
#endif #endif

@ -1114,7 +1114,7 @@ void KlipperWidget::updateTimestamp()
{ // Qt3.3.0 and 3.3.1 use tqt_x_user_time for clipboard operations { // Qt3.3.0 and 3.3.1 use tqt_x_user_time for clipboard operations
Time time = ( strcmp( tqVersion(), "3.3.1" ) == 0 Time time = ( strcmp( tqVersion(), "3.3.1" ) == 0
|| strcmp( tqVersion(), "3.3.0" ) == 0 ) || strcmp( tqVersion(), "3.3.0" ) == 0 )
? GET_QT_X_USER_TIME() : GET_QT_X_TIME(); ? get_tqt_x_user_time() : get_tqt_x_time();
static TQWidget* w = 0; static TQWidget* w = 0;
if ( !w ) if ( !w )
w = new TQWidget; w = new TQWidget;

@ -51,7 +51,7 @@ KonquerorIface::~KonquerorIface()
DCOPRef KonquerorIface::openBrowserWindow( const TQString &url ) DCOPRef KonquerorIface::openBrowserWindow( const TQString &url )
{ {
SET_QT_X_USER_TIME(0); set_tqt_x_user_time(0);
KonqMainWindow *res = KonqMisc::createSimpleWindow( KURL(url) ); KonqMainWindow *res = KonqMisc::createSimpleWindow( KURL(url) );
if ( !res ) if ( !res )
return DCOPRef(); return DCOPRef();
@ -77,7 +77,7 @@ DCOPRef KonquerorIface::createNewWindowASN( const TQString &url, const TQCString
DCOPRef KonquerorIface::createNewWindowWithSelection( const TQString &url, TQStringList filesToSelect ) DCOPRef KonquerorIface::createNewWindowWithSelection( const TQString &url, TQStringList filesToSelect )
{ {
SET_QT_X_USER_TIME(0); set_tqt_x_user_time(0);
KonqMainWindow *res = KonqMisc::createNewWindow( KURL(url), KParts::URLArgs(), false, filesToSelect ); KonqMainWindow *res = KonqMisc::createNewWindow( KURL(url), KParts::URLArgs(), false, filesToSelect );
if ( !res ) if ( !res )
return DCOPRef(); return DCOPRef();
@ -92,7 +92,7 @@ DCOPRef KonquerorIface::createNewWindowWithSelectionASN( const TQString &url, TQ
DCOPRef KonquerorIface::createNewWindow( const TQString &url, const TQString &mimetype, bool tempFile ) DCOPRef KonquerorIface::createNewWindow( const TQString &url, const TQString &mimetype, bool tempFile )
{ {
SET_QT_X_USER_TIME(0); set_tqt_x_user_time(0);
KParts::URLArgs args; KParts::URLArgs args;
args.serviceType = mimetype; args.serviceType = mimetype;
// Filter the URL, so that "kfmclient openURL gg:foo" works also when konq is already running // Filter the URL, so that "kfmclient openURL gg:foo" works also when konq is already running
@ -112,7 +112,7 @@ DCOPRef KonquerorIface::createNewWindowASN( const TQString &url, const TQString
DCOPRef KonquerorIface::createBrowserWindowFromProfile( const TQString &path ) DCOPRef KonquerorIface::createBrowserWindowFromProfile( const TQString &path )
{ {
SET_QT_X_USER_TIME(0); set_tqt_x_user_time(0);
kdDebug(1202) << "void KonquerorIface::createBrowserWindowFromProfile( const TQString &path ) " << endl; kdDebug(1202) << "void KonquerorIface::createBrowserWindowFromProfile( const TQString &path ) " << endl;
kdDebug(1202) << path << endl; kdDebug(1202) << path << endl;
KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, TQString::null ); KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, TQString::null );
@ -129,7 +129,7 @@ DCOPRef KonquerorIface::createBrowserWindowFromProfileASN( const TQString &path,
DCOPRef KonquerorIface::createBrowserWindowFromProfile( const TQString & path, const TQString &filename ) DCOPRef KonquerorIface::createBrowserWindowFromProfile( const TQString & path, const TQString &filename )
{ {
SET_QT_X_USER_TIME(0); set_tqt_x_user_time(0);
kdDebug(1202) << "void KonquerorIface::createBrowserWindowFromProfile( path, filename ) " << endl; kdDebug(1202) << "void KonquerorIface::createBrowserWindowFromProfile( path, filename ) " << endl;
kdDebug(1202) << path << "," << filename << endl; kdDebug(1202) << path << "," << filename << endl;
KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, filename ); KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, filename );
@ -147,7 +147,7 @@ DCOPRef KonquerorIface::createBrowserWindowFromProfileASN( const TQString &path,
DCOPRef KonquerorIface::createBrowserWindowFromProfileAndURL( const TQString & path, const TQString &filename, const TQString &url ) DCOPRef KonquerorIface::createBrowserWindowFromProfileAndURL( const TQString & path, const TQString &filename, const TQString &url )
{ {
SET_QT_X_USER_TIME(0); set_tqt_x_user_time(0);
KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, filename, KURL(url) ); KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, filename, KURL(url) );
if ( !res ) if ( !res )
return DCOPRef(); return DCOPRef();
@ -163,7 +163,7 @@ DCOPRef KonquerorIface::createBrowserWindowFromProfileAndURLASN( const TQString
DCOPRef KonquerorIface::createBrowserWindowFromProfileAndURL( const TQString &path, const TQString &filename, const TQString &url, const TQString &mimetype ) DCOPRef KonquerorIface::createBrowserWindowFromProfileAndURL( const TQString &path, const TQString &filename, const TQString &url, const TQString &mimetype )
{ {
SET_QT_X_USER_TIME(0); set_tqt_x_user_time(0);
KParts::URLArgs args; KParts::URLArgs args;
args.serviceType = mimetype; args.serviceType = mimetype;
KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, filename, KURL(url), args ); KonqMainWindow *res = KonqMisc::createBrowserWindowFromProfile( path, filename, KURL(url), args );

@ -1310,7 +1310,7 @@ void KonqMainWindow::slotCreateNewWindow( const KURL &url, const KParts::URLArgs
// well. If the WM has support for _NET_WM_USER_TIME, it will be just set to 0 (=don't focus on show), // well. If the WM has support for _NET_WM_USER_TIME, it will be just set to 0 (=don't focus on show),
// and the WM should take care of it itself. // and the WM should take care of it itself.
bool wm_usertime_support = false; bool wm_usertime_support = false;
Time saved_last_input_time = GET_QT_X_USER_TIME(); Time saved_last_input_time = get_tqt_x_user_time();
if ( windowArgs.lowerWindow ) if ( windowArgs.lowerWindow )
{ {
NETRootInfo wm_info( tqt_xdisplay(), NET::Supported ); NETRootInfo wm_info( tqt_xdisplay(), NET::Supported );
@ -1320,7 +1320,7 @@ void KonqMainWindow::slotCreateNewWindow( const KURL &url, const KParts::URLArgs
// *sigh*, and I thought nobody would need TQWidget::dontFocusOnShow(). // *sigh*, and I thought nobody would need TQWidget::dontFocusOnShow().
// Avoid Qt's support for user time by setting it to 0, and // Avoid Qt's support for user time by setting it to 0, and
// set the property ourselves. // set the property ourselves.
SET_QT_X_USER_TIME(0); set_tqt_x_user_time(0);
KWin::setUserTime( mainWindow->winId(), 0 ); KWin::setUserTime( mainWindow->winId(), 0 );
} }
// Put below the current window before showing, in case that actually works with the WM. // Put below the current window before showing, in case that actually works with the WM.
@ -1333,7 +1333,7 @@ void KonqMainWindow::slotCreateNewWindow( const KURL &url, const KParts::URLArgs
if ( windowArgs.lowerWindow ) if ( windowArgs.lowerWindow )
{ {
SET_QT_X_USER_TIME(saved_last_input_time); set_tqt_x_user_time(saved_last_input_time);
if( !wm_usertime_support ) if( !wm_usertime_support )
{ // No WM support. Let's try ugly tricks. { // No WM support. Let's try ugly tricks.
mainWindow->lower(); mainWindow->lower();
@ -5833,7 +5833,7 @@ void KonqMainWindow::resetWindow()
static Atom atom = XInternAtom( tqt_xdisplay(), "_TDE_NET_WM_USER_CREATION_TIME", False ); static Atom atom = XInternAtom( tqt_xdisplay(), "_TDE_NET_WM_USER_CREATION_TIME", False );
XChangeProperty( tqt_xdisplay(), winId(), atom, XA_CARDINAL, 32, XChangeProperty( tqt_xdisplay(), winId(), atom, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *) &x_time, 1); PropModeReplace, (unsigned char *) &x_time, 1);
SET_QT_X_USER_TIME(CurrentTime); // won't have _NET_WM_USER_TIME set set_tqt_x_user_time(CurrentTime); // won't have _NET_WM_USER_TIME set
#if !KDE_IS_VERSION( 3, 2, 90 ) // _KDE_NET_USER_TIME is obsolete #if !KDE_IS_VERSION( 3, 2, 90 ) // _KDE_NET_USER_TIME is obsolete
static Atom atom2 = XInternAtom( tqt_xdisplay(), "_KDE_NET_USER_TIME", False ); static Atom atom2 = XInternAtom( tqt_xdisplay(), "_KDE_NET_USER_TIME", False );
timeval tv; timeval tv;

@ -151,7 +151,7 @@ void KSMServer::performLegacySessionSave()
ev.xclient.message_type = wm_protocols; ev.xclient.message_type = wm_protocols;
ev.xclient.format = 32; ev.xclient.format = 32;
ev.xclient.data.l[0] = wm_save_yourself; ev.xclient.data.l[0] = wm_save_yourself;
ev.xclient.data.l[1] = GET_QT_X_TIME(); ev.xclient.data.l[1] = get_tqt_x_time();
XSelectInput(newdisplay, w, PropertyChangeMask|StructureNotifyMask); XSelectInput(newdisplay, w, PropertyChangeMask|StructureNotifyMask);
XSendEvent(newdisplay, w, False, 0, &ev); XSendEvent(newdisplay, w, False, 0, &ev);
} }

@ -674,7 +674,7 @@ void Workspace::unfakeActivity( Client* c )
void Client::updateUserTime( Time time ) void Client::updateUserTime( Time time )
{ // copied in Group::updateUserTime { // copied in Group::updateUserTime
if( time == CurrentTime ) if( time == CurrentTime )
time = GET_QT_X_TIME(); time = get_tqt_x_time();
if( time != -1U if( time != -1U
&& ( user_time == CurrentTime && ( user_time == CurrentTime
|| timestampCompare( time, user_time ) > 0 )) // time > user_time || timestampCompare( time, user_time ) > 0 )) // time > user_time
@ -1005,7 +1005,7 @@ void Group::startupIdChanged()
void Group::updateUserTime( Time time ) void Group::updateUserTime( Time time )
{ // copy of Client::updateUserTime { // copy of Client::updateUserTime
if( time == CurrentTime ) if( time == CurrentTime )
time = GET_QT_X_TIME(); time = get_tqt_x_time();
if( time != -1U if( time != -1U
&& ( user_time == CurrentTime && ( user_time == CurrentTime
|| timestampCompare( time, user_time ) > 0 )) // time > user_time || timestampCompare( time, user_time ) > 0 )) // time > user_time

@ -1704,7 +1704,7 @@ void Client::sendClientMessage(Window w, Atom a, Atom protocol, long data1, long
ev.xclient.message_type = a; ev.xclient.message_type = a;
ev.xclient.format = 32; ev.xclient.format = 32;
ev.xclient.data.l[0] = protocol; ev.xclient.data.l[0] = protocol;
ev.xclient.data.l[1] = GET_QT_X_TIME(); ev.xclient.data.l[1] = get_tqt_x_time();
ev.xclient.data.l[2] = data1; ev.xclient.data.l[2] = data1;
ev.xclient.data.l[3] = data2; ev.xclient.data.l[3] = data2;
ev.xclient.data.l[4] = data3; ev.xclient.data.l[4] = data3;
@ -1783,7 +1783,7 @@ void Client::pingWindow()
ping_timer = new TQTimer( this ); ping_timer = new TQTimer( this );
connect( ping_timer, TQT_SIGNAL( timeout()), TQT_SLOT( pingTimeout())); connect( ping_timer, TQT_SIGNAL( timeout()), TQT_SLOT( pingTimeout()));
ping_timer->start( options->killPingTimeout, true ); ping_timer->start( options->killPingTimeout, true );
ping_timestamp = GET_QT_X_TIME(); ping_timestamp = get_tqt_x_time();
workspace()->sendPingToWindow( window(), ping_timestamp ); workspace()->sendPingToWindow( window(), ping_timestamp );
} }
@ -2203,15 +2203,15 @@ void Client::takeActivity( int flags, bool handled, allowed_t )
#ifndef NDEBUG #ifndef NDEBUG
static Time previous_activity_timestamp; static Time previous_activity_timestamp;
static Client* previous_client; static Client* previous_client;
if( previous_activity_timestamp == GET_QT_X_TIME() && previous_client != this ) if( previous_activity_timestamp == get_tqt_x_time() && previous_client != this )
{ {
kdDebug( 1212 ) << "Repeated use of the same X timestamp for activity" << endl; kdDebug( 1212 ) << "Repeated use of the same X timestamp for activity" << endl;
kdDebug( 1212 ) << kdBacktrace() << endl; kdDebug( 1212 ) << kdBacktrace() << endl;
} }
previous_activity_timestamp = GET_QT_X_TIME(); previous_activity_timestamp = get_tqt_x_time();
previous_client = this; previous_client = this;
#endif #endif
workspace()->sendTakeActivity( this, GET_QT_X_TIME(), flags ); workspace()->sendTakeActivity( this, get_tqt_x_time(), flags );
} }
// performs the actual focusing of the window using XSetInputFocus and WM_TAKE_FOCUS // performs the actual focusing of the window using XSetInputFocus and WM_TAKE_FOCUS
@ -2220,17 +2220,17 @@ void Client::takeFocus( allowed_t )
#ifndef NDEBUG #ifndef NDEBUG
static Time previous_focus_timestamp; static Time previous_focus_timestamp;
static Client* previous_client; static Client* previous_client;
if( previous_focus_timestamp == GET_QT_X_TIME() && previous_client != this ) if( previous_focus_timestamp == get_tqt_x_time() && previous_client != this )
{ {
kdDebug( 1212 ) << "Repeated use of the same X timestamp for focus" << endl; kdDebug( 1212 ) << "Repeated use of the same X timestamp for focus" << endl;
kdDebug( 1212 ) << kdBacktrace() << endl; kdDebug( 1212 ) << kdBacktrace() << endl;
} }
previous_focus_timestamp = GET_QT_X_TIME(); previous_focus_timestamp = get_tqt_x_time();
previous_client = this; previous_client = this;
#endif #endif
if ( rules()->checkAcceptFocus( input )) if ( rules()->checkAcceptFocus( input ))
{ {
XSetInputFocus( tqt_xdisplay(), window(), RevertToPointerRoot, GET_QT_X_TIME() ); XSetInputFocus( tqt_xdisplay(), window(), RevertToPointerRoot, get_tqt_x_time() );
// Work around opacity bug // Work around opacity bug
bool activePrev = active; bool activePrev = active;
active = true; active = true;

@ -197,7 +197,7 @@ bool Workspace::workspaceEvent( XEvent * e )
if ( mouse_emulation && (e->type == ButtonPress || e->type == ButtonRelease ) ) if ( mouse_emulation && (e->type == ButtonPress || e->type == ButtonRelease ) )
{ {
mouse_emulation = FALSE; mouse_emulation = FALSE;
XUngrabKeyboard( tqt_xdisplay(), GET_QT_X_TIME() ); XUngrabKeyboard( tqt_xdisplay(), get_tqt_x_time() );
} }
if( e->type == PropertyNotify || e->type == ClientMessage ) if( e->type == PropertyNotify || e->type == ClientMessage )
@ -292,11 +292,11 @@ bool Workspace::workspaceEvent( XEvent * e )
!e->xcreatewindow.override_redirect ) !e->xcreatewindow.override_redirect )
{ {
// see comments for allowClientActivation() // see comments for allowClientActivation()
Time my_qtx_time = GET_QT_X_TIME(); Time my_qtx_time = get_tqt_x_time();
XChangeProperty(tqt_xdisplay(), e->xcreatewindow.window, XChangeProperty(tqt_xdisplay(), e->xcreatewindow.window,
atoms->kde_net_wm_user_creation_time, XA_CARDINAL, atoms->kde_net_wm_user_creation_time, XA_CARDINAL,
32, PropModeReplace, (unsigned char *)&my_qtx_time, 1); 32, PropModeReplace, (unsigned char *)&my_qtx_time, 1);
SET_QT_X_TIME(my_qtx_time); set_tqt_x_time(my_qtx_time);
} }
break; break;
@ -1550,7 +1550,7 @@ static bool waitingMotionEvent()
// of processes events reaches the timestamp of the last suitable // of processes events reaches the timestamp of the last suitable
// MotionNotify event in the queue. // MotionNotify event in the queue.
if( next_motion_time != CurrentTime if( next_motion_time != CurrentTime
&& timestampCompare( GET_QT_X_TIME(), next_motion_time ) < 0 ) && timestampCompare( get_tqt_x_time(), next_motion_time ) < 0 )
return true; return true;
was_motion = false; was_motion = false;
XSync( tqt_xdisplay(), False ); // this helps to discard more MotionNotify events XSync( tqt_xdisplay(), False ); // this helps to discard more MotionNotify events

@ -679,7 +679,7 @@ void Workspace::updateTopMenuGeometry( Client* c )
static Atom msg_type_atom = XInternAtom( tqt_xdisplay(), "_KDE_TOPMENU_MINSIZE", False ); static Atom msg_type_atom = XInternAtom( tqt_xdisplay(), "_KDE_TOPMENU_MINSIZE", False );
ev.xclient.message_type = msg_type_atom; ev.xclient.message_type = msg_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] = topmenu_space->width(); ev.xclient.data.l[1] = topmenu_space->width();
ev.xclient.data.l[2] = topmenu_space->height(); ev.xclient.data.l[2] = topmenu_space->height();
ev.xclient.data.l[3] = 0; ev.xclient.data.l[3] = 0;
@ -2311,9 +2311,9 @@ bool Client::startMoveResize()
XMapRaised( tqt_xdisplay(), move_resize_grab_window ); XMapRaised( tqt_xdisplay(), move_resize_grab_window );
if( XGrabPointer( tqt_xdisplay(), move_resize_grab_window, False, if( XGrabPointer( tqt_xdisplay(), move_resize_grab_window, False,
ButtonPressMask | ButtonReleaseMask | PointerMotionMask | EnterWindowMask | LeaveWindowMask, ButtonPressMask | ButtonReleaseMask | PointerMotionMask | EnterWindowMask | LeaveWindowMask,
GrabModeAsync, GrabModeAsync, move_resize_grab_window, cursor.handle(), GET_QT_X_TIME() ) == Success ) GrabModeAsync, GrabModeAsync, move_resize_grab_window, cursor.handle(), get_tqt_x_time() ) == Success )
has_grab = true; has_grab = true;
if( XGrabKeyboard( tqt_xdisplay(), frameId(), False, GrabModeAsync, GrabModeAsync, GET_QT_X_TIME() ) == Success ) if( XGrabKeyboard( tqt_xdisplay(), frameId(), False, GrabModeAsync, GrabModeAsync, get_tqt_x_time() ) == Success )
has_grab = true; has_grab = true;
if( !has_grab ) // at least one grab is necessary in order to be able to finish move/resize if( !has_grab ) // at least one grab is necessary in order to be able to finish move/resize
{ {
@ -2448,8 +2448,8 @@ void Client::leaveMoveResize()
if ( ( isMove() && rules()->checkMoveResizeMode( options->moveMode ) != Options::Opaque ) if ( ( isMove() && rules()->checkMoveResizeMode( options->moveMode ) != Options::Opaque )
|| ( isResize() && rules()->checkMoveResizeMode( options->resizeMode ) != Options::Opaque ) ) || ( isResize() && rules()->checkMoveResizeMode( options->resizeMode ) != Options::Opaque ) )
ungrabXServer(); ungrabXServer();
XUngrabKeyboard( tqt_xdisplay(), GET_QT_X_TIME() ); XUngrabKeyboard( tqt_xdisplay(), get_tqt_x_time() );
XUngrabPointer( tqt_xdisplay(), GET_QT_X_TIME() ); XUngrabPointer( tqt_xdisplay(), get_tqt_x_time() );
XDestroyWindow( tqt_xdisplay(), move_resize_grab_window ); XDestroyWindow( tqt_xdisplay(), move_resize_grab_window );
move_resize_grab_window = None; move_resize_grab_window = None;
workspace()->setClientIsMoving(0); workspace()->setClientIsMoving(0);
@ -2710,7 +2710,7 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root) {
} }
} }
if (isMove()) { if (isMove()) {
workspace()->checkActiveBorder(globalPos, GET_QT_X_TIME()); workspace()->checkActiveBorder(globalPos, get_tqt_x_time());
} }
} }

@ -194,7 +194,7 @@ Application::~Application()
delete Workspace::self(); delete Workspace::self();
if( owner.ownerWindow() != None ) // if there was no --replace (no new WM) if( owner.ownerWindow() != None ) // if there was no --replace (no new WM)
{ {
XSetInputFocus( tqt_xdisplay(), PointerRoot, RevertToPointerRoot, GET_QT_X_TIME() ); XSetInputFocus( tqt_xdisplay(), PointerRoot, RevertToPointerRoot, get_tqt_x_time() );
DCOPRef ref( "kded", "kded" ); DCOPRef ref( "kded", "kded" );
if( !ref.send( "loadModule", TQCString( "kdetrayproxy" ))) if( !ref.send( "loadModule", TQCString( "kdetrayproxy" )))
kdWarning( 176 ) << "Loading of kdetrayproxy failed." << endl; kdWarning( 176 ) << "Loading of kdetrayproxy failed." << endl;

@ -520,9 +520,9 @@ bool Client::manage( Window w, bool isMapped )
if( user_time == CurrentTime || user_time == -1U ) // no known user time, set something old if( user_time == CurrentTime || user_time == -1U ) // no known user time, set something old
{ {
user_time = GET_QT_X_TIME() - 1000000; user_time = get_tqt_x_time() - 1000000;
if( user_time == CurrentTime || user_time == -1U ) // let's be paranoid if( user_time == CurrentTime || user_time == -1U ) // let's be paranoid
user_time = GET_QT_X_TIME() - 1000000 + 10; user_time = get_tqt_x_time() - 1000000 + 10;
} }
updateWorkareaDiffs(); updateWorkareaDiffs();

@ -708,7 +708,7 @@ void TabBox::delayedShow()
void TabBox::handleMouseEvent( XEvent* e ) void TabBox::handleMouseEvent( XEvent* e )
{ {
XAllowEvents( tqt_xdisplay(), AsyncPointer, GET_QT_X_TIME() ); XAllowEvents( tqt_xdisplay(), AsyncPointer, get_tqt_x_time() );
if( e->type != ButtonPress ) if( e->type != ButtonPress )
return; return;
TQPoint pos( e->xbutton.x_root, e->xbutton.y_root ); TQPoint pos( e->xbutton.x_root, e->xbutton.y_root );
@ -866,7 +866,7 @@ void Workspace::slotWalkThroughWindows()
return; return;
if ( options->altTabStyle == Options::CDE || !options->focusPolicyIsReasonable()) if ( options->altTabStyle == Options::CDE || !options->focusPolicyIsReasonable())
{ {
//XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME()); // need that because of accelerator raw mode //XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time()); // need that because of accelerator raw mode
// CDE style raise / lower // CDE style raise / lower
CDEWalkThroughWindows( true ); CDEWalkThroughWindows( true );
} }
@ -1360,7 +1360,7 @@ Client* Workspace::previousStaticClient( Client* c ) const
bool Workspace::establishTabBoxGrab() bool Workspace::establishTabBoxGrab()
{ {
if( XGrabKeyboard( tqt_xdisplay(), root, FALSE, if( XGrabKeyboard( tqt_xdisplay(), root, FALSE,
GrabModeAsync, GrabModeAsync, GET_QT_X_TIME()) != GrabSuccess ) GrabModeAsync, GrabModeAsync, get_tqt_x_time()) != GrabSuccess )
return false; return false;
// Don't try to establish a global mouse grab using XGrabPointer, as that would prevent // Don't try to establish a global mouse grab using XGrabPointer, as that would prevent
// using Alt+Tab while DND (#44972). However force passive grabs on all windows // using Alt+Tab while DND (#44972). However force passive grabs on all windows
@ -1376,7 +1376,7 @@ bool Workspace::establishTabBoxGrab()
void Workspace::removeTabBoxGrab() void Workspace::removeTabBoxGrab()
{ {
XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME()); XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time());
assert( forced_global_mouse_grab ); assert( forced_global_mouse_grab );
forced_global_mouse_grab = false; forced_global_mouse_grab = false;
if( active_client != NULL ) if( active_client != NULL )

@ -274,7 +274,7 @@ void updateXTime()
XCheckIfEvent( tqt_xdisplay(), &dummy, update_x_time_predicate, NULL ); XCheckIfEvent( tqt_xdisplay(), &dummy, update_x_time_predicate, NULL );
} }
assert( next_x_time != CurrentTime ); assert( next_x_time != CurrentTime );
SET_QT_X_TIME(next_x_time); set_tqt_x_time(next_x_time);
XEvent ev; // remove the PropertyNotify event from the events queue XEvent ev; // remove the PropertyNotify event from the events queue
XWindowEvent( tqt_xdisplay(), w->winId(), PropertyChangeMask, &ev ); XWindowEvent( tqt_xdisplay(), w->winId(), PropertyChangeMask, &ev );
} }

@ -203,8 +203,8 @@ Workspace::Workspace( bool restore )
delayFocusTimer = 0; delayFocusTimer = 0;
active_time_first = GET_QT_X_TIME(); active_time_first = get_tqt_x_time();
active_time_last = GET_QT_X_TIME(); active_time_last = get_tqt_x_time();
if ( restore ) if ( restore )
loadSessionInfo(); loadSessionInfo();
@ -2154,7 +2154,7 @@ void Workspace::slotMouseEmulation()
if ( mouse_emulation ) if ( mouse_emulation )
{ {
XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME()); XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time());
mouse_emulation = FALSE; mouse_emulation = FALSE;
return; return;
} }
@ -2162,7 +2162,7 @@ void Workspace::slotMouseEmulation()
if ( XGrabKeyboard(tqt_xdisplay(), if ( XGrabKeyboard(tqt_xdisplay(),
root, FALSE, root, FALSE,
GrabModeAsync, GrabModeAsync, GrabModeAsync, GrabModeAsync,
GET_QT_X_TIME()) == GrabSuccess ) get_tqt_x_time()) == GrabSuccess )
{ {
mouse_emulation = TRUE; mouse_emulation = TRUE;
mouse_emulation_state = 0; mouse_emulation_state = 0;
@ -2218,7 +2218,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation
e.xmotion.window = w; e.xmotion.window = w;
e.xmotion.root = tqt_xrootwin(); e.xmotion.root = tqt_xrootwin();
e.xmotion.subwindow = w; e.xmotion.subwindow = w;
e.xmotion.time = GET_QT_X_TIME(); e.xmotion.time = get_tqt_x_time();
e.xmotion.x = x; e.xmotion.x = x;
e.xmotion.y = y; e.xmotion.y = y;
e.xmotion.x_root = pos.x(); e.xmotion.x_root = pos.x();
@ -2234,7 +2234,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation
e.xbutton.window = w; e.xbutton.window = w;
e.xbutton.root = tqt_xrootwin(); e.xbutton.root = tqt_xrootwin();
e.xbutton.subwindow = w; e.xbutton.subwindow = w;
e.xbutton.time = GET_QT_X_TIME(); e.xbutton.time = get_tqt_x_time();
e.xbutton.x = x; e.xbutton.x = x;
e.xbutton.y = y; e.xbutton.y = y;
e.xbutton.x_root = pos.x(); e.xbutton.x_root = pos.x();
@ -2360,7 +2360,7 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent& ev )
} }
// fall through // fall through
case XK_Escape: case XK_Escape:
XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME()); XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time());
mouse_emulation = FALSE; mouse_emulation = FALSE;
return TRUE; return TRUE;
default: default:
@ -2415,9 +2415,9 @@ void Workspace::cancelDelayFocus()
*/ */
void Workspace::updateActiveBorders() void Workspace::updateActiveBorders()
{ {
active_time_first = GET_QT_X_TIME(); active_time_first = get_tqt_x_time();
active_time_last = GET_QT_X_TIME(); active_time_last = get_tqt_x_time();
active_time_last_trigger = GET_QT_X_TIME(); active_time_last_trigger = get_tqt_x_time();
active_current_border = ActiveNone; active_current_border = ActiveNone;
TQRect r = TQApplication::desktop()->geometry(); TQRect r = TQApplication::desktop()->geometry();
activeTop = r.top(); activeTop = r.top();
@ -2745,7 +2745,7 @@ bool Workspace::activeBorderEvent(XEvent *e)
if (active_windows[i] != None && e->xclient.window == active_windows[i]) if (active_windows[i] != None && e->xclient.window == active_windows[i])
{ {
updateXTime(); updateXTime();
checkActiveBorder(TQPoint(e->xclient.data.l[2]>>16, e->xclient.data.l[2]&0xffff), GET_QT_X_TIME()); checkActiveBorder(TQPoint(e->xclient.data.l[2]>>16, e->xclient.data.l[2]&0xffff), get_tqt_x_time());
return true; return true;
} }
} }
@ -2868,7 +2868,7 @@ bool Workspace::checkStartupNotification( Window w, TDEStartupInfoId& id, TDESta
*/ */
void Workspace::focusToNull() void Workspace::focusToNull()
{ {
XSetInputFocus(tqt_xdisplay(), null_focus_window, RevertToPointerRoot, GET_QT_X_TIME() ); XSetInputFocus(tqt_xdisplay(), null_focus_window, RevertToPointerRoot, get_tqt_x_time() );
} }
void Workspace::helperDialog( const TQString& message, const Client* c ) void Workspace::helperDialog( const TQString& message, const Client* c )

Loading…
Cancel
Save