Bug 164099 - Konsole blanks on tab re-order
Summary: Konsole blanks on tab re-order
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
: 169439 186122 189068 226785 237799 238052 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-06-14 21:34 UTC by David Benjamin
Modified: 2012-04-09 19:24 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.3


Attachments
Fix zsh blanking (514 bytes, patch)
2012-04-09 10:16 UTC, Franz Trischberger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Benjamin 2008-06-14 21:34:32 UTC
Version:           2.1 (using Devel)
Installed from:    Compiled sources
OS:                Linux

Steps to Reproduce:
1. Run Konsole.
2. Open a new tab.
3. Drag-and-drop to switch order of tabs.

Result: terminal view goes black until mouse or keyboard input.
Comment 1 Robert Knight 2008-06-14 21:58:34 UTC
Confirmed.  
Comment 2 Kurt Hindenburg 2008-10-04 19:14:48 UTC
*** Bug 169439 has been marked as a duplicate of this bug. ***
Comment 3 Kurt Hindenburg 2009-03-04 18:04:01 UTC
*** Bug 186122 has been marked as a duplicate of this bug. ***
Comment 4 Dario Andres 2009-04-07 22:08:22 UTC
*** Bug 189068 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2010-02-24 06:22:41 UTC
*** Bug 226785 has been marked as a duplicate of this bug. ***
Comment 6 Andreas K. Huettel 2010-04-11 23:22:11 UTC
Confirmed with konsole from KDE 4.4.2 (Gentoo Linux)
Comment 7 Yörn Jünger 2010-05-11 16:24:05 UTC
Confirmed with: (konsole -v)
Qt: 4.6.2
KDE Development Platform: 4.4.3 (KDE 4.4.3)
Konsole: 2.4.3
Comment 8 Kurt Hindenburg 2010-05-17 18:04:15 UTC
*** Bug 237799 has been marked as a duplicate of this bug. ***
Comment 9 Kurt Hindenburg 2010-05-18 16:59:55 UTC
*** Bug 238052 has been marked as a duplicate of this bug. ***
Comment 10 Kurt Hindenburg 2010-05-31 04:30:14 UTC
This patch appears to fix it.  Trunk if frozen for 4.5 and I'm not sure there will be a 4.4.5 so I can't commit it.

Index: ViewManager.cpp
===================================================================
--- ViewManager.cpp	(revision 1129498)
+++ ViewManager.cpp	(working copy)
@@ -663,6 +663,7 @@
         return;
 
     createView(controller->session(),container,index);
+    controller->session()->refresh();
     moved = true;
 }
 void ViewManager::setNavigationMethod(NavigationMethod method)
Comment 11 Kurt Hindenburg 2010-06-01 00:17:56 UTC
SVN commit 1133014 by hindenburg:

Refresh the screen after the user manually drag-n-drops a tab.

I will forward port to 4.5.1 when that branch is open.

CCBUG: 164099


 M  +1 -0      ViewManager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1133014
Comment 12 Kurt Hindenburg 2010-06-01 01:42:32 UTC
SVN commit 1133036 by hindenburg:

Refresh the screen after the user manually drag-n-drops a tab.

BUG: 164099


 M  +1 -0      ViewManager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1133036
Comment 13 Alex Merry 2010-11-28 21:58:51 UTC
I still get this with trunk, but it happens erratically.  Sometimes it will refresh, and sometimes it won't.  The blanks happen especially with zsh (I can't seem to get it to occur when vim is running in the tab, however).
Comment 14 Franz Trischberger 2012-04-09 10:07:50 UTC
(In reply to comment #13)
> The blanks happen especially with zsh
Can confirm this. Using zsh -> blank. using bash -> no blank.
But the blanking only occurs when dragging tabs with the mouse. Using Strg+Shift+Right/Left works fine.

It seems zsh won't do any update, if the PTY size is updated too fast.
In Session::refresh() I added a "usleep(1);" between those two size changes, and the blanking does not occur anymore.
Comment 15 Franz Trischberger 2012-04-09 10:16:33 UTC
Created attachment 70255 [details]
Fix zsh blanking
Comment 16 Jekyll Wu 2012-04-09 11:46:34 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > The blanks happen especially with zsh
> Can confirm this. Using zsh -> blank. using bash -> no blank.
> But the blanking only occurs when dragging tabs with the mouse. Using
> Strg+Shift+Right/Left works fine.
> 
> It seems zsh won't do any update, if the PTY size is updated too fast.
> In Session::refresh() I added a "usleep(1);" between those two size changes,
> and the blanking does not occur anymore.

Hi Franz :

Thanks for your research and patch. I think you are right. Actually it also fixes bug 250212 where Session::refresh() is also called. 

Will commit the patch shortly after.

Regards
Jekyll
Comment 17 Jekyll Wu 2012-04-09 11:50:12 UTC
Git commit ccfc3f859c5695cc08895570efd0831db0d3b9b0 by Jekyll Wu.
Committed on 09/04/2012 at 13:09.
Pushed by jekyllwu into branch 'master'.

Introduce small delay to avoid updating Pty size too quickly

Some terminal application does not update its display when Pty size
changes quickly in a row.  Zsh seems a typical example.

Thanks to Franz Fellner<alpine.art.de@googlemail.com> for the research
and solution.
Related: bug 250212
FIXED-IN: 4.8.3

M  +2    -0    src/Session.cpp

http://commits.kde.org/konsole/ccfc3f859c5695cc08895570efd0831db0d3b9b0
Comment 18 Jekyll Wu 2012-04-09 11:53:26 UTC
Git commit aea2091d1cc226a155331fa3a1f176ff005fc690 by Jekyll Wu.
Committed on 09/04/2012 at 13:09.
Pushed by jekyllwu into branch 'KDE/4.8'.

Introduce small delay to avoid updating Pty size too quickly

Some terminal application does not update its display when Pty size
changes quickly in a row.  Zsh seems a typical example.

Thanks to Franz Fellner<alpine.art.de@googlemail.com> for the research
and solution.
Related: bug 250212
FIXED-IN: 4.8.3
(cherry picked from commit ccfc3f859c5695cc08895570efd0831db0d3b9b0)

M  +2    -0    src/Session.cpp

http://commits.kde.org/konsole/aea2091d1cc226a155331fa3a1f176ff005fc690
Comment 19 Franz Trischberger 2012-04-09 13:28:03 UTC
According to this comment:
https://bugs.gentoo.org/show_bug.cgi?id=411327#c7
delay of 10 usecs did not solve the issue for screen, but increasing the value to 100 did.
That's what I was afraid off: It is no real solution but a workaround, result depending on the user's system :/ Nevertheless, even 100 usecs is short enough, so no visible delay will occur.
Comment 20 Jekyll Wu 2012-04-09 15:22:02 UTC
Thanks for the reminder. I'll increase that delay to a bigger value.

As the existing comment within Session::refresh() says, that method itself is more like a hack than a nice solution.