Summary: | Konsole manages its own window position even when forcing KWin to manage window placement | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Qu Wenruo <quwenruo.btrfs> |
Component: | general | Assignee: | Kurt Hindenburg <khindenburg> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | ahabig, dave, frederick888, info, nate, rauchwolke |
Priority: | NOR | Keywords: | regression |
Version: | master | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=427681 https://bugs.kde.org/show_bug.cgi?id=427867 |
||
Latest Commit: | https://invent.kde.org/utilities/konsole/commit/d22236c3615ac2189c0254d71614eda316130abd | Version Fixed In: | 20.12.2 |
Sentry Crash Report: | |||
Attachments: |
video with bug
video showing the bug video showing the bug resetting the config only works until konsole is closed again |
Description
Qu Wenruo
2020-10-13 00:37:33 UTC
*** Bug 427621 has been marked as a duplicate of this bug. *** this bug report fixed the placement behavior of apps that use kxmlgui https://bugs.kde.org/show_bug.cgi?id=426725 but it seems konsole uses it's own placement which can't get solved by kxmlgui Does it mean we need to disable the "remember the last window position" option in koncole? you can only disable it globally, just follow this https://bugs.kde.org/show_bug.cgi?id=426725#c6 for the work around (In reply to Qu Wenruo from comment #3) > Does it mean we need to disable the "remember the last window position" > option in koncole? Ah, Konsole does indeed have its own code for this! That's definitely a part of the problem. I'm investigating. Yes, you can unset that for now. Where can i find the option "remember the last window position" in konsole? Settings Window > General page > "Remember window size". The bug is that position remembering was added to the same thing that does size restoring. So Konsole needs to change the text to be accurate, or else manually call only the size restoring code, or something else. I'm on it. (In reply to Jim Jones from comment #4) > you can only disable it globally, just follow this > https://bugs.kde.org/show_bug.cgi?id=426725#c6 for the work around Thanks a lot! This really solved the problem! Created attachment 132408 [details]
video with bug
hi, after update to plasma 5.20/ kf 5.75 i have same problem. I have disabled "Remember window size" for own konsole windows's size. This is fixed now by the fix for Bug 426725. When an app is open and you launch a new instance, the new instances now follows the window placement mode. If you want apps to *never* remember their window positions and always follow the window placement mode, you can uncheck "Allow KDE apps to remember the positions of their windows" in System Settings > Window Behavior > Advanced *** This bug has been marked as a duplicate of bug 426725 *** https://bugs.kde.org/show_bug.cgi?id=427621 got closed as a duplicate of this bug and this bug was closed as a dup of this bug https://bugs.kde.org/show_bug.cgi?id=426725. Although Nate mentioned in 426725 to create a new bug, https://bugs.kde.org/show_bug.cgi?id=426725#c24 Please reopen this bug, I'm on KDE Plasma Version: 5.20.0 KDE Frameworks Version: 5.77.0 Qt Version: 5.15.2 and the bug in konsole still exists Btw I created https://bugs.kde.org/show_bug.cgi?id=427621 because you said so in https://bugs.kde.org/show_bug.cgi?id=426725#c32 correction i'm on: KDE Plasma Version: 5.20.4 KDE Frameworks Version: 5.77 Qt Version: 5.15.2 konsole window placement still unfixed I'm currently on: KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2 for they who have problems read above comments: If you want apps to *never* remember their window positions and always follow the window placement mode, you can uncheck "Allow KDE apps to remember the positions of their windows" in System Settings > Window Behavior > Advanced That fix the Konsole problem too... It works (tested) for KDE Plasma Version 5.20.5, KDE Frameworks Version: 5.78.0, Qt Version: 5.15.2 too. This is a workaround, the bug is still unfixed. reopened, bug still unfixed, why does this bug report always get closed when a core application only works correctly when the feature is deactived? I assigned the ticket to the konsole maintainer That's not a workaround, it's the canonical way to have KWin manage all window placement rather than ever leaving it up to the app. Is that what you're after, or do you want for just Konsole to be managed exclusively by KWin and for other apps to manage their own positioning? when i enable the option, all konsole windows get place at the same position ontop of each other, this is clearly a bug imo as it works normally for dolphin for example, the last window gets placed at the stored position the other windows opened afterwards get placed based on the kwin setting you already mentioned this in another bug - https://bugs.kde.org/show_bug.cgi?id=426725#c24 and i also created a separate bug for konsole (as you stated) which also got closed https://bugs.kde.org/show_bug.cgi?id=427621 Ah ok, so the bug here is that when you use that setting, Konsole manages its own position anyway. Can confirm. Will work on it. Problem is probably in or around line 68 of MainWindow.cpp Found the bug. MR incoming. A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/331 Git commit 8fa1c4b508b080f958a16d52a1e03bcf9e7e4495 by Nate Graham. Committed on 20/01/2021 at 05:15. Pushed by hindenburg into branch 'release/20.12'. Fix "Remember window size" not working when unchecked When this feature is turned off, it deletes some keys from Konsole's config file. However this broke recently for two reasons: 1. The key names changed a few Frameworks releases ago 2. There are new keys that need to be deleted or else position gets restored too This commit fixes that bug by updating the condition to delete all the config keys required to make the off state for this feature work again. FIXED-IN: 20.12.2 M +16 -3 src/MainWindow.cpp https://invent.kde.org/utilities/konsole/commit/8fa1c4b508b080f958a16d52a1e03bcf9e7e4495 Git commit d22236c3615ac2189c0254d71614eda316130abd by Kurt Hindenburg, on behalf of Nate Graham. Committed on 20/01/2021 at 15:25. Pushed by hindenburg into branch 'master'. Fix "Remember window size" not working when unchecked When this feature is turned off, it deletes some keys from Konsole's config file. However this broke recently for two reasons: 1. The key names changed a few Frameworks releases ago 2. There are new keys that need to be deleted or else position gets restored too This commit fixes that bug by updating the condition to delete all the config keys required to make the off state for this feature work again. FIXED-IN: 20.12.2 (cherry picked from commit 8fa1c4b508b080f958a16d52a1e03bcf9e7e4495) M +16 -3 src/MainWindow.cpp https://invent.kde.org/utilities/konsole/commit/d22236c3615ac2189c0254d71614eda316130abd (In reply to Kurt Hindenburg from comment #28) > Git commit d22236c3615ac2189c0254d71614eda316130abd by Kurt Hindenburg, on > behalf of Nate Graham. > Committed on 20/01/2021 at 15:25. > Pushed by hindenburg into branch 'master'. > > Fix "Remember window size" not working when unchecked > > When this feature is turned off, it deletes some keys from Konsole's > config file. However this broke recently for two reasons: > > 1. The key names changed a few Frameworks releases ago > 2. There are new keys that need to be deleted or else position gets > restored too > > This commit fixes that bug by updating the condition to delete all the > config keys required to make the off state for this feature work again. > FIXED-IN: 20.12.2 > (cherry picked from commit 8fa1c4b508b080f958a16d52a1e03bcf9e7e4495) > > M +16 -3 src/MainWindow.cpp > > https://invent.kde.org/utilities/konsole/commit/ > d22236c3615ac2189c0254d71614eda316130abd When I apply this patch and set "Allow KDE apps to rememeber ..." in the settings and set "Remember window size" in the konsole settings, konsole window still open ontop of each other aka overlap each other When i disable "Remember window size" in the konsole settings and let "Allow KDE apps to rememeber ..." enabled in the settings, a new konsole window always opens in the top left corner and it doesn't seem to remember it's position at all. Do i have to apply aother patch too to make it work correctly? did i do something wrong? btw dolphin works correctly, it rembers it's window position and places the first window created after the last got closed at the same position and all following windows are handled by kwin To make i more easy to read: "Allow KDE apps to rememeber ..." + "Remember window size": restores the windows the gets opened after the last got closed at the same position, but following windows get opened at the same position aka overlap "Allow KDE apps to rememeber ..." + ( "Remember window size" disabled ): doesn't store the last position but doesn't create following windows at the same position aka kwin handles the following window (In reply to Jim Jones from comment #31) > To make i more easy to read: > > "Allow KDE apps to rememeber ..." + "Remember window size": > restores the windows the gets opened after the last got closed at the same > position, but following windows get opened at the same position aka overlap What window placement strategy is KWin using? "Minimal overlapping" or something else? > "Allow KDE apps to rememeber ..." + ( "Remember window size" disabled ): > doesn't store the last position but doesn't create following windows at the > same position aka kwin handles the following window This sounds like the intended behavior, no? (In reply to Nate Graham from comment #32) > (In reply to Jim Jones from comment #31) > > To make i more easy to read: > > > > "Allow KDE apps to rememeber ..." + "Remember window size": > > restores the windows the gets opened after the last got closed at the same > > position, but following windows get opened at the same position aka overlap > What window placement strategy is KWin using? "Minimal overlapping" or > something else? "Minimal overlapping" > > "Allow KDE apps to rememeber ..." + ( "Remember window size" disabled ): > > doesn't store the last position but doesn't create following windows at the > > same position aka kwin handles the following window > This sounds like the intended behavior, no? The window position of the last closed window doesn't seem to get honored/stored and the first window after the last closed window, always gets created at the same position aka last window gets closed at position "A" and the first window afterwards always gets opened at position "B" doesn't matter where the last window got closed I'm afraid I've read your last few comments several times and I'm still confused, sorry. :( Is there any chance you could attach a screen recording that demonstrates the issue? "Allow KDE apps to rememeber ..." enabled + "Remember window size" enabled: 1) last konsole window is at position A when it gets closed 2) the next window that gets opened is opened at position A everything is correct up to this point but 3) following instances that get opened afterwards get also opened at position A aka overlap the last opened window to 100% instead of handling over the window to kwin (which would palce them at a different point) "Allow KDE apps to rememeber ..." enabled + "Remember window size" disabled: 1) last konsole window is at position A when it gets closed 2) the position isn't stored on exit, following windows always get opened at the same position B 3) but the second instance is handed over to kwin aka they don't overlap like in the case before is the description better now? "Allow KDE apps to rememeber ..." enabled + "Remember window size" enabled: CORRECT: stores the position correctly on exit and opens the first instance at the stored position ERROR: doesn't hand over the instances after the first instance to kwin aka the following instances overlap each other as they get also opened at the same position "Allow KDE apps to rememeber ..." enabled + "Remember window size" disabled: ERROR: doesn't store the position on exit and always opens the first instance at the same position CORRECT: the instances that gets open afterwards get handed over to kwin Thanks. I still cannot reproduce that. :( That's why I wanted a screen recording. Sometimes a video reveals extra information that you didn't think to report because it didn't seem unusual to you, because you've set it that way or been living with it for years. Created attachment 135437 [details]
video showing the bug
Created attachment 135438 [details]
video showing the bug
deleting all konsole related config files with # rm -rf ./.config/konsolerc ./konsole ./.local/share/konsole fixes the bug for a short time but after opening and closing konsole a few times, the same behavior is back again Created attachment 135439 [details]
resetting the config only works until konsole is closed again
Thanks. I wonder if there is a chance that this will be fixed accidentally by the fix for Bug 430521. There were a few more corner cases with this stuff that I fixed in that bug. It should be released in a few days, with Frameworks 5.79. Could you test again with that once it's out? If it's still broken after that, then I am well and truly stumped. :( I'm now on 5.79 framework and the bug is still there. But I'm still on plasma 5.20, maybe 5.21 fixes the bug? Enabling the option "Run all Konsole windows in a single process" in konsole fixes the bug for me and windows don't overlap each other after this option is enabled, disabling the option leads to the same broken behavior. the only bug that still exists: this command still places two windows on top of each other for i in {1..2} ; do ( konsole & ) ; done disabling "Allow KDE apps to remember the position of their own window", places them at different positions aka they don't overlap each other to 100% btw the same happens for dolphin too for i in {1..2} ; do ( dolphin & ) ; done now both dolphin windows overlap each other to 100% aka get placed at the same positon ping i can reproduce with that command but I have no idea what the cause might be. This has been bugging me for a while, but finally started searching around bug reports to see. plasma version 5.22.4, konsole5 version 21.04.2 (in Fedora 34) Same behavior as described here towards the end of this thread: selecting "run all konsole instances in a single process" lets the placement do the "minimal overlapping" I've asked of kWin, but without that they all end up stacked in one place. Which might even be a fine workaround, we'll see if this causes problems for me long term. As for a why: sounds like a race condition in konsole writing its state out for future use that's triggered by having multiple processes trying to do it. A wild guess: is konsole one of the few programs that users tend to have a lot of open at once, while for most plasma applications you're happy with only one of them running at a time? Maybe if Dolphin et al ran as separate processes per open window they'd do the same. any updates on this bug? ping |