rpms/kdebase/devel kdebase-3.5.2-kwin.patch, NONE, 1.1 kdebase.spec, 1.164, 1.165
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Apr 28 10:42:31 UTC 2006
Author: than
Update of /cvs/dist/rpms/kdebase/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv23223
Modified Files:
kdebase.spec
Added Files:
kdebase-3.5.2-kwin.patch
Log Message:
fix #189702, kwin crashes when switching windows with Alt-Tab
kdebase-3.5.2-kwin.patch:
activation.cpp | 2 -
client.cpp | 18 +++++++++++---
clients/b2/b2client.cpp | 2 -
clients/default/kdedefault.cpp | 2 -
events.cpp | 8 +++---
geometry.cpp | 16 ++++++++++++
kcmkwin/kwinoptions/windows.cpp | 24 +++++++++++++++++--
kcmkwin/kwinoptions/windows.h | 3 ++
kcmkwin/kwinrules/main.cpp | 4 +--
kompmgr/kompmgr.c | 15 +++++++++---
layers.cpp | 17 ++++++++++++-
manage.cpp | 11 ++++++++
popupinfo.cpp | 1
tabbox.cpp | 50 +++++++++++++++++++++++++---------------
useractions.cpp | 3 +-
utils.cpp | 9 ++++---
utils.h | 8 ++----
workspace.cpp | 35 +++++++++++++++++++++++-----
workspace.h | 4 ++-
19 files changed, 177 insertions(+), 55 deletions(-)
--- NEW FILE kdebase-3.5.2-kwin.patch ---
--- kdebase-3.5.2/kwin/clients/b2/b2client.cpp.kwin 2006-01-19 18:01:02.000000000 +0100
+++ kdebase-3.5.2/kwin/clients/b2/b2client.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -530,7 +530,7 @@
if (drawSmallBorders && (maximizeMode() & MaximizeVertical)) {
return false;
} else {
- return do_draw_handle & resizable;
+ return do_draw_handle && resizable;
}
}
--- kdebase-3.5.2/kwin/clients/default/kdedefault.cpp.kwin 2005-09-10 10:25:55.000000000 +0200
+++ kdebase-3.5.2/kwin/clients/default/kdedefault.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -808,7 +808,7 @@
case LM_ExplicitButtonSpacer:
if ( !isToolWindow() )
return borderWidth/2;
-
+ // fall though
default:
return KCommonDecoration::layoutMetric(lm, respectWindowState, btn);
}
--- kdebase-3.5.2/kwin/kcmkwin/kwinrules/main.cpp.kwin 2006-03-17 11:17:42.000000000 +0100
+++ kdebase-3.5.2/kwin/kcmkwin/kwinrules/main.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -119,8 +119,8 @@
if( rule->types != NET::AllTypesMask )
{
int bits = 0;
- for( int bit = 1;
- bit < 1 << 31;
+ for( unsigned int bit = 1;
+ bit < 1U << 31;
bit <<= 1 )
if( rule->types & bit )
++bits;
--- kdebase-3.5.2/kwin/kcmkwin/kwinoptions/windows.cpp.kwin 2006-03-17 11:17:42.000000000 +0100
+++ kdebase-3.5.2/kwin/kcmkwin/kwinoptions/windows.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -228,6 +228,7 @@
" is pressed, with no popup widget. In addition, the previously"
" activated window will be sent to the back in this mode.");
QWhatsThis::add( altTabPopup, wtstr );
+ connect(focusCombo, SIGNAL(activated(int)), this, SLOT(updateAltTabMode()));
traverseAll = new QCheckBox( i18n( "&Traverse windows on all desktops" ), kbdBox );
kLay->addWidget( traverseAll );
@@ -279,6 +280,13 @@
// this will disable/hide the auto raise delay widget if focus==click
setAutoRaiseEnabled();
+ updateAltTabMode();
+}
+
+void KFocusConfig::updateAltTabMode()
+{
+ // not KDE-style Alt+Tab with unreasonable focus policies
+ altTabPopup->setEnabled( focusCombo->currentItem() == 0 || focusCombo->currentItem() == 1 );
}
void KFocusConfig::setAutoRaiseInterval(int tb)
@@ -900,7 +908,6 @@
BrdrSnap->setSpecialValueText( i18n("none") );
BrdrSnap->setRange( 0, MAX_BRDR_SNAP);
BrdrSnap->setLabel(i18n("&Border snap zone:"));
- BrdrSnap->setSuffix(i18n(" pixels"));
BrdrSnap->setSteps(1,10);
QWhatsThis::add( BrdrSnap, i18n("Here you can set the snap zone for screen borders, i.e."
" the 'strength' of the magnetic field which will make windows snap to the border when"
@@ -910,7 +917,6 @@
WndwSnap->setSpecialValueText( i18n("none") );
WndwSnap->setRange( 0, MAX_WNDW_SNAP);
WndwSnap->setLabel(i18n("&Window snap zone:"));
- WndwSnap->setSuffix( i18n(" pixels"));
BrdrSnap->setSteps(1,10);
QWhatsThis::add( WndwSnap, i18n("Here you can set the snap zone for windows, i.e."
" the 'strength' of the magnetic field which will make windows snap to each other when"
@@ -935,8 +941,14 @@
connect( moveResizeMaximized, SIGNAL(toggled(bool)), SLOT(changed()));
connect( placementCombo, SIGNAL(activated(int)), SLOT(changed()));
connect( BrdrSnap, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect( BrdrSnap, SIGNAL(valueChanged(int)), SLOT(slotBrdrSnapChanged(int)));
connect( WndwSnap, SIGNAL(valueChanged(int)), SLOT(changed()));
+ connect( WndwSnap, SIGNAL(valueChanged(int)), SLOT(slotWndwSnapChanged(int)));
connect( OverlapSnap, SIGNAL(clicked()), SLOT(changed()));
+
+ // To get suffix to BrdrSnap and WndwSnap inputs with default values.
+ slotBrdrSnapChanged(BrdrSnap->value());
+ slotWndwSnapChanged(WndwSnap->value());
}
int KMovingConfig::getMove()
@@ -1007,6 +1019,14 @@
moveResizeMaximized->setChecked(a);
}
+void KMovingConfig::slotBrdrSnapChanged(int value) {
+ BrdrSnap->setSuffix(i18n(" pixel", " pixels", value));
+}
+
+void KMovingConfig::slotWndwSnapChanged(int value) {
+ WndwSnap->setSuffix(i18n(" pixel", " pixels", value));
+}
+
void KMovingConfig::load( void )
{
QString key;
--- kdebase-3.5.2/kwin/kcmkwin/kwinoptions/windows.h.kwin 2006-01-19 18:01:05.000000000 +0100
+++ kdebase-3.5.2/kwin/kcmkwin/kwinoptions/windows.h 2006-04-28 12:30:43.000000000 +0200
@@ -85,6 +85,7 @@
void autoRaiseOnTog(bool);//CT 23Oct1998
void delayFocusOnTog(bool);
void clickRaiseOnTog(bool);
+ void updateAltTabMode();
void changed() { emit KCModule::changed(true); }
@@ -138,6 +139,8 @@
void setMinimizeAnim( bool );
void setMinimizeAnimSpeed( int );
void changed() { emit KCModule::changed(true); }
+ void slotBrdrSnapChanged( int );
+ void slotWndwSnapChanged( int );
private:
int getMove( void );
--- kdebase-3.5.2/kwin/kompmgr/kompmgr.c.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/kompmgr/kompmgr.c 2006-04-28 12:30:43.000000000 +0200
@@ -1,5 +1,5 @@
/*
- * $Id: kompmgr.c 511474 2006-02-20 01:12:52Z danimo $
+ * $Id: kompmgr.c 528927 2006-04-12 05:27:31Z rohanpm $
*
* Copyright © 2003 Keith Packard
*
@@ -201,7 +201,7 @@
typedef enum _compMode {
CompSimple, /* looks like a regular X server */
CompServerShadows, /* use window alpha for shadow; sharp, but precise */
- CompClientShadows, /* use window extents for shadow, blurred */
+ CompClientShadows /* use window extents for shadow, blurred */
} CompMode;
static void
@@ -2878,7 +2878,16 @@
break;*/ /*skip if opacity does not change*/
if (fadeTrans)
{
- set_fade (dpy, w, w->opacity*1.0/OPAQUE, (tmp*1.0)/OPAQUE, fade_out_step, 0, False, True, True, False);
+ static double start, finish, step;
+ start = w->opacity*1.0/OPAQUE;
+ finish = (tmp*1.0)/OPAQUE;
+
+ if ( start > finish )
+ step = fade_out_step;
+ else
+ step = fade_in_step;
+
+ set_fade (dpy, w, start, finish, step, 0, False, True, True, False);
break;
}
else
--- kdebase-3.5.2/kwin/activation.cpp.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/activation.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -231,7 +231,7 @@
last_active_client = active_client;
if ( active_client )
{
- updateFocusChains( active_client, true ); // make it first in focus chain
+ updateFocusChains( active_client, FocusChainMakeFirst );
active_client->demandAttention( false );
}
pending_take_activity = NULL;
--- kdebase-3.5.2/kwin/client.cpp.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/client.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -578,7 +578,7 @@
updateAllowedActions();
workspace()->updateMinimizedOfTransients( this );
updateWindowRules();
- workspace()->updateFocusChains( this, false ); // make it last in the focus chain
+ workspace()->updateFocusChains( this, Workspace::FocusChainMakeLast );
}
void Client::unminimize( bool avoid_animation )
@@ -895,7 +895,16 @@
}
if( show )
{
- if( workspace()->showingDesktop())
+ bool belongs_to_desktop = false;
+ for( ClientList::ConstIterator it = group()->members().begin();
+ it != group()->members().end();
+ ++it )
+ if( (*it)->isDesktop())
+ {
+ belongs_to_desktop = true;
+ break;
+ }
+ if( !belongs_to_desktop && workspace()->showingDesktop())
workspace()->resetShowingDesktop( true );
if( isShade())
setMappingState( IconicState );
@@ -1149,7 +1158,8 @@
info->setState( b?NET::SkipTaskbar:0, NET::SkipTaskbar );
updateWindowRules();
if( was_wants_tab_focus != wantsTabFocus())
- workspace()->updateFocusChains( this, isActive());
+ workspace()->updateFocusChains( this,
+ isActive() ? Workspace::FocusChainMakeFirst : Workspace::FocusChainUpdate );
}
void Client::setSkipPager( bool b )
@@ -1191,7 +1201,7 @@
}
if( decoration != NULL )
decoration->desktopChange();
- workspace()->updateFocusChains( this, true );
+ workspace()->updateFocusChains( this, Workspace::FocusChainMakeFirst );
updateVisibility();
updateWindowRules();
}
--- kdebase-3.5.2/kwin/events.cpp.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/events.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -370,7 +370,7 @@
if( c )
{
c->windowEvent( e );
- updateFocusChains( c, true );
+ updateFocusChains( c, FocusChainUpdate );
return true;
}
break;
@@ -402,15 +402,15 @@
if ( e->xconfigurerequest.parent == root )
{
XWindowChanges wc;
- unsigned int value_mask = 0;
- wc.border_width = 0;
+ wc.border_width = e->xconfigurerequest.border_width;
wc.x = e->xconfigurerequest.x;
wc.y = e->xconfigurerequest.y;
wc.width = e->xconfigurerequest.width;
wc.height = e->xconfigurerequest.height;
wc.sibling = None;
wc.stack_mode = Above;
- value_mask = e->xconfigurerequest.value_mask | CWBorderWidth;
+ unsigned int value_mask = e->xconfigurerequest.value_mask
+ & ( CWX | CWY | CWWidth | CWHeight | CWBorderWidth );
XConfigureWindow( qt_xdisplay(), e->xconfigurerequest.window, value_mask, &wc );
return true;
}
--- kdebase-3.5.2/kwin/geometry.cpp.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/geometry.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -1281,7 +1281,21 @@
{ // update to match restrictions
QSize new_size = adjustedSize();
if( new_size != size() && !isFullScreen())
+ {
+ QRect orig_geometry = geometry();
resizeWithChecks( new_size );
+ if( ( !isSpecialWindow() || isToolbar()) && !isFullScreen())
+ {
+ // try to keep the window in its xinerama screen if possible,
+ // if that fails at least keep it visible somewhere
+ QRect area = workspace()->clientArea( MovementArea, this );
+ if( area.contains( orig_geometry ))
+ keepInArea( area );
+ area = workspace()->clientArea( WorkArea, this );
+ if( area.contains( orig_geometry ))
+ keepInArea( area );
+ }
+ }
}
updateAllowedActions(); // affects isResizeable()
}
@@ -1840,7 +1854,7 @@
// maximing one way and unmaximizing the other way shouldn't happen
Q_ASSERT( !( vertical && horizontal )
- || (( max_mode & MaximizeVertical != 0 ) == ( max_mode & MaximizeHorizontal != 0 )));
+ || ((( max_mode & MaximizeVertical ) != 0 ) == (( max_mode & MaximizeHorizontal ) != 0 )));
QRect clientArea = workspace()->clientArea( MaximizeArea, this );
--- kdebase-3.5.2/kwin/layers.cpp.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/layers.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -100,7 +100,7 @@
{
if( block_stacking_updates > 0 )
{
- blocked_propagating_new_clients |= propagate_new_clients;
+ blocked_propagating_new_clients = blocked_propagating_new_clients || propagate_new_clients;
return;
}
ClientList new_stacking_order = constrainedStackingOrder();
@@ -441,6 +441,21 @@
}
}
}
+ // the same for global_focus_chain
+ if( c->wantsTabFocus() && global_focus_chain.contains( active_client ))
+ {
+ global_focus_chain.remove( c );
+ for( ClientList::Iterator it = global_focus_chain.fromLast();
+ it != global_focus_chain.end();
+ --it )
+ {
+ if( Client::belongToSameApplication( active_client, *it ))
+ {
+ global_focus_chain.insert( it, c );
+ break;
+ }
+ }
+ }
updateStackingOrder();
}
--- kdebase-3.5.2/kwin/manage.cpp.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/manage.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -455,7 +455,16 @@
if( !isOnCurrentDesktop() && !isMapped && !session && ( allow || workspace()->sessionSaving()))
workspace()->setCurrentDesktop( desktop());
- if( workspace()->showingDesktop())
+ bool belongs_to_desktop = false;
+ for( ClientList::ConstIterator it = group()->members().begin();
+ it != group()->members().end();
+ ++it )
+ if( (*it)->isDesktop())
+ {
+ belongs_to_desktop = true;
+ break;
+ }
+ if( !belongs_to_desktop && workspace()->showingDesktop())
workspace()->resetShowingDesktop( false );
if( isOnCurrentDesktop() && !isMapped && !allow )
--- kdebase-3.5.2/kwin/popupinfo.cpp.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/popupinfo.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -38,6 +38,7 @@
: QWidget( 0, name )
{
m_infoString = "";
+ m_shown = false;
reset();
reconfigure();
connect(&m_delayedHideTimer, SIGNAL(timeout()), this, SLOT(hide()));
--- kdebase-3.5.2/kwin/tabbox.cpp.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/tabbox.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -763,7 +763,7 @@
return;
if ( tab_grab || control_grab )
return;
- if ( options->altTabStyle == Options::CDE )
+ if ( options->altTabStyle == Options::CDE || !options->focusPolicyIsReasonable())
{
//XUngrabKeyboard(qt_xdisplay(), qt_x_time); // need that because of accelerator raw mode
// CDE style raise / lower
@@ -789,7 +789,7 @@
return;
if( tab_grab || control_grab )
return;
- if ( options->altTabStyle == Options::CDE )
+ if ( options->altTabStyle == Options::CDE || !options->focusPolicyIsReasonable())
{
// CDE style raise / lower
CDEWalkThroughWindows( false );
@@ -926,7 +926,23 @@
void Workspace::CDEWalkThroughWindows( bool forward )
{
- Client* c = activeClient();
+ Client* c = NULL;
+// this function find the first suitable client for unreasonable focus
+// policies - the topmost one, with some exceptions (can't be keepabove/below,
+// otherwise it gets stuck on them)
+ Q_ASSERT( block_stacking_updates == 0 );
+ for( ClientList::ConstIterator it = stacking_order.fromLast();
+ it != stacking_order.end();
+ --it )
+ {
+ if ( (*it)->isOnCurrentDesktop() && !(*it)->isSpecialWindow()
+ && (*it)->isShown( false ) && (*it)->wantsTabFocus()
+ && !(*it)->keepAbove() && !(*it)->keepBelow())
+ {
+ c = *it;
+ break;
+ }
+ }
Client* nc = c;
bool options_traverse_all;
{
@@ -952,7 +968,7 @@
}
} while (nc && nc != c &&
(( !options_traverse_all && !nc->isOnDesktop(currentDesktop())) ||
- nc->isMinimized() || !nc->wantsTabFocus() ) );
+ nc->isMinimized() || !nc->wantsTabFocus() || nc->keepAbove() || nc->keepBelow() ) );
if (nc)
{
if (c && c != nc)
@@ -1152,14 +1168,13 @@
*/
Client* Workspace::nextFocusChainClient( Client* c ) const
{
- int desktop = c->isOnAllDesktops() ? currentDesktop() : c->desktop();
- if ( focus_chain[desktop].isEmpty() )
+ if ( global_focus_chain.isEmpty() )
return 0;
- ClientList::ConstIterator it = focus_chain[desktop].find( c );
- if ( it == focus_chain[desktop].end() )
- return focus_chain[desktop].last();
- if ( it == focus_chain[desktop].begin() )
- return focus_chain[desktop].last();
+ ClientList::ConstIterator it = global_focus_chain.find( c );
+ if ( it == global_focus_chain.end() )
+ return global_focus_chain.last();
+ if ( it == global_focus_chain.begin() )
+ return global_focus_chain.last();
--it;
return *it;
}
@@ -1170,15 +1185,14 @@
*/
Client* Workspace::previousFocusChainClient( Client* c ) const
{
- int desktop = c->isOnAllDesktops() ? currentDesktop() : c->desktop();
- if ( focus_chain[desktop].isEmpty() )
+ if ( global_focus_chain.isEmpty() )
return 0;
- ClientList::ConstIterator it = focus_chain[desktop].find( c );
- if ( it == focus_chain[desktop].end() )
- return focus_chain[desktop].first();
+ ClientList::ConstIterator it = global_focus_chain.find( c );
+ if ( it == global_focus_chain.end() )
+ return global_focus_chain.first();
++it;
- if ( it == focus_chain[desktop].end() )
- return focus_chain[desktop].first();
+ if ( it == global_focus_chain.end() )
+ return global_focus_chain.first();
return *it;
}
--- kdebase-3.5.2/kwin/useractions.cpp.kwin 2005-11-08 23:36:42.000000000 +0100
+++ kdebase-3.5.2/kwin/useractions.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -391,6 +391,7 @@
break;
case Options::RestoreOp:
c->maximize( Client::MaximizeRestore );
+ break;
case Options::MinimizeOp:
c->minimize();
break;
@@ -471,7 +472,7 @@
cancelShadeHover();
break;
case Options::MouseOperationsMenu:
- if ( isActive() & options->clickRaise )
+ if ( isActive() && options->clickRaise )
autoRaise();
workspace()->showWindowMenu( globalPos, this );
break;
--- kdebase-3.5.2/kwin/utils.cpp.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/utils.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -309,9 +309,12 @@
hostnamebuf[sizeof(hostnamebuf)-1] = 0;
if (host == hostnamebuf)
return true;
- char *dot = strchr(hostnamebuf, '.');
- if (dot && !(*dot = 0) && host == hostnamebuf)
- return true;
+ if( char *dot = strchr(hostnamebuf, '.'))
+ {
+ *dot = '\0';
+ if( host == hostnamebuf )
+ return true;
+ }
}
return false;
}
--- kdebase-3.5.2/kwin/utils.h.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/utils.h 2006-04-28 12:30:43.000000000 +0200
@@ -232,15 +232,13 @@
inline
int timestampCompare( Time time1, Time time2 ) // like strcmp()
{
- if( time1 == time2 )
- return 0;
- return ( time1 - time2 ) < 1000000000 ? 1 : -1; // time1 > time2 -> 1, handle wrapping
+ return NET::timestampCompare( time1, time2 );
}
inline
Time timestampDiff( Time time1, Time time2 ) // returns time2 - time1
- { // no need to handle wrapping?
- return time2 - time1;
+ {
+ return NET::timestampDiff( time1, time2 );
}
bool isLocalMachine( const QCString& host );
--- kdebase-3.5.2/kwin/workspace.cpp.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/workspace.cpp 2006-04-28 12:30:43.000000000 +0200
@@ -512,7 +512,7 @@
}
else
{
- updateFocusChains( c, true );
+ updateFocusChains( c, FocusChainUpdate ); // add to focus chain if not already there
clients.append( c );
}
if( !unconstrained_stacking_order.contains( c ))
@@ -564,6 +564,7 @@
i <= numberOfDesktops();
++i )
focus_chain[ i ].remove( c );
+ global_focus_chain.remove( c );
attention_chain.remove( c );
if( c->isTopMenu())
removeTopMenu( c );
@@ -590,7 +591,7 @@
updateClientArea();
}
-void Workspace::updateFocusChains( Client* c, bool make_first )
+void Workspace::updateFocusChains( Client* c, FocusChainChange change )
{
if( !c->wantsTabFocus()) // doesn't want tab focus, remove
{
@@ -598,16 +599,21 @@
i<= numberOfDesktops();
++i )
focus_chain[i].remove(c);
+ global_focus_chain.remove( c );
return;
}
if(c->desktop() == NET::OnAllDesktops)
{ //now on all desktops, add it to focus_chains it is not already in
for( int i=1; i<= numberOfDesktops(); i++)
- { // make_first works only on current desktop, don't affect all desktops
- if( make_first && i == currentDesktop())
+ { // making first/last works only on current desktop, don't affect all desktops
+ if( i == currentDesktop()
+ && ( change == FocusChainMakeFirst || change == FocusChainMakeLast ))
{
focus_chain[ i ].remove( c );
- focus_chain[ i ].append( c );
+ if( change == FocusChainMakeFirst )
+ focus_chain[ i ].append( c );
+ else
+ focus_chain[ i ].prepend( c );
}
else if( !focus_chain[ i ].contains( c ))
focus_chain[ i ].prepend( c ); // otherwise add as the last one
@@ -619,11 +625,16 @@
{
if( i == c->desktop())
{
- if( make_first )
+ if( change == FocusChainMakeFirst )
{
focus_chain[ i ].remove( c );
focus_chain[ i ].append( c );
}
+ else if( change == FocusChainMakeLast )
+ {
+ focus_chain[ i ].remove( c );
+ focus_chain[ i ].prepend( c );
+ }
else if( !focus_chain[ i ].contains( c ))
focus_chain[ i ].prepend( c );
}
@@ -631,6 +642,18 @@
focus_chain[ i ].remove( c );
}
}
+ if( change == FocusChainMakeFirst )
+ {
+ global_focus_chain.remove( c );
+ global_focus_chain.append( c );
+ }
+ else if( change == FocusChainMakeLast )
+ {
+ global_focus_chain.remove( c );
+ global_focus_chain.prepend( c );
+ }
+ else if( !global_focus_chain.contains( c ))
+ global_focus_chain.prepend( c );
}
void Workspace::updateCurrentTopMenu()
--- kdebase-3.5.2/kwin/workspace.h.kwin 2006-03-17 11:17:43.000000000 +0100
+++ kdebase-3.5.2/kwin/workspace.h 2006-04-28 12:30:43.000000000 +0200
@@ -251,7 +251,8 @@
bool checkStartupNotification( Window w, KStartupInfoId& id, KStartupInfoData& data );
void focusToNull(); // SELI public?
- void updateFocusChains( Client* c, bool make_first );
+ enum FocusChainChange { FocusChainMakeFirst, FocusChainMakeLast, FocusChainUpdate };
+ void updateFocusChains( Client* c, FocusChainChange change );
bool forcedGlobalMouseGrab() const;
void clientShortcutUpdated( Client* c );
@@ -510,6 +511,7 @@
ClientList unconstrained_stacking_order;
ClientList stacking_order;
QValueVector< ClientList > focus_chain;
+ ClientList global_focus_chain; // this one is only for things like tabbox's MRU
ClientList should_get_focus; // last is most recent
ClientList attention_chain;
Index: kdebase.spec
===================================================================
RCS file: /cvs/dist/rpms/kdebase/devel/kdebase.spec,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -r1.164 -r1.165
--- kdebase.spec 25 Apr 2006 14:17:54 -0000 1.164
+++ kdebase.spec 28 Apr 2006 10:42:28 -0000 1.165
@@ -20,7 +20,7 @@
Summary: K Desktop Environment - core files
Name: kdebase
Version: 3.5.2
-Release: 4
+Release: 5
Epoch: 6
Url: http://www.kde.org
Group: User Interface/Desktops
@@ -53,6 +53,9 @@
Patch14: kdebase-3.5.1-kdm-readme.patch
Patch15: kdebase-3.5.1-konsole-fonts.patch
+# upstream patches
+Patch100: kdebase-3.5.2-kwin.patch
+
Requires: kdelibs >= %{kdelibs_epoch}:%{version}
Requires: libxml2 >= 2.6.5
Requires: /etc/X11/xdm/Xaccess
@@ -137,6 +140,9 @@
%patch14 -p1 -b .kdm-readme
%patch15 -p1 -b .konsole-fonts
+# upstream patches
+%patch100 -p1 -b .kwin
+
%if %{rhel}
rm -rf kdeprint/kdeprintfax
perl -pi -e "s,kdeprintfax,," kdeprint/Makefile.am
@@ -151,11 +157,6 @@
%build
# set some default enviroments
unset QTDIR && . /etc/profile.d/qt.sh
-FLAGS="$RPM_OPT_FLAGS"
-
-export CXXFLAGS="$FLAGS"
-export CFLAGS="$FLAGS"
-export KDEDIR=%{_prefix}
%if %{make_cvs}
make -f admin/Makefile.common cvs
@@ -425,6 +426,7 @@
%changelog
* Tue Apr 25 2006 Than Ngo <than at redhat.com> 6:3.5.2-4
- fix #189790, kcheckpass cannot authenticate users using a LDAP directory
+- fix #189702, kwin crashes when switching windows with Alt-Tab
* Thu Apr 13 2006 Than Ngo <than at redhat.com> 6:3.5.2-3
- fix startkde to look in /usr and /etc/kde for env/ and shutdown/
More information about the fedora-cvs-commits
mailing list