Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 357945 - kde-base/konsole-4.6.1: LINES incorrect for new window size if menu shows
Summary: kde-base/konsole-4.6.1: LINES incorrect for new window size if menu shows
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 16:26 UTC by Martin von Gagern
Modified: 2011-06-19 00:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (kde-base:konsole-4.6.1.emerge--info,6.53 KB, text/plain)
2011-03-08 16:26 UTC, Martin von Gagern
Details
Flag to emit imageSizeChanged once (kde176902.patch,2.32 KB, patch)
2011-04-06 07:57 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2011-03-08 16:26:23 UTC
Created attachment 265165 [details]
emerge --info

When opening a new window in konsole (either forking an existing process or actually starting a new process using --nofork), the bash instance in that new window will start with an incorrect idea of the terminal size: the LINES variable will be set to 24 even if the terminal is actually at 40 columns. Calling "resize" will give the correct size. The issue only occurs when the menu bar ish showing, though.

 1. Start konsole
 2. Ctrl+Shift+M to hide menu bar, if it is showing
 3. Ctrl+Shift+N to open new instance (with menu as well)
 4. $ echo $LINES
    41
 5. $ resize | grep ^LINES
    LINES=41;
 6. Close new window, going back to the one from 1.
 7. Ctrl+Shift+M to show menu bar
 8. Ctrl+Shift+N to open new instance (without menu this time)
 9. $ echo $LINES
    24
10. $ resize | grep ^LINES
    LINES=40;

Step 9 is where things are not as they should be, the rest is for comparison. Unfortunate side effects is that e.g. less will occupy only part of the screen, which in turn can lead to confusion when files appear shorter than they are.
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2011-04-05 22:44:06 UTC
Can't do much about this here... could you please file a bug at bugs.kde.org and link to it in the "See Also" field?
Comment 2 Martin von Gagern 2011-04-06 07:55:54 UTC
Found an upstream bug report: https://bugs.kde.org/show_bug.cgi?id=176902
Comment 3 Martin von Gagern 2011-04-06 07:57:53 UTC
Created attachment 268679 [details, diff]
Flag to emit imageSizeChanged once

With information provided in the upstream report, I was able to create this patch, which I attached upstream as well. Simply drop it in /etc/portage/patches/kde-base/konsole/ if you are a user, or include it in a revbumped ebuild if you are a maintainer.
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2011-06-19 00:03:03 UTC
Patch looks good, thanks! Added for 4.6.4-r1 and later.