rpms/kdebase/FC-5 kdebase-3.5.2-1-redhat.patch, NONE, 1.1 kdebase-3.5.2-kwin.patch, NONE, 1.1 kdebase.spec, 1.161, 1.162 kdebase-3.5.2-redhat.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Fri Apr 28 14:50:55 UTC 2006


Author: than

Update of /cvs/dist/rpms/kdebase/FC-5
In directory cvs.devel.redhat.com:/tmp/cvs-serv30924

Modified Files:
	kdebase.spec 
Added Files:
	kdebase-3.5.2-1-redhat.patch kdebase-3.5.2-kwin.patch 
Removed Files:
	kdebase-3.5.2-redhat.patch 
Log Message:
- fix #189790, kcheckpass cannot authenticate users using a LDAP directory
- fix #189702, kwin crashes when switching windows with Alt-Tab
- fix startkde to look in /usr and /etc/kde for env/ and shutdown/
- update dbus patch


kdebase-3.5.2-1-redhat.patch:
 kdebase-3.4.91/kde.pamd |   16 +++++++----
 kdebase-3.5.1/startkde  |   68 +++++++++++++++++++++++++++++++++++++++++-------
 2 files changed, 69 insertions(+), 15 deletions(-)

--- NEW FILE kdebase-3.5.2-1-redhat.patch ---
--- kdebase-3.4.91/kde.pamd.redhat	2005-09-10 10:26:16.000000000 +0200
+++ kdebase-3.4.91/kde.pamd	2005-09-27 18:16:15.000000000 +0200
@@ -1,7 +1,11 @@
 #%PAM-1.0
-auth       required	/lib/security/pam_pwdb.so shadow nullok
-auth       required	/lib/security/pam_nologin.so
-account    required	/lib/security/pam_pwdb.so
-password   required	/lib/security/pam_cracklib.so
-password   required	/lib/security/pam_pwdb.so shadow nullok use_authtok
-session    required	/lib/security/pam_pwdb.so
+auth       sufficient	pam_timestamp.so
+auth       include     system-auth
+account    required	pam_nologin.so
+account    include     system-auth
+password   include     system-auth
+session    include	system-auth
+session    required    pam_loginuid.so
+session    optional	pam_timestamp.so
+session    optional    pam_selinux.so
+session    optional	pam_console.so
--- kdebase-3.5.1/startkde.redhat	2006-01-19 18:03:19.000000000 +0100
+++ kdebase-3.5.1/startkde	2006-02-15 18:58:10.000000000 +0100
@@ -1,8 +1,56 @@
 #!/bin/sh
 #
 #  DEFAULT KDE STARTUP SCRIPT ( KDE-3.5.2 )
+#  Modified for Red Hat Linux
 #
 
+unset BLOCK_SIZE # breaks parsing of df output
+shopt -u -o noclobber # allow overwriting of files with '>'
+
+# set up user environment if not present
+# check for space on /tmp and "$HOME" and for write access
+#  error exit, if not
+space_tmp=`df /tmp | xargs | cut -d" " -f11`
+homedir_mount=`df "$HOME" | xargs | cut -d" " -f8`
+
+if [ "$homedir_mount" = "AFS" -a -x "`which fs 2>/dev/null`" ] ; then
+    # check for AFS
+    space_home=`fs df "$HOME" | xargs | cut -d" " -f10`
+else
+    # check regular mounts
+    space_home=`df "$HOME" | xargs | cut -d" " -f11`
+fi
+
+if [ $space_tmp -lt 50 ]; then
+    echo $"Not enough free disk space on /tmp"
+    exit 1
+fi
+
+if [ $space_home -lt 25 ]; then
+    echo $"Not enough free disk space on "$HOME""
+    exit 1
+fi
+testfile_tmp=`mktemp /tmp/KDE.startkde.XXXXXX`
+testfile_home=`mktemp "$HOME"/KDE.startkde.XXXXXX`
+
+if ! echo TEST_TEXT >$testfile_tmp 2>/dev/null ; then
+    echo $"You don't have write permissions for /tmp"
+    exit 1
+fi
+rm -f $testfile_tmp
+
+if ! echo TEST_TEXT >$testfile_home 2>/dev/null ; then
+     echo $"You don't have write permissions for "$HOME""
+     exit 1
+fi
+rm -f $testfile_home
+
+[ -d "$HOME"/.kde/share/config ] || mkdir -p "$HOME"/.kde/share/config
+
+if [ ! -e "$HOME"/.kde/share/config/emaildefaults ]; then
+  /usr/bin/mailsettings >"$HOME"/.kde/share/config/emaildefaults
+fi
+
 # When the X server dies we get a HUP signal from xinit. We must ignore it
 # because we still need to do some cleanup.
 trap 'echo GOT SIGHUP' HUP
@@ -14,12 +62,12 @@
 	exit 1
 fi
 
-# Set the background to plain grey.
+# Set the background to the Red Hat default blue
 # The standard X background is nasty, causing moire effects and exploding
 # people's heads. We use colours from the standard KDE palette for those with
 # palettised displays.
 if test -z "$XDM_MANAGED" || echo "$XDM_MANAGED" | grep ",auto" > /dev/null; then
-  xsetroot -solid "#000000"
+  xsetroot -solid "#5477A0"
 fi
 
 # we have to unset this for Darwin since it will screw up KDE's dynamic-loading
@@ -64,7 +112,7 @@
 cat >$kdehome/share/config/startupconfigkeys <<EOF
 kcminputrc Mouse cursorTheme ''
 kcminputrc Mouse cursorSize ''
-kpersonalizerrc General FirstLogin true
+kpersonalizerrc General FirstLogin false
 ksplashrc KSplash Theme Default
 kcmrandrrc Display ApplyOnStartup false
 kcmrandrrc [Screen0]
@@ -135,8 +183,8 @@
     done
 fi
 
-# Source scripts found in <localprefix>/env/*.sh and <prefixes>/env/*.sh
-# (where <localprefix> is $KDEHOME or ~/.kde, and <prefixes> is where KDE is installed)
+# Source scripts found in <localprefix>/env/*.sh and /etc/kde/env/*.sh
+# (where <localprefix> is $KDEHOME or ~/.kde)
 #
 # This is where you can define environment variables that will be available to
 # all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent`
@@ -147,10 +195,11 @@
 # For anything else (that doesn't set env vars, or that needs a window manager),
 # better use the Autostart folder.
 
-exepath=`kde-config --path exe | tr : '\n'`
+exepath=`kde-config --path exe | tr : '\n'`
+envpath=/etc/kde/env/
 
-for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/env/,p'`; do
-  for file in "$prefix"*.sh; do
+for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/env/,p'` $envpath ; do
+  for file in "$prefix"*.sh ; do
     test -r "$file" && . "$file"
   done
 done
@@ -339,7 +388,8 @@
 echo 'startkde: Running shutdown scripts...'  1>&2
 
 # Run scripts found in $KDEDIRS/shutdown
-for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/shutdown/,p'`; do
+shutdownpath=/etc/kde/shutdown/
+for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/shutdown/,p'` $shutdownpath; do
   for file in `ls "$prefix" 2> /dev/null | egrep -v '(~|\.bak)$'`; do
     test -x "$prefix$file" && "$prefix$file"
   done

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/FC-5/kdebase.spec,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -r1.161 -r1.162
--- kdebase.spec	4 Apr 2006 09:54:44 -0000	1.161
+++ kdebase.spec	28 Apr 2006 14:50:52 -0000	1.162
@@ -20,7 +20,7 @@
 Summary: K Desktop Environment - core files
 Name: kdebase
 Version: 3.5.2
-Release: 0.2.fc5
+Release: 0.3.fc5
 Epoch: 6
 Url: http://www.kde.org
 Group: User Interface/Desktops
@@ -37,7 +37,7 @@
 Source7: mailsettings.cc
 
 Patch0: kde-libtool.patch
-Patch1: kdebase-3.5.2-redhat.patch
+Patch1: kdebase-3.5.2-1-redhat.patch
 Patch2: kdebase-3.3.92-vroot.patch
 Patch3: kdebase-3.x-shortcuts.patch
 Patch4: kdebase-3.2.0-keymap.patch
@@ -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
@@ -211,7 +212,6 @@
 install -m 755 mailsettings $RPM_BUILD_ROOT%{_bindir}
 
 # Fix up permissions on some things
-chmod 755 $RPM_BUILD_ROOT%{_bindir}/kcheckpass
 chmod 755 $RPM_BUILD_ROOT%{_bindir}/kdesud
 
 # install pam configuration file
@@ -380,6 +380,8 @@
 %dir %{_libdir}/mozilla
 %dir %{_libdir}/mozilla/plugins
 %{_bindir}/*
+%exclude %{_bindir}/kcheckpass
+%attr(4755,root,root) %{_bindir}/kcheckpass
 %{_libdir}/*.??*
 %{_libdir}/kde3/*
 %{_libdir}/kconf_update_bin
@@ -422,6 +424,12 @@
 %{_includedir}/kde/ksplash/*
 
 %changelog
+* Fri Apr 28 2006 Than Ngo <than at redhat.com> 6:3.5.2-0.3.fc5
+- fix #189790, kcheckpass cannot authenticate users using a LDAP directory
+- fix #189702, kwin crashes when switching windows with Alt-Tab
+- fix startkde to look in /usr and /etc/kde for env/ and shutdown/
+- update dbus patch
+
 * Tue Apr 04 2006 Than Ngo <than at redhat.com> 6:3.5.2-0.2.fc5
 - rebuilt
 


--- kdebase-3.5.2-redhat.patch DELETED ---




More information about the fedora-cvs-commits mailing list