Bug 406895

Summary: After session restoration, tab switching shortcuts don't work until Konsole is restarted once
Product: [Applications] konsole Reporter: Nate Graham <nate>
Component: generalAssignee: tcanabrava
Status: RESOLVED FIXED    
Severity: normal CC: johannes.hirte, oded
Priority: NOR    
Version: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: attachment-1851-0.html
attachment-29619-0.html
attachment-2799-0.html

Description Nate Graham 2019-04-25 17:03:16 UTC
Konsole from git master on Neon Dev Unstable


STEPS TO REPRODUCE
1. Open Konsole
2. Open two tabs
3. Restart the machine


OBSERVED RESULT
Konsole is restored at login, but the tab switching keyboard shortcuts no longer work; ctrl+PgUp inserts "5~" into the terminal window and ctrl+PgDn inserts ";5~".

After restarting Konsole, the shortcuts work again


EXPECTED RESULT
Tab switching shortcuts work upon session restoration without needing to restart Konsole first
Comment 1 Kurt Hindenburg 2019-04-26 00:41:39 UTC
It works if you change tabs and do some stuff.... so a restart is totally required.

I thought I put in a ticket already about getting CD printing on the screen before the shortcuts start working.
Comment 2 Oded Arbel 2019-05-07 09:52:18 UTC
I see the same issue - after a session restore tab switching keyboard shortcuts do not work, except CTRL+Tab.

Also, the tabs are only partially restored: the last tab is always active regardless of which tab was active when the session was saved and the last tab is also the only one with a relevant tab titles - all the other tabs have ":-" as their title (without the quotes), until you navigate to them (using the mouse or CTRL+Tab), at this point they load properly.

Also, unlike what Kurt said, for me at least - even after I activate all the tabs, the keyboard shortcuts do not work, so Konsole session restore is basically useless to me: I have to always close all Konsole windows after a login before I can continue to work.
Comment 3 tcanabrava 2019-05-07 10:06:07 UTC
Created attachment 119883 [details]
attachment-1851-0.html

believe it’s because of the three different ways konsole deals with session
creation. I’m really without time now to look so the earliest I can try to
fix the issue.
If you can help me a bit by analyzing the code I’d be really happy.


Em ter, 7 de mai de 2019 às 11:52, Oded Arbel <bugzilla_noreply@kde.org>
escreveu:

> https://bugs.kde.org/show_bug.cgi?id=406895
>
> Oded Arbel <oded@geek.co.il> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |oded@geek.co.il
>
> --- Comment #2 from Oded Arbel <oded@geek.co.il> ---
> I see the same issue - after a session restore tab switching keyboard
> shortcuts
> do not work, except CTRL+Tab.
>
> Also, the tabs are only partially restored: the last tab is always active
> regardless of which tab was active when the session was saved and the last
> tab
> is also the only one with a relevant tab titles - all the other tabs have
> ":-"
> as their title (without the quotes), until you navigate to them (using the
> mouse or CTRL+Tab), at this point they load properly.
>
> Also, unlike what Kurt said, for me at least - even after I activate all
> the
> tabs, the keyboard shortcuts do not work, so Konsole session restore is
> basically useless to me: I have to always close all Konsole windows after a
> login before I can continue to work.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 4 Kurt Hindenburg 2019-05-11 14:16:13 UTC
Git commit cb05664071e72cacb3e6b5c3b68e7bad7bd71f6c by Kurt Hindenburg, on behalf of Tomaz Canabrava.
Committed on 11/05/2019 at 14:16.
Pushed by hindenburg into branch 'master'.

Toggle all actions when a session restore happens

Summary:
Fixes session restore actions for me.

Reviewers: ngraham, hindenburg, #konsole

Reviewed By: ngraham

Subscribers: konsole-devel

Tags: #konsole

Differential Revision: https://phabricator.kde.org/D21118

M  +28   -32   src/ViewManager.cpp
M  +1    -1    src/ViewManager.h
M  +5    -1    src/main.cpp

https://commits.kde.org/konsole/cb05664071e72cacb3e6b5c3b68e7bad7bd71f6c
Comment 5 Johannes Hirte 2019-05-12 21:35:45 UTC
This is only half of the fix. When closing the plasma session and reopening, all tabs except one are still showing ":-" as their title. Additionally those tabs are losing their path where they were in filesystem. If the tabs are activated, the path and title are restored. If not, and the plasma session is closed again, the path is lost after reopening a new session. When the tabs are activated, the path is located in the home directory of the user.
Comment 6 tcanabrava 2019-05-13 05:21:40 UTC
Created attachment 120028 [details]
attachment-29619-0.html

This is a different bug, unrelated to shortcuts

Em dom, 12 de mai de 2019 às 23:35, Johannes Hirte <bugzilla_noreply@kde.org>
escreveu:

> https://bugs.kde.org/show_bug.cgi?id=406895
>
> Johannes Hirte <johannes.hirte@datenkhaos.de> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>      Ever confirmed|0                           |1
>          Resolution|FIXED                       |---
>              Status|RESOLVED                    |REOPENED
>                  CC|
> |johannes.hirte@datenkhaos.d
>                    |                            |e
>
> --- Comment #5 from Johannes Hirte <johannes.hirte@datenkhaos.de> ---
> This is only half of the fix. When closing the plasma session and
> reopening,
> all tabs except one are still showing ":-" as their title. Additionally
> those
> tabs are losing their path where they were in filesystem. If the tabs are
> activated, the path and title are restored. If not, and the plasma session
> is
> closed again, the path is lost after reopening a new session. When the
> tabs are
> activated, the path is located in the home directory of the user.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 7 Johannes Hirte 2019-05-13 08:53:53 UTC
(In reply to tcanabrava from comment #6)
> Created attachment 120028 [details]
> attachment-29619-0.html
> 
> This is a different bug, unrelated to shortcuts
> 

Is there already a bugreport or should I open a new one?

By the way, the first bad commit is:
6e8153a78e3c63e514a6ecb62f6c9b4b504e7eb7
Author: Tomaz Canabrava <tcanabrava@kde.org>
Date:   Tue Mar 26 21:33:09 2019 -0400

    Multiple Splits per Tab

Since this commit, konsole crash on logout. The commit that fixed the crash is:

commit 9680e1f5f1d55776f078448d62deb33883f45dcc
Author: Thomas Surrel <thomas.surrel@protonmail.com>
Date:   Fri Apr 26 09:36:38 2019 -0400

    Fix New tab behavior


Now there is only the described wrong tab behaviour.
Comment 8 tcanabrava 2019-05-13 09:06:53 UTC
Created attachment 120033 [details]
attachment-2799-0.html

yes, and I'm trying to solve it today, just that this bug is unrelated to
the bug you reopened (this one is about wrong shortcuts, yours is about tab
mismatch)

On Mon, May 13, 2019 at 10:54 AM Johannes Hirte <bugzilla_noreply@kde.org>
wrote:

> https://bugs.kde.org/show_bug.cgi?id=406895
>
> --- Comment #7 from Johannes Hirte <johannes.hirte@datenkhaos.de> ---
> (In reply to tcanabrava from comment #6)
> > Created attachment 120028 [details]
> > attachment-29619-0.html
> >
> > This is a different bug, unrelated to shortcuts
> >
>
> Is there already a bugreport or should I open a new one?
>
> By the way, the first bad commit is:
> 6e8153a78e3c63e514a6ecb62f6c9b4b504e7eb7
> Author: Tomaz Canabrava <tcanabrava@kde.org>
> Date:   Tue Mar 26 21:33:09 2019 -0400
>
>     Multiple Splits per Tab
>
> Since this commit, konsole crash on logout. The commit that fixed the
> crash is:
>
> commit 9680e1f5f1d55776f078448d62deb33883f45dcc
> Author: Thomas Surrel <thomas.surrel@protonmail.com>
> Date:   Fri Apr 26 09:36:38 2019 -0400
>
>     Fix New tab behavior
>
>
> Now there is only the described wrong tab behaviour.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 9 Nate Graham 2019-05-13 13:33:20 UTC
Cool, let's use this bug to track only the original issue then.