CVS commit by leonb: Fixed another anomaly with focus navigation with the tab key. M +5 -4 qxembed.cpp 1.59 --- kdelibs/kdeui/qxembed.cpp #1.58:1.59 @@ -163,6 +163,4 @@ static QPtrDict > * // L0203: See L0660, L1400, L1450 static XKeyEvent last_key_event; -// L0204: See L0620, L1531 -static bool tabForward = true; // L0300: This class gives access protected members of class QWidget. @@ -359,4 +357,5 @@ bool QXEmbedAppFilter::eventFilter( QObj // L0621: The following tests are copied from QWidget::event(). bool res = false; + bool tabForward = true; if ( !(k->state() & ControlButton || k->state() & AltButton) ) { if ( k->key() == Key_Backtab || (k->key() == Key_Tab && (k->state() & ShiftButton)) ) { @@ -494,5 +493,5 @@ static int qxembed_x11_event_filter( XEv { // L0686: Search last widget in tab chain - QFocusEvent::setReason( QFocusEvent::Tab ); + QFocusEvent::setReason( QFocusEvent::Backtab ); w->topLevelWidget()->setFocus(); ((QPublicWidget*)w->topLevelWidget())->focusNextPrev(false); @@ -861,5 +860,7 @@ void QXEmbed::focusInEvent( QFocusEvent // its own tab chain. if ( e->reason() == QFocusEvent::Tab ) - detail = tabForward ? XEMBED_FOCUS_FIRST : XEMBED_FOCUS_LAST; + detail = XEMBED_FOCUS_FIRST; + else if ( e->reason() == QFocusEvent::Backtab ) + detail = XEMBED_FOCUS_LAST; sendXEmbedMessage( window, XEMBED_FOCUS_IN, detail); }