From ddf5c4261c7468e26d963d0d046fc1d0ec33e306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 25 Aug 2004 16:54:36 +0000 Subject: [PATCH] Make also secondary key in the shortcut work properly with the tabbox. CCMAIL: 82103-done@bugs.kde.org svn path=/trunk/kdebase/kwin/; revision=340983 --- tabbox.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tabbox.cpp b/tabbox.cpp index e3ae2c9dad..e0928d7236 100644 --- a/tabbox.cpp +++ b/tabbox.cpp @@ -640,13 +640,13 @@ bool areKeySymXsDepressed( bool bAll, int nKeySyms, ... ) return bAll; } -static -bool areModKeysDepressed( const KShortcut& cut ) +static bool areModKeysDepressed( const KKeySequence& seq ) { - uint rgKeySyms[10]; int nKeySyms = 0; - int mod = cut.seq(0).key(0).modFlags(); + if( seq.isNull()) + return false; + int mod = seq.key(seq.count()-1).modFlags(); if ( mod & KKey::SHIFT ) { @@ -679,6 +679,18 @@ bool areModKeysDepressed( const KShortcut& cut ) rgKeySyms[4], rgKeySyms[5], rgKeySyms[6], rgKeySyms[7] ); } +static bool areModKeysDepressed( const KShortcut& cut ) + { + for( int i = 0; + i < cut.count(); + ++i ) + { + if( areModKeysDepressed( cut.seq( i ))) + return true; + } + return false; + } + void Workspace::slotWalkThroughWindows() { if ( root != qt_xrootwin() )