Bug 437791 - konsole window 1 line height when there is no konsolesrc
Summary: konsole window 1 line height when there is no konsolesrc
Status: REOPENED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 22.08.3
Platform: Arch Linux Linux
: VHI normal
Target Milestone: ---
Assignee: Konsole Developer
URL: https://invent.kde.org/utilities/kons...
Keywords: regression
: 437887 449087 451465 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-05-28 16:34 UTC by Rex Dieter
Modified: 2022-11-05 12:53 UTC (History)
17 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.08


Attachments
screenshot showing 1 line high konsole window (1.77 MB, image/png)
2021-05-28 16:34 UTC, Rex Dieter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rex Dieter 2021-05-28 16:34:37 UTC
Created attachment 138845 [details]
screenshot showing 1 line high konsole window

For new user with no existing konsolerc, appears the first time running it produces a window 1 line high.  For me, the window is 59 lines wide.

Also reported by downstream fedora autoqa, I'll attach a screenshot.
Comment 1 nucleo 2021-05-28 19:00:39 UTC
I also see this with konsole 21.04.1 started after removing konsolerc.
Comment 2 Kurt Hindenburg 2021-05-28 20:00:27 UTC
This is the commit but it is part of the adding of toolbars

https://invent.kde.org/utilities/konsole/-/commit/36ff810f12b795deff7675027ba871c8406a1893
Comment 3 Patrick Silva 2021-06-01 01:06:27 UTC
*** Bug 437887 has been marked as a duplicate of this bug. ***
Comment 4 Rex Dieter 2021-06-02 18:15:50 UTC
I can confirm reverting the aforementioned commit make this issue go away.

I'll likely do that in fedora konsole packaging for now, until we have something better to go on.
Comment 5 Nate Graham 2021-06-02 18:52:38 UTC
JFYI this apparently pre-existing bug was triggered by the change in https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/53. Reverting that should also fix it (though it will regress initial window sizes for other KDE apps).

I guess it's worth fixing here, so maybe that can provide a clue as to why it's happening?
Comment 6 Eddie J Carswell II 2021-06-05 04:35:37 UTC
Rex Dieter, reverting only the commit in Comment 3 puts konsole into a state where the new toolbar exists, but the UI options to configure it are missing (e.g. no menu option to hide it). Perhaps reverting the commit in Comment 5 would be a better approach?
Comment 7 Rex Dieter 2021-06-09 15:33:01 UTC
Nate suggests reverting the other could break other apps, and I don't like the sound of that either.
Comment 8 Fabian Vogt 2021-06-21 21:14:13 UTC
(In reply to Rex Dieter from comment #7)
> Nate suggests reverting the other could break other apps, and I don't like
> the sound of that either.

It doesn't really break them, it just changes the default size to an older default FWICT.
Comment 9 Andrey 2021-06-30 12:52:38 UTC
The fix works for me, but I'm still doubt if it's correct.
So please test:
https://invent.kde.org/utilities/konsole/-/merge_requests/424
Comment 10 tcanabrava 2021-06-30 13:35:14 UTC
Git commit b43548b22c4844db95c628a508199518bd3f4350 by Tomaz Canabrava.
Committed on 30/06/2021 at 12:18.
Pushed by butirsky into branch 'master'.

Prevent 1px sizehint when there is no preconfiguration

M  +1    -1    src/MainWindow.cpp

https://invent.kde.org/utilities/konsole/commit/b43548b22c4844db95c628a508199518bd3f4350
Comment 11 Kurt Hindenburg 2021-08-02 15:28:47 UTC
Git commit bb7dd804b21d99c380886f6536b212a0ce03b701 by Kurt Hindenburg, on behalf of Ahmad Samir.
Committed on 02/08/2021 at 15:28.
Pushed by hindenburg into branch 'master'.

Fix MainWindow size when there is no saved size

The very first time a user runs Konsole, where is no konsolerc file in $HOME,
there is no saved size to restore, instead use the sizeHint(), which ideally
will be the size set in the default profile (based on lines/columns setting).

M  +15   -6    src/MainWindow.cpp
M  +1    -0    src/MainWindow.h

https://invent.kde.org/utilities/konsole/commit/bb7dd804b21d99c380886f6536b212a0ce03b701
Comment 12 Fabian Vogt 2021-08-03 16:03:35 UTC
(In reply to Kurt Hindenburg from comment #11)
> Git commit bb7dd804b21d99c380886f6536b212a0ce03b701 by Kurt Hindenburg, on
> behalf of Ahmad Samir.
> Committed on 02/08/2021 at 15:28.
> Pushed by hindenburg into branch 'master'.
> 
> Fix MainWindow size when there is no saved size
> 
> The very first time a user runs Konsole, where is no konsolerc file in $HOME,
> there is no saved size to restore, instead use the sizeHint(), which ideally
> will be the size set in the default profile (based on lines/columns setting).
> 
> M  +15   -6    src/MainWindow.cpp
> M  +1    -0    src/MainWindow.h
> 
> https://invent.kde.org/utilities/konsole/commit/
> bb7dd804b21d99c380886f6536b212a0ce03b701

With this, konsole opens way too wide (220x28) on Wayland and on X11 it's
still 93x1. So unfortunately it's not fixed FWICT.
Comment 13 Kurt Hindenburg 2021-08-03 16:43:02 UTC
Do you have the toolbars visible?  The text causes the width to be too wide.  Either disable toolbars or change it to icon only.
Comment 14 Fabian Vogt 2021-08-03 19:55:39 UTC
The X11/Wayland issue seems to have a different cause. If I start "konsole -platform wayland" first and then "konsole -platform xcb", the former has the big window size and the latter is a single line in height. If I start "konsole -platform xcb" first, then it looks good, but "konsole -platform wayland" doesn't. It's might be caused by the monitor specific window size in konsolerc.

(In reply to Kurt Hindenburg from comment #13)
> Do you have the toolbars visible?  The text causes the width to be too wide.
> Either disable toolbars or change it to icon only.

Indeed, I'm using konsole defaults. What's the best way to disable the toolbars by defaults system (or distro) wide?
Comment 15 Ahmad Samir 2021-08-17 15:02:38 UTC
Git commit c78edfbac49852cec40efd5cbe73c341bc06c5ab by Ahmad Samir.
Committed on 17/08/2021 at 15:02.
Pushed by ahmadsamir into branch 'release/21.08'.

Fix MainWindow size when there is no saved size

The very first time a user runs Konsole, where is no konsolerc file in $HOME,
there is no saved size to restore, instead use the sizeHint(), which ideally
will be the size set in the default profile (based on lines/columns setting).

M  +15   -6    src/MainWindow.cpp
M  +1    -0    src/MainWindow.h

https://invent.kde.org/utilities/konsole/commit/c78edfbac49852cec40efd5cbe73c341bc06c5ab
Comment 16 Nate Graham 2022-01-24 21:52:40 UTC
*** Bug 449087 has been marked as a duplicate of this bug. ***
Comment 17 Nate Graham 2022-03-26 15:19:52 UTC
*** Bug 451465 has been marked as a duplicate of this bug. ***
Comment 18 nyanpasu64 2022-08-11 11:54:46 UTC
I keep getting a minimum-size Konsole window after swapping between GPU drivers, GPUs, and switching which cable type I use to connect to each of my 2 displays. The bug might have something to do with how .config/konsolerc's [MainWindow] section stores window dimensions separately for each display, and perhaps for never-seen-before displays it defaults to a 0x0 window.
Comment 19 5ilona6wj 2022-11-05 12:53:14 UTC
The same is happening with konsole 22.08.3