summaryrefslogtreecommitdiffstats
path: root/twin
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2023-11-23 10:49:13 +0900
committerMichele Calgaro <[email protected]>2023-11-23 11:01:41 +0900
commitbf17c1e94003579e5275d8519fe7144c2caeb52c (patch)
treedf2780659ea95d52d294a0a42b096abf6553c5db /twin
parent7272c289be1517c4a4b6ccd35c9d64f8a657593d (diff)
downloadtdebase-bf17c1e94003579e5275d8519fe7144c2caeb52c.tar.gz
tdebase-bf17c1e94003579e5275d8519fe7144c2caeb52c.zip
Replaced time related '#define' with actual strings
Signed-off-by: Michele Calgaro <[email protected]> (cherry picked from commit 81ad1f9e3c9d494edc38a7aad96fdcab9d44a795)
Diffstat (limited to 'twin')
-rw-r--r--twin/activation.cpp4
-rw-r--r--twin/client.cpp16
-rw-r--r--twin/events.cpp8
-rw-r--r--twin/geometry.cpp12
-rw-r--r--twin/main.cpp2
-rw-r--r--twin/manage.cpp4
-rw-r--r--twin/tabbox.cpp8
-rw-r--r--twin/utils.cpp2
-rw-r--r--twin/workspace.cpp24
9 files changed, 40 insertions, 40 deletions
diff --git a/twin/activation.cpp b/twin/activation.cpp
index 83ff24edb..0deb81798 100644
--- a/twin/activation.cpp
+++ b/twin/activation.cpp
@@ -674,7 +674,7 @@ void Workspace::unfakeActivity( Client* c )
void Client::updateUserTime( Time time )
{ // copied in Group::updateUserTime
if( time == CurrentTime )
- time = GET_QT_X_TIME();
+ time = get_tqt_x_time();
if( time != -1U
&& ( user_time == CurrentTime
|| timestampCompare( time, user_time ) > 0 )) // time > user_time
@@ -1005,7 +1005,7 @@ void Group::startupIdChanged()
void Group::updateUserTime( Time time )
{ // copy of Client::updateUserTime
if( time == CurrentTime )
- time = GET_QT_X_TIME();
+ time = get_tqt_x_time();
if( time != -1U
&& ( user_time == CurrentTime
|| timestampCompare( time, user_time ) > 0 )) // time > user_time
diff --git a/twin/client.cpp b/twin/client.cpp
index c4916bef7..42aac61ad 100644
--- a/twin/client.cpp
+++ b/twin/client.cpp
@@ -1704,7 +1704,7 @@ void Client::sendClientMessage(Window w, Atom a, Atom protocol, long data1, long
ev.xclient.message_type = a;
ev.xclient.format = 32;
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[3] = data2;
ev.xclient.data.l[4] = data3;
@@ -1783,7 +1783,7 @@ void Client::pingWindow()
ping_timer = new TQTimer( this );
connect( ping_timer, TQT_SIGNAL( timeout()), TQT_SLOT( pingTimeout()));
ping_timer->start( options->killPingTimeout, true );
- ping_timestamp = GET_QT_X_TIME();
+ ping_timestamp = get_tqt_x_time();
workspace()->sendPingToWindow( window(), ping_timestamp );
}
@@ -2203,15 +2203,15 @@ void Client::takeActivity( int flags, bool handled, allowed_t )
#ifndef NDEBUG
static Time previous_activity_timestamp;
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 ) << kdBacktrace() << endl;
}
- previous_activity_timestamp = GET_QT_X_TIME();
+ previous_activity_timestamp = get_tqt_x_time();
previous_client = this;
#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
@@ -2220,17 +2220,17 @@ void Client::takeFocus( allowed_t )
#ifndef NDEBUG
static Time previous_focus_timestamp;
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 ) << kdBacktrace() << endl;
}
- previous_focus_timestamp = GET_QT_X_TIME();
+ previous_focus_timestamp = get_tqt_x_time();
previous_client = this;
#endif
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
bool activePrev = active;
active = true;
diff --git a/twin/events.cpp b/twin/events.cpp
index a56cc9ddd..8660f8776 100644
--- a/twin/events.cpp
+++ b/twin/events.cpp
@@ -197,7 +197,7 @@ bool Workspace::workspaceEvent( XEvent * e )
if ( mouse_emulation && (e->type == ButtonPress || e->type == ButtonRelease ) )
{
mouse_emulation = FALSE;
- XUngrabKeyboard( tqt_xdisplay(), GET_QT_X_TIME() );
+ XUngrabKeyboard( tqt_xdisplay(), get_tqt_x_time() );
}
if( e->type == PropertyNotify || e->type == ClientMessage )
@@ -292,11 +292,11 @@ bool Workspace::workspaceEvent( XEvent * e )
!e->xcreatewindow.override_redirect )
{
// 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,
atoms->kde_net_wm_user_creation_time, XA_CARDINAL,
32, PropModeReplace, (unsigned char *)&my_qtx_time, 1);
- SET_QT_X_TIME(my_qtx_time);
+ set_tqt_x_time(my_qtx_time);
}
break;
@@ -1550,7 +1550,7 @@ static bool waitingMotionEvent()
// of processes events reaches the timestamp of the last suitable
// MotionNotify event in the queue.
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;
was_motion = false;
XSync( tqt_xdisplay(), False ); // this helps to discard more MotionNotify events
diff --git a/twin/geometry.cpp b/twin/geometry.cpp
index 2f9988e6b..6f21e90da 100644
--- a/twin/geometry.cpp
+++ b/twin/geometry.cpp
@@ -679,7 +679,7 @@ void Workspace::updateTopMenuGeometry( Client* c )
static Atom msg_type_atom = XInternAtom( tqt_xdisplay(), "_KDE_TOPMENU_MINSIZE", False );
ev.xclient.message_type = msg_type_atom;
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[2] = topmenu_space->height();
ev.xclient.data.l[3] = 0;
@@ -2311,9 +2311,9 @@ bool Client::startMoveResize()
XMapRaised( tqt_xdisplay(), move_resize_grab_window );
if( XGrabPointer( tqt_xdisplay(), move_resize_grab_window, False,
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;
- 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;
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 )
|| ( isResize() && rules()->checkMoveResizeMode( options->resizeMode ) != Options::Opaque ) )
ungrabXServer();
- XUngrabKeyboard( tqt_xdisplay(), GET_QT_X_TIME() );
- XUngrabPointer( tqt_xdisplay(), GET_QT_X_TIME() );
+ XUngrabKeyboard( tqt_xdisplay(), get_tqt_x_time() );
+ XUngrabPointer( tqt_xdisplay(), get_tqt_x_time() );
XDestroyWindow( tqt_xdisplay(), move_resize_grab_window );
move_resize_grab_window = None;
workspace()->setClientIsMoving(0);
@@ -2710,7 +2710,7 @@ void Client::handleMoveResize(int x, int y, int x_root, int y_root) {
}
}
if (isMove()) {
- workspace()->checkActiveBorder(globalPos, GET_QT_X_TIME());
+ workspace()->checkActiveBorder(globalPos, get_tqt_x_time());
}
}
diff --git a/twin/main.cpp b/twin/main.cpp
index 84f123f83..4af065a8a 100644
--- a/twin/main.cpp
+++ b/twin/main.cpp
@@ -194,7 +194,7 @@ Application::~Application()
delete Workspace::self();
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" );
if( !ref.send( "loadModule", TQCString( "kdetrayproxy" )))
kdWarning( 176 ) << "Loading of kdetrayproxy failed." << endl;
diff --git a/twin/manage.cpp b/twin/manage.cpp
index a129488cc..8b96c070e 100644
--- a/twin/manage.cpp
+++ b/twin/manage.cpp
@@ -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
{
- 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
- user_time = GET_QT_X_TIME() - 1000000 + 10;
+ user_time = get_tqt_x_time() - 1000000 + 10;
}
updateWorkareaDiffs();
diff --git a/twin/tabbox.cpp b/twin/tabbox.cpp
index 1cf0fb8c2..bec7cce97 100644
--- a/twin/tabbox.cpp
+++ b/twin/tabbox.cpp
@@ -708,7 +708,7 @@ void TabBox::delayedShow()
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 )
return;
TQPoint pos( e->xbutton.x_root, e->xbutton.y_root );
@@ -866,7 +866,7 @@ void Workspace::slotWalkThroughWindows()
return;
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
CDEWalkThroughWindows( true );
}
@@ -1360,7 +1360,7 @@ Client* Workspace::previousStaticClient( Client* c ) const
bool Workspace::establishTabBoxGrab()
{
if( XGrabKeyboard( tqt_xdisplay(), root, FALSE,
- GrabModeAsync, GrabModeAsync, GET_QT_X_TIME()) != GrabSuccess )
+ GrabModeAsync, GrabModeAsync, get_tqt_x_time()) != GrabSuccess )
return false;
// 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
@@ -1376,7 +1376,7 @@ bool Workspace::establishTabBoxGrab()
void Workspace::removeTabBoxGrab()
{
- XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME());
+ XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time());
assert( forced_global_mouse_grab );
forced_global_mouse_grab = false;
if( active_client != NULL )
diff --git a/twin/utils.cpp b/twin/utils.cpp
index 949893a74..bc44eee56 100644
--- a/twin/utils.cpp
+++ b/twin/utils.cpp
@@ -274,7 +274,7 @@ void updateXTime()
XCheckIfEvent( tqt_xdisplay(), &dummy, update_x_time_predicate, NULL );
}
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
XWindowEvent( tqt_xdisplay(), w->winId(), PropertyChangeMask, &ev );
}
diff --git a/twin/workspace.cpp b/twin/workspace.cpp
index a06c624a4..5f75edd90 100644
--- a/twin/workspace.cpp
+++ b/twin/workspace.cpp
@@ -203,8 +203,8 @@ Workspace::Workspace( bool restore )
delayFocusTimer = 0;
- active_time_first = GET_QT_X_TIME();
- active_time_last = GET_QT_X_TIME();
+ active_time_first = get_tqt_x_time();
+ active_time_last = get_tqt_x_time();
if ( restore )
loadSessionInfo();
@@ -2154,7 +2154,7 @@ void Workspace::slotMouseEmulation()
if ( mouse_emulation )
{
- XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME());
+ XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time());
mouse_emulation = FALSE;
return;
}
@@ -2162,7 +2162,7 @@ void Workspace::slotMouseEmulation()
if ( XGrabKeyboard(tqt_xdisplay(),
root, FALSE,
GrabModeAsync, GrabModeAsync,
- GET_QT_X_TIME()) == GrabSuccess )
+ get_tqt_x_time()) == GrabSuccess )
{
mouse_emulation = TRUE;
mouse_emulation_state = 0;
@@ -2218,7 +2218,7 @@ unsigned int Workspace::sendFakedMouseEvent( TQPoint pos, WId w, MouseEmulation
e.xmotion.window = w;
e.xmotion.root = tqt_xrootwin();
e.xmotion.subwindow = w;
- e.xmotion.time = GET_QT_X_TIME();
+ e.xmotion.time = get_tqt_x_time();
e.xmotion.x = x;
e.xmotion.y = y;
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.root = tqt_xrootwin();
e.xbutton.subwindow = w;
- e.xbutton.time = GET_QT_X_TIME();
+ e.xbutton.time = get_tqt_x_time();
e.xbutton.x = x;
e.xbutton.y = y;
e.xbutton.x_root = pos.x();
@@ -2360,7 +2360,7 @@ bool Workspace::keyPressMouseEmulation( XKeyEvent& ev )
}
// fall through
case XK_Escape:
- XUngrabKeyboard(tqt_xdisplay(), GET_QT_X_TIME());
+ XUngrabKeyboard(tqt_xdisplay(), get_tqt_x_time());
mouse_emulation = FALSE;
return TRUE;
default:
@@ -2415,9 +2415,9 @@ void Workspace::cancelDelayFocus()
*/
void Workspace::updateActiveBorders()
{
- active_time_first = GET_QT_X_TIME();
- active_time_last = GET_QT_X_TIME();
- active_time_last_trigger = GET_QT_X_TIME();
+ active_time_first = get_tqt_x_time();
+ active_time_last = get_tqt_x_time();
+ active_time_last_trigger = get_tqt_x_time();
active_current_border = ActiveNone;
TQRect r = TQApplication::desktop()->geometry();
activeTop = r.top();
@@ -2745,7 +2745,7 @@ bool Workspace::activeBorderEvent(XEvent *e)
if (active_windows[i] != None && e->xclient.window == active_windows[i])
{
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;
}
}
@@ -2868,7 +2868,7 @@ bool Workspace::checkStartupNotification( Window w, TDEStartupInfoId& id, TDESta
*/
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 )