Commit 5fcbd27a authored by Fabian Vogt's avatar Fabian Vogt Committed by Alexander Lohnau
Browse files

Use xtest also for sending input to the active window

This is possible with xtest as well and necessary to work with applications
which don't accept synthetic events, like those using XInput2 (GTK3, Firefox)
parent ba10e042
......@@ -173,13 +173,14 @@ bool ShortcutsHandler::send_macro_key( const QKeySequence &key, Window window_P
unsigned int keysym = key[0];
int x_keycode;
KKeyServer::keyQtToCodeX(keysym, &x_keycode);
if( x_keycode == NoSymbol )
return false;
unsigned int x_mod;
KKeyServer::keyQtToModX(keysym, &x_mod );
if( xtest() && window_P == None )
if( xtest() && (window_P == None || window_P == InputFocus) )
QVector<int> keycodes_to_press, keycodes_to_release;
get_modifier_change(x_mod, keycodes_to_press, keycodes_to_release);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment