Fix HiDPI rendering issues with Dual Screen
ClosedPublic

Authored by guoyunhe on Sep 16 2019, 4:54 PM.

Details

Summary

KonsolePart's showShellInDir() function caused this issue. But the reason is still unclear. This fix is the same solution Dolphin uses to switch directory.

BUG: 411965

Diff Detail

Repository
R40 Kate
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
guoyunhe created this revision.Sep 16 2019, 4:54 PM
Restricted Application added a project: Kate. · View Herald TranscriptSep 16 2019, 4:54 PM
Restricted Application added a subscriber: kwrite-devel. · View Herald Transcript
guoyunhe requested review of this revision.Sep 16 2019, 4:54 PM
guoyunhe edited the summary of this revision. (Show Details)Sep 16 2019, 4:54 PM
guoyunhe added a reviewer: Kate.
ngraham edited the summary of this revision. (Show Details)Sep 16 2019, 5:32 PM
ngraham added a subscriber: ngraham.

Kate has moved to GitLab; can you abandon this patch and re-submit it at https://invent.kde.org/kde/kate/merge_requests/?

cullmann added a subscriber: cullmann.

First: Thanks a lot for tracing that to this call!

For the fix:
I am not sure this is a good idea.
Can't we fix that inside the showShellInDir function? I think we use that at some other place, too.
And other applications have the same problem, why workaround everywhere?

This revision was not accepted when it landed; it landed in state Needs Review.Sep 16 2019, 5:36 PM
Closed by commit R40:a16063f5aed6: Fix HiDPI rendering issues with Dual Screen (authored by Guo Yunhe <i@guoyunhe.me>). · Explain Why
This revision was automatically updated to reflect the committed changes.

If I know how to fix it in Konsole, I will definitely do it. But I cannot find the cause in KonsolePart. Dolphin took the same solution, instead of call the function, they send cd command. I also pushed it to GitLab/Invent https://invent.kde.org/kde/kate/merge_requests/19/diffs

What happens if e.g. vi or another text editor is open? Do we send the cd... command then to the editor?

I think send terminal input this way is inherently flawed.

What happens if e.g. vi or another text editor is open? Do we send the cd... command then to the editor?

I think send terminal input this way is inherently flawed.

No, it won't happen because the cd command is sent immediately after mounting KonsolePart. When switching to new projects, new KonsolePart widgets will be used. Here isn't reuse/reset of KonsolePart.

I track down the issue and the source is this line in konsole:

return window->winId();

https://cgit.kde.org/konsole.git/tree/src/Session.cpp#n216