Bug 406752 - Menu for "New Tab" button shown in incorrect location for non-first triggering
Summary: Menu for "New Tab" button shown in incorrect location for non-first triggering
Status: CONFIRMED
Alias: None
Product: konsole
Classification: Applications
Component: tabbar (show other bugs)
Version: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-22 03:38 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2020-12-21 00:00 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Showing Konsole new tab button behavior (560.15 KB, video/x-matroska)
2020-12-20 20:08 UTC, jbn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2019-04-22 03:38:12 UTC
Problem reproduced with master branch.
Problem introduced during last several weeks.
19.04.0 release supposedly unaffected.

After starting new Konsole process, when pressing and holding "New Tab" button for some seconds for the first time, the menu with list of profiles appears in correct location.
When pressing and holding this button again, this menu appears in incorrect location (moved to the left and below).

It is necessary to start new Konsole process to notice this small difference.
Comment 1 Nate Graham 2019-04-23 18:02:25 UTC
Hmm, I'm not able to reproduce with git master.
Comment 2 Christoph Feck 2019-04-23 18:21:31 UTC
I can confirm this, but I guessed this was caused by the Qt 5.12.3 update. Did you also update Qt? If not, it's really a Konsole regression.
Comment 3 Arfrever Frehtes Taifersar Arahesis 2019-04-23 19:59:42 UTC
I use Qt from branch 5.12 from around time of 5.12.3, however it is unrelated.

For testing, I have now installed Konsole 19.04.0 and this bug is not reproducible.
Comment 4 Arfrever Frehtes Taifersar Arahesis 2019-05-04 01:34:08 UTC
This problem was introduced in commit 4cddc420e319686956446da2724a27a672817ff1:

https://cgit.kde.org/konsole.git/commit/?id=4cddc420e319686956446da2724a27a672817ff1

commit 4cddc420e319686956446da2724a27a672817ff1
Author:     Tomaz Canabrava <tcanabrava@kde.org>
AuthorDate: 2019-03-28 09:27:15 -0400
Commit:     Kurt Hindenburg <kurt.hindenburg@gmail.com>
CommitDate: 2019-03-28 09:50:38 -0400

    Simplify TerminalDisplay code
    
    Reviewers: #konsole, hindenburg
    
    Reviewed By: #konsole, hindenburg
    
    Subscribers: hindenburg, konsole-devel
    
    Tags: #konsole
    
    Differential Revision: https://phabricator.kde.org/D20088
Comment 5 Arfrever Frehtes Taifersar Arahesis 2019-05-04 02:51:18 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #4)
> This problem was introduced in commit
> 4cddc420e319686956446da2724a27a672817ff1

I have been deceived by https://cgit.kde.org/konsole.git/log/?h=master showing commits from all branches (not only "master" branch) (while e.g. https://cgit.kde.org/konsole.git/log/?h=Applications/19.04 shows commits from only "Applications/19.04" branch).
Comment 6 Arfrever Frehtes Taifersar Arahesis 2019-05-04 02:53:40 UTC
This problem was introduced in commit 03a78c2a9f4248653e928c341bb4610c4aeea33b:

https://cgit.kde.org/konsole.git/commit/?id=03a78c2a9f4248653e928c341bb4610c4aeea33b

commit 03a78c2a9f4248653e928c341bb4610c4aeea33b (HEAD)
Author:     David Hallas <david@davidhallas.dk>
AuthorDate: 2019-03-28 08:55:18 -0400
Commit:     Kurt Hindenburg <kurt.hindenburg@gmail.com>
CommitDate: 2019-03-28 09:14:13 -0400

    Fixes minor memory leaks
    
    Summary:
    Fixes a few minor memory leaks found with address sanitizer.
    The newTabButton and closeTabButton was not passed a parent and is not
    deleted in the destructor of TabbedViewContainer which will cause them
    to be leaked when closing a tab. Instead pass the TabbedViewContainer as
    the parent.
    The same goes for the profileMenu, it was not passed a parent pointer at
    contruction and the setMenu function doesn't take ownership of it, so
    therefore it was also leaked.
    
    Test Plan:
    Compile konsole with address sanitizer.
    Open and close konsole.
    
    Reviewers: #konsole, hindenburg
    
    Reviewed By: #konsole, hindenburg
    
    Subscribers: hindenburg, konsole-devel
    
    Tags: #konsole
    
    Differential Revision: https://phabricator.kde.org/D19634
Comment 7 Christoph Feck 2020-05-20 19:49:38 UTC
Fixed with Qt 5.15.
Comment 8 Justin Zobel 2020-11-03 01:09:31 UTC
I've just tested this and the profile menu from the new tab popup only ever appears on my primary screen no matter where Konsole is (triple monitor setup).
Comment 9 jbn 2020-12-20 20:08:27 UTC
Created attachment 134238 [details]
Showing Konsole new tab button behavior
Comment 10 jbn 2020-12-20 20:11:02 UTC
In Konsole version 20.12.0 there appears to be no new tab button at all until a second tabs is added. I have no idea why 2 tabs are needed to see the button. I would have thought the new tab button should always be visible so that that button can be used to add a second tab.

I've added a video to show what I'm referring to.

System information:

Operating System: Debian GNU/Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.2
Kernel Version: 5.9.0-5-amd64
OS Type: 64-bit
Processors: 8 × AMD FX(tm)-8150 Eight-Core Processor
Memory: 31.3 GiB of RAM
Graphics Processor: NV106
Comment 11 Carlos Alves 2020-12-20 22:13:27 UTC
Settings->Tab Bar->Show->Always and check the "Show 'New Tab' button" (then Apply And Ok)

Seems to be this the problem.
Comment 12 jbn 2020-12-21 00:00:52 UTC
Great catch Carlos Alves, changing that setting to "always" does make the new tab button always appear and that is a setting that makes sense to me. The "never" setting also makes sense to me.

But there's a third setting ("when needed") which makes me think: what is "when needed" supposed to mean? How is "when needed" different than "always" in terms of rationale?

I don't understand how having two tabs makes the new tab button 'needed' but having one tab means the new tab button is 'not needed'.

Thanks again Carlos Alves.