Bug 107197

Summary: Konsole unnecessarily redraws the terminal window when trying to switch sessions with only one session open. This results in flicker.
Product: [Applications] konsole Reporter: Rudo Thomas <rudo>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: minor    
Priority: LO    
Version: 1.5.1   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: All   
Latest Commit: Version Fixed In:
Attachments: This patch solves the problem described.

Description Rudo Thomas 2005-06-11 01:08:48 UTC
Version:            (using KDE KDE 3.4.1)
Installed from:    Gentoo Packages

When using shift-right (or shift-left) and only one session is open, konsole redraws the window which results in flicker.

Run konsole, open two tabs with Midnight Commander (for example) and close on of them. Now try to use shift-right...

The patch I will post immediately trivially corrects this behaviour.
Comment 1 Rudo Thomas 2005-06-11 01:10:44 UTC
Created attachment 11397 [details]
This patch solves the problem described.

Please commit.
Comment 2 Kurt Hindenburg 2006-06-11 02:20:12 UTC
SVN commit 550095 by hindenburg:

Upon Prev/Next session, only activate new session when session.count > 1.

Will forward port when I get trunk/kdebase compiling again...

BUG: 107197


 M  +4 -2      konsole.cpp  


--- branches/KDE/3.5/kdebase/konsole/konsole/konsole.cpp #550094:550095
@@ -3064,7 +3064,8 @@
 {
   sessions.find(se); sessions.prev();
   if (!sessions.current()) sessions.last();
-  if (sessions.current()) activateSession(sessions.current());
+  if (sessions.current() && sessions.count() > 1)
+    activateSession(sessions.current());
 }
 
 /*! Cycle to next session (if any) */
@@ -3073,7 +3074,8 @@
 {
   sessions.find(se); sessions.next();
   if (!sessions.current()) sessions.first();
-  if (sessions.current()) activateSession(sessions.current());
+  if (sessions.current() && sessions.count() > 1)
+    activateSession(sessions.current());
 }
 
 void Konsole::slotMovedTab(int from, int to)