Bug 313915 - Present window plugin not showing correct window title, no utf8 support!
Summary: Present window plugin not showing correct window title, no utf8 support!
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: effects-window-management (show other bugs)
Version: 4.9.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-26 04:54 UTC by Aaron Lewis
Modified: 2013-03-15 14:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
thomas.luebking: ReviewRequest+


Attachments
Missing umlauts (687.93 KB, image/png)
2013-01-26 10:31 UTC, Martin Flöser
Details
Well ... (38.95 KB, image/jpeg)
2013-01-26 10:48 UTC, Thomas Lübking
Details
expected_title (2.02 KB, image/png)
2013-01-29 00:23 UTC, Aaron Lewis
Details
Present_window (7.02 KB, image/png)
2013-01-29 00:23 UTC, Aaron Lewis
Details
xprop (12.38 KB, text/plain)
2013-01-31 09:40 UTC, Aaron Lewis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Lewis 2013-01-26 04:54:06 UTC
Hi,

Present window doesn't show the correct title, it all turns to spaces, but the plasma desktop (icon tasks) did the right display.

Reproducible: Always
Comment 1 Martin Flöser 2013-01-26 09:06:33 UTC
I just played a little bit with it. For me it isn't turned into spaces, but all German Umlauts lose their "dots". E.g. ü turns into u.

Very interesting, I'm quite sure that's a bug present since 4.0 and nobody had noticed.
Comment 2 Thomas Lübking 2013-01-26 10:14:54 UTC
err .... what?
Do i miss sth?

The titles in the black frame and the filter are correct for me - LANG=de_DE.UTF-8

Also "loose their dots" sounds more like "capped".
For the blanks i had rather bet on a font issue.

The titlebar is correct?
Comment 3 Martin Flöser 2013-01-26 10:31:39 UTC
Created attachment 76732 [details]
Missing umlauts

see caption in window decoration: Nürnberg
caption in Present Windows: Nurnberg
Comment 4 Thomas Lübking 2013-01-26 10:48:08 UTC
Created attachment 76733 [details]
Well ...

That's gonna be interesting.

I found a bug in the title condension script (the Ä in the more serious message on SPON is dropped in the titlebar. It's the first letter, so i assume it's some byte assumption, because utf-8 operates on multibyte chars) but PW in general and that message in particular are fine (plus the titlebar condension is not active by default and has a secret key for the moment)
Comment 5 Martin Flöser 2013-01-26 13:11:00 UTC
that's gonna be really interesting. Just tried the same on my notebook and here it works. Now I just need to find the difference in the setup (shot in the blue: font).
Comment 6 Thomas Lübking 2013-01-26 14:53:21 UTC
I'd inspect the clients and whether and to what they set WM_NAME and _NET_WM_NAME, because latter is UTF-8 but former is not.

I do not think it's actually the  font...
(initially i had said that PW would use WM_NAME while the titlebar etc. use _NET_WM_NAME but it relies on the caption property of the client - it's *really* weird)

Random side guess: do you also get this with XRender?
Comment 7 Martin Flöser 2013-01-28 17:44:23 UTC
(In reply to comment #6)
> Random side guess: do you also get this with XRender?
With XRender I can see the dots, not really strong but visible. Looks like a combination of font with scaling in OpenGL
Comment 8 Thomas Lübking 2013-01-28 20:37:19 UTC
Lanczos filter is prone to focussing things into the void ;-)

Does not explain the empty boxes and is thus not the same issue (quick test: "kwrite straße.txt" or "kwrite µsoft.txt" )

@Aaron:
Please provide a screenshot.
Also: What title precisely[1], what glyphs do you expect [2] and what font is used[3] - does it also happen with, say, DejaVu?
Also: does it happen when you restart "kwin --replace &" ?

@Martin
Bug just dropped to "booring" because it's either because of the used font or the fontsystem not being "ready" during the early time when kwin starts (there're other bug reports, mostly focussing on DPI and rasterization settings, ie. Antialiasing etc. - seems distro dependent)
I'm tempted to reset the bug to unconfirmed

[1] in konsole run "xprop > broken_title.txt", click the problematic window when the cursor turns into a cross and attach the created file here

[2] run "kcharselecet", look out for the glyph you expect and post the utf-8 number

[3] run "kcmshell4 fonts" - it's the "General" font, where plasma might use a theme driven one.
Comment 9 Aaron Lewis 2013-01-29 00:22:56 UTC
All in attachment, 

2) kwin --replace doesn't work;
3) I was with font "Ubuntu", tried other standard font, "SimSun", copied directly from Windows installation, still blank title.
Comment 10 Aaron Lewis 2013-01-29 00:23:14 UTC
Created attachment 76777 [details]
expected_title
Comment 11 Aaron Lewis 2013-01-29 00:23:34 UTC
Created attachment 76778 [details]
Present_window
Comment 12 Thomas Lübking 2013-01-29 00:29:30 UTC
Guess from the pics:
Non-latin glyphs are resolved from a pixel font and
    QFont font;
    font.setBold(true); // <- bad visuals
    font.setPointSize(12); // <- kills pixelfont

Can you compile and try a patch?
Comment 13 Thomas Lübking 2013-01-29 16:38:47 UTC
http://git.reviewboard.kde.org/r/108663/
Comment 14 Aaron Lewis 2013-01-30 23:51:28 UTC
Anyone give me a hint on how to obtain that patch? So that I can see
if it solves my problem ;-P

I'm running 4.9.5 at this moment (on Arch Linux, I know how to rebuild kwin)

On Wed, Jan 30, 2013 at 12:38 AM, Thomas Lübking
<thomas.luebking@gmail.com> wrote:
> https://bugs.kde.org/show_bug.cgi?id=313915
>
> Thomas Lübking <thomas.luebking@gmail.com> changed:
>
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>               Flags|                            |ReviewRequest+
>
> --- Comment #13 from Thomas Lübking <thomas.luebking@gmail.com> ---
> http://git.reviewboard.kde.org/r/108663/
>
> --
> You are receiving this mail because:
> You reported the bug.
Comment 15 Thomas Lübking 2013-01-31 08:37:22 UTC
There's a "download diff" button.
You'll need the kde-workspace/kwin sources and from there "patch -p2 < /path/to/patch.diff" (should apply on 4.10 no idea about 4.9.x) and recompile kwin.
Comment 16 Aaron Lewis 2013-01-31 09:03:50 UTC
Hi Thomas,

I hate to tell you, the patch doesn't work for me ...

Just re-built the kdebase-workspace (with the patch applied), installed,
and did a kwin --replace and no effects, still blank in title.

On 08:37 Thu 31 Jan     , Thomas Lübking  wrote:
> https://bugs.kde.org/show_bug.cgi?id=313915
> 
> --- Comment #15 from Thomas Lübking <thomas.luebking@gmail.com> ---
> There's a "download diff" button.
> You'll need the kde-workspace/kwin sources and from there "patch -p2 <
> /path/to/patch.diff" (should apply on 4.10 no idea about 4.9.x) and recompile
> kwin.
> 
> -- 
> You are receiving this mail because:
> You reported the bug.
Comment 17 Thomas Lübking 2013-01-31 09:20:41 UTC
was just a shot in the dark anyway.
please provide  the output of xprop on the window and also check dependency on the compositing backend (xrender/gl compositing) and/or graphicssystem (native/raster) and try setting the fot to DejaVu (for in-font utf8 support)
Comment 18 Aaron Lewis 2013-01-31 09:40:14 UTC
Created attachment 76834 [details]
xprop
Comment 19 Aaron Lewis 2013-01-31 09:41:10 UTC
It was native. 

DejaVu make no difference ... gotta go, will provide more details later

On 09:20 Thu 31 Jan     , Thomas Lübking  wrote:
> https://bugs.kde.org/show_bug.cgi?id=313915
> 
> --- Comment #17 from Thomas Lübking <thomas.luebking@gmail.com> ---
> was just a shot in the dark anyway.
> please provide  the output of xprop on the window and also check dependency on
> the compositing backend (xrender/gl compositing) and/or graphicssystem
> (native/raster) and try setting the fot to DejaVu (for in-font utf8 support)
> 
> -- 
> You are receiving this mail because:
> You reported the bug.
Comment 20 Aaron Lewis 2013-03-15 13:15:38 UTC
Confirmed, fonts are now normal in 4.10.1
Comment 21 Thomas Lübking 2013-03-15 14:26:28 UTC
There was afaik no distinctive patch applied to solve this.
Whatever happened, will have happened outside KDE (system locale setup,  Qt, ...)
Comment 22 Aaron Lewis 2013-03-15 14:33:18 UTC
On 14:26 Fri 15 Mar     , Thomas Lübking  wrote:
> https://bugs.kde.org/show_bug.cgi?id=313915
> 
> Thomas Lübking <thomas.luebking@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>          Resolution|FIXED                       |WORKSFORME
> 
> --- Comment #21 from Thomas Lübking <thomas.luebking@gmail.com> ---
> There was afaik no distinctive patch applied to solve this.
> Whatever happened, will have happened outside KDE (system locale setup,  Qt,
> ...)

Hmm, that's ... so weird! It's like magic, suddenly everything's 
displayed correctly

> 
> -- 
> You are receiving this mail because:
> You reported the bug.