summaryrefslogtreecommitdiffstats
path: root/khotkeys
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-02 02:13:02 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-02 02:13:02 -0600
commit8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96 (patch)
treebf71d4bfa94d0561e80456400ae5fe2bb501fbd8 /khotkeys
parente8a1cdc01d38125bea12d5494db977ae6429919a (diff)
downloadtdebase-8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96.tar.gz
tdebase-8bd291c0e8a9d8b6eec6f5217e4d5c2f1fd06b96.zip
Rename additional global functions and variables for tqt3
Diffstat (limited to 'khotkeys')
-rw-r--r--khotkeys/kcontrol/windowselector.cpp6
-rw-r--r--khotkeys/shared/actions.cpp2
-rw-r--r--khotkeys/shared/gestures.cpp12
-rw-r--r--khotkeys/shared/input.cpp26
-rw-r--r--khotkeys/shared/windows.cpp16
5 files changed, 31 insertions, 31 deletions
diff --git a/khotkeys/kcontrol/windowselector.cpp b/khotkeys/kcontrol/windowselector.cpp
index e2942201c..8e2c20113 100644
--- a/khotkeys/kcontrol/windowselector.cpp
+++ b/khotkeys/kcontrol/windowselector.cpp
@@ -57,12 +57,12 @@ WId WindowSelector::findRealWindow( WId w, int depth )
{
if( depth > 5 )
return None;
- static Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False );
+ static Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False );
Atom type;
int format;
unsigned long nitems, after;
unsigned char* prop;
- if( XGetWindowProperty( qt_xdisplay(), w, wm_state, 0, 0, False, AnyPropertyType,
+ if( XGetWindowProperty( tqt_xdisplay(), w, wm_state, 0, 0, False, AnyPropertyType,
&type, &format, &nitems, &after, &prop ) == Success )
{
if( prop != NULL )
@@ -74,7 +74,7 @@ WId WindowSelector::findRealWindow( WId w, int depth )
Window* children;
unsigned int nchildren;
Window ret = None;
- if( XQueryTree( qt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 )
+ if( XQueryTree( tqt_xdisplay(), w, &root, &parent, &children, &nchildren ) != 0 )
{
for( unsigned int i = 0;
i < nchildren && ret == None;
diff --git a/khotkeys/shared/actions.cpp b/khotkeys/shared/actions.cpp
index e37ef395f..cb13893ca 100644
--- a/khotkeys/shared/actions.cpp
+++ b/khotkeys/shared/actions.cpp
@@ -385,7 +385,7 @@ void Keyboard_input_action::execute()
if( key == "Enter" && KKey( key ).keyCodeQt() == 0 )
key = "Return";
keyboard_handler->send_macro_key( KKey( key ), w ); // the rest
- XFlush( qt_xdisplay());
+ XFlush( tqt_xdisplay());
}
TQString Keyboard_input_action::description() const
diff --git a/khotkeys/shared/gestures.cpp b/khotkeys/shared/gestures.cpp
index 60b1d93b4..f98c44e18 100644
--- a/khotkeys/shared/gestures.cpp
+++ b/khotkeys/shared/gestures.cpp
@@ -154,8 +154,8 @@ bool Gesture::x11Event( XEvent* ev_P )
if( gesture.isEmpty())
{
kdDebug( 1217 ) << "GESTURE: replay" << endl;
- XAllowEvents( qt_xdisplay(), AsyncPointer, CurrentTime );
- XUngrabPointer( qt_xdisplay(), CurrentTime );
+ XAllowEvents( tqt_xdisplay(), AsyncPointer, CurrentTime );
+ XUngrabPointer( tqt_xdisplay(), CurrentTime );
mouse_replay( true );
return true;
}
@@ -178,8 +178,8 @@ bool Gesture::x11Event( XEvent* ev_P )
void Gesture::stroke_timeout()
{
kdDebug( 1217 ) << "GESTURE: timeout" << endl;
- XAllowEvents( qt_xdisplay(), AsyncPointer, CurrentTime );
- XUngrabPointer( qt_xdisplay(), CurrentTime );
+ XAllowEvents( tqt_xdisplay(), AsyncPointer, CurrentTime );
+ XUngrabPointer( tqt_xdisplay(), CurrentTime );
mouse_replay( false );
recording = false;
}
@@ -215,7 +215,7 @@ void Gesture::grab_mouse( bool grab_P )
for( int i = 0;
i < 8;
++i )
- XGrabButton( qt_xdisplay(), button, mods[ i ], qt_xrootwin(), False,
+ XGrabButton( tqt_xdisplay(), button, mods[ i ], tqt_xrootwin(), False,
ButtonPressMask | ButtonReleaseMask | mask[ button ], GrabModeAsync, GrabModeAsync,
None, None );
bool err = handler.error( true );
@@ -224,7 +224,7 @@ void Gesture::grab_mouse( bool grab_P )
else
{
kdDebug( 1217 ) << "Gesture ungrab" << endl;
- XUngrabButton( qt_xdisplay(), button, AnyModifier, qt_xrootwin());
+ XUngrabButton( tqt_xdisplay(), button, AnyModifier, tqt_xrootwin());
}
}
diff --git a/khotkeys/shared/input.cpp b/khotkeys/shared/input.cpp
index 19536a5e9..10a52a554 100644
--- a/khotkeys/shared/input.cpp
+++ b/khotkeys/shared/input.cpp
@@ -169,7 +169,7 @@ static bool xtest()
xtest_inited = true;
int dummy1, dummy2, dummy3, dummy4;
xtest_available =
- ( XTestQueryExtension( qt_xdisplay(), &dummy1, &dummy2, &dummy3, &dummy4 ) == True );
+ ( XTestQueryExtension( tqt_xdisplay(), &dummy1, &dummy2, &dummy3, &dummy4 ) == True );
return xtest_available;
}
#endif
@@ -178,7 +178,7 @@ static bool xtest()
bool Kbd::send_macro_key( const KKey& key, Window window_P )
{
unsigned int keysym = KKeyNative( key ).sym();
- KeyCode x_keycode = XKeysymToKeycode( qt_xdisplay(), keysym );
+ KeyCode x_keycode = XKeysymToKeycode( tqt_xdisplay(), keysym );
if( x_keycode == NoSymbol )
return false;
unsigned int x_mod = KKeyNative( key ).mod();
@@ -186,8 +186,8 @@ bool Kbd::send_macro_key( const KKey& key, Window window_P )
if( xtest() && window_P == None )
{
// CHECKME tohle jeste potrebuje modifikatory
- bool ret = XTestFakeKeyEvent( qt_xdisplay(), x_keycode, True, CurrentTime );
- ret = ret && XTestFakeKeyEvent( qt_xdisplay(), x_keycode, False, CurrentTime );
+ bool ret = XTestFakeKeyEvent( tqt_xdisplay(), x_keycode, True, CurrentTime );
+ ret = ret && XTestFakeKeyEvent( tqt_xdisplay(), x_keycode, False, CurrentTime );
return ret;
}
#endif
@@ -197,9 +197,9 @@ bool Kbd::send_macro_key( const KKey& key, Window window_P )
window_P = InputFocus;
XEvent ev;
ev.type = KeyPress;
- ev.xkey.display = qt_xdisplay();
+ ev.xkey.display = tqt_xdisplay();
ev.xkey.window = window_P;
- ev.xkey.root = qt_xrootwin(); // I don't know whether these have to be set
+ ev.xkey.root = tqt_xrootwin(); // I don't know whether these have to be set
ev.xkey.subwindow = None; // to these values, but it seems to work, hmm
ev.xkey.time = CurrentTime;
ev.xkey.x = 0;
@@ -209,12 +209,12 @@ bool Kbd::send_macro_key( const KKey& key, Window window_P )
ev.xkey.keycode = x_keycode;
ev.xkey.state = x_mod;
ev.xkey.same_screen = True;
- bool ret = XSendEvent( qt_xdisplay(), window_P, True, KeyPressMask, &ev );
+ bool ret = XSendEvent( tqt_xdisplay(), window_P, True, KeyPressMask, &ev );
#if 1
ev.type = KeyRelease; // is this actually really needed ??
- ev.xkey.display = qt_xdisplay();
+ ev.xkey.display = tqt_xdisplay();
ev.xkey.window = window_P;
- ev.xkey.root = qt_xrootwin();
+ ev.xkey.root = tqt_xrootwin();
ev.xkey.subwindow = None;
ev.xkey.time = CurrentTime;
ev.xkey.x = 0;
@@ -224,11 +224,11 @@ bool Kbd::send_macro_key( const KKey& key, Window window_P )
ev.xkey.state = x_mod;
ev.xkey.keycode = x_keycode;
ev.xkey.same_screen = True;
- ret = ret && XSendEvent( qt_xdisplay(), window_P, True, KeyReleaseMask, &ev );
+ ret = ret && XSendEvent( tqt_xdisplay(), window_P, True, KeyReleaseMask, &ev );
#endif
// Qt's autorepeat compression is broken and can create "aab" from "aba"
// XSync() should create delay longer than Qt's max autorepeat interval
- XSync( qt_xdisplay(), False );
+ XSync( tqt_xdisplay(), False );
return ret;
}
@@ -239,9 +239,9 @@ bool Mouse::send_mouse_button( int button_P, bool release_P )
{
// CHECKME tohle jeste potrebuje modifikatory
// a asi i spravnou timestamp misto CurrentTime
- bool ret = XTestFakeButtonEvent( qt_xdisplay(), button_P, True, CurrentTime );
+ bool ret = XTestFakeButtonEvent( tqt_xdisplay(), button_P, True, CurrentTime );
if( release_P )
- ret = ret && XTestFakeButtonEvent( qt_xdisplay(), button_P, False, CurrentTime );
+ ret = ret && XTestFakeButtonEvent( tqt_xdisplay(), button_P, False, CurrentTime );
return ret;
}
#endif
diff --git a/khotkeys/shared/windows.cpp b/khotkeys/shared/windows.cpp
index bd77ba446..4b009ace3 100644
--- a/khotkeys/shared/windows.cpp
+++ b/khotkeys/shared/windows.cpp
@@ -30,7 +30,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
-extern Atom qt_window_role;
+extern Atom tqt_window_role;
namespace KHotKeys
{
@@ -94,13 +94,13 @@ void Windows::window_changed_slot( WId window_P, unsigned int flags_P )
TQString Windows::get_window_role( WId id_P )
{
// TODO this is probably just a hack
- return KWin::readNameProperty( id_P, qt_window_role );
+ return KWin::readNameProperty( id_P, tqt_window_role );
}
TQString Windows::get_window_class( WId id_P )
{
XClassHint hints_ret;
- if( XGetClassHint( qt_xdisplay(), id_P, &hints_ret ) == 0 ) // 0 means error
+ if( XGetClassHint( tqt_xdisplay(), id_P, &hints_ret ) == 0 ) // 0 means error
return "";
TQString ret( hints_ret.res_name );
ret += ' ';
@@ -141,19 +141,19 @@ WId Windows::find_window( const Windowdef_list* window_P )
WId Windows::window_at_position( int x, int y )
{
Window child, dummy;
- Window parent = qt_xrootwin();
- Atom wm_state = XInternAtom( qt_xdisplay(), "WM_STATE", False );
+ Window parent = tqt_xrootwin();
+ Atom wm_state = XInternAtom( tqt_xdisplay(), "WM_STATE", False );
for( int i = 0;
i < 10;
++i )
{
int destx, desty;
// find child at that position
- if( !XTranslateCoordinates( qt_xdisplay(), parent, parent, x, y, &destx, &desty, &child )
+ if( !XTranslateCoordinates( tqt_xdisplay(), parent, parent, x, y, &destx, &desty, &child )
|| child == None )
return 0;
// and now transform coordinates to the child
- if( !XTranslateCoordinates( qt_xdisplay(), parent, child, x, y, &destx, &desty, &dummy ))
+ if( !XTranslateCoordinates( tqt_xdisplay(), parent, child, x, y, &destx, &desty, &dummy ))
return 0;
x = destx;
y = desty;
@@ -161,7 +161,7 @@ WId Windows::window_at_position( int x, int y )
int format;
unsigned long nitems, after;
unsigned char* prop;
- if( XGetWindowProperty( qt_xdisplay(), child, wm_state, 0, 0, False, AnyPropertyType,
+ if( XGetWindowProperty( tqt_xdisplay(), child, wm_state, 0, 0, False, AnyPropertyType,
&type, &format, &nitems, &after, &prop ) == Success )
{
if( prop != NULL )