Bug 223302

Summary: konsole does not clear lower parts of window properly after xrandr resizes without redraw in between
Product: [Applications] konsole Reporter: Sami Liedes <sami.liedes>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED WAITINGFORINFO    
Severity: normal CC: adaptee
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Sami Liedes 2010-01-18 16:50:17 UTC
Version:            (using KDE 4.3.4)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Architecture is amd64.

How to reproduce:
=================

1. Start konsole
2. Do something to get enough output that the entire konsole window is vertically filled (i.e. the cursor is on the last line of the konsole and there's non-blank output on lines before it; e.g. ls -la in your home directory until enough output)
3. Switch to a different virtual desktop. This seems to be significant. (or minimize konsole, that's sufficient too.)
4. Use xrandr on another konsole window to switch to a *lower* resolution. For example, xrandr -s 800x600 (use xrandr without options to list supported resolutions). Or use a gui tool to lower the resolution.
5. Use xrandr to switch back to the original resolution (on the same konsole you used to switch to lower resolution). Do NOT switch back to the original virtual desktop between steps 4 and 5.
6. Switch back to the desktop with the konsole window opened in step 1 (or bring minimized konsole back)

Result:
=======

The konsole window shows the output generated by e.g. ls -la in the bottom part, but the prompt is in the middle. Viz:

+-----------------------------
| output line 1          }
| output line 2          } the number of lines visible in 800x600
| output line 3          } (here 3)
| prompt$ [rest of line blank]
| output line 5
| output line 6
| ...
+------------------------------

where lines starting from 5 are ls -la output which would not have been visible in the lower resolution.

Furthermore, running the command "clear" results in the following:

+-----------------------------
| prompt$ [rest of line blank]
| 
| 
| 
| output line 5
| output line 6
| ...
+------------------------------

Expected results:
=================

Either

1a. Lines starting from 5 are blank after step 6

OR

1b. (arguably preferable, but probably quite a bit harder to implement) The konsole window after step 6 is as if no xrandr resizes had ever happened. I guess this would need not notifying Konsole of the resize at xrandr command time when it's not visible, but only when it becomes visible (here at step 6) iff its size has changed from what it was when it was previously visible (so here it would not get such a notification at all).
Comment 1 Jekyll Wu 2011-08-24 16:06:27 UTC
I tried the procedure with KDE-4.7.0. The actual result was the same as expectation 1a.

Could you check this with recent version?