App Switcher (Alt+Tab) doesn't display the full title of apps in Chinese
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Unity |
Fix Released
|
Medium
|
Andrea Azzarone | ||
| unity (Ubuntu) |
Fix Released
|
Medium
|
Andrea Azzarone | ||
| Precise |
Fix Released
|
Medium
|
Andrea Azzarone | ||
Bug Description
SRU case
TO BE TESTED BY REPORTER(dev)
System is Ubuntu 11.10 with latest update.
As the screenshot attached, the title of GNOME Terminal in Chinese should be "终端", but only "终" is showed. Other title is ok, such as "Firefox网络浏览".
I think there's something wrong while dealing with the text ellipsis.
Related branches
- Tim Penhey (community): Approve
-
Diff: 44 lines (+21/-3) 2 files modifiedapimanual-tests/Switcher.txt (+18/-0)
plugins/unityshell/src/StaticCairoText.cpp (+3/-3)
I tried to see if there was an easy way to replicate this in a non-CJK environment with eg:
echo -n -e "033円]2;终端007円" ; sleep 10
but that didn't work as the New Alt-Tab Switcher is showing the Application title and not the window title.
- chinese-title-app.py Edit (165 bytes, text/x-python)
Thanks for your comment.
So I create a script to show a GTK App named "终端" to help test, please have a try :)
Oh, it is more convenient to use zenity like this:
zenity --entry --title=终端
- Screenshot at 2012年02月24日 18:07:06.png Edit (486.2 KiB, image/png)
This bug is still exist.
In Ubuntu 12.04, the "终" just becomes "终...", not the right "终端".
It's really ugly to display 显示桌面 as 显示桌...
- Chinese
+ App Switcher (Alt+Tab) doesn't display the full title of apps in Chinese
I traced the code and suspect it is related to how DrawText in StaticCairoText.cpp uses a smaller width than expected.
In function GetTextExtents, for the case of a gnome-terminal window, logRect.width returns from pango_layout_
Later on in function DrawText, the value of variable width is used for pango_layout_
I am not familiar with pango but hopes this gives a direction to where the problem lies.
IHMO, this is a severe usability bug which affects all users who has Chinese as the UI language, so I think it should deserve High -- "a bug that has a severe impact on a small portion of Ubuntu users (estimated) or has a moderate impact on a large portion of Ubuntu users (estimated) ", could you re-evaluate the Importance? Anyway, I or Tualatrix will try to come up with a patch.
I just tested with another example with long *English* title: seems the bug is not only happened in Chinese locale:
Please open your terminal then try this one line code:
python -c 'from gi.repository import Gtk;win=
Thanks for the code review. Sounds like something for Mirco'san.
This patch can fix this bug.
The attachment "830801.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]
@Anthony, I think a bzr branch to lp:unity would have a far more chance for more eyes to view your work.
@Anthony Thank you for the patch but we can use std::ceil. Look here: https:/
Hello Ding, or anyone else affected,
Accepted unity into precise-proposed. The package will build now and be available in a few hours. Please test and give feedback here. See https:/
The 5.12-0ubuntu1 unity in -proposed does fix the issue, thanks.
removed: verification-needed
I can confirm the Unity 5.12 has already fixed this issue. Thanks.
This bug was fixed in the package unity - 5.12-0ubuntu1
---------------
unity (5.12-0ubuntu1) precise-proposed; urgency=low
* New upstream release.
- Launcher, Alt-Tab - clicking on launcher item or selecting a app in Alt-
Tab raises all app windows, not just most recently focused (LP: #959339)
- [heap corruption?] compiz crashed with SIGSEGV in _int_malloc() from
g_realloc() from ... from g_dbus_
from g_object_unref() from unity::
unity:
- compiz crashed with SIGSEGV in _int_malloc() from __libc_calloc() from
XOpenDisp
- Regression: Installing apps causes a terrible visual glitch-- have to
restart X.org. (LP: #981168)
- Window management - unity doesn't realise when applications bring their
windows to the front (LP: #802816)
- Dash - Clicking on the desktop dash border should do nothing, *NOT*
close the dash (LP: #839472)
- [FFe, UIFe] HUD - The HUD does not respect launcher icon size settings
in autohide mode (LP: #921506)
- compiz crashed with SIGSEGV in g_volume_
- multiple instances or double icons of application detected on bamfdaemon
respawn (LP: #928912)
- Panel is transparent when Dash is open; no blur no average BG color
(LP: #965323)
- Unity crashes with SIGSEGV when hitting debug DBus interface hard
(LP: #979429)
- compiz crashed with SIGSEGV in _int_malloc() from g_object_unref() from
unity:
- indicators menu are sometimes cut off at screen edge (LP: #883317)
- the shortcut keys in workspace section of the shortcut overlay aren't
translated (LP: #980828)
- [regression] Dash keeps repainting unnecessarily (LP: #980924)
- compiz crashed with SIGSEGV in nux::NTextureDa
nux:
(LP: #952378)
- compiz crashed with SIGSEGV in g_object_unref() from
unity:
unity:
- compiz crashed with SIGSEGV in unity::
from unity::
nux:
- compiz crashed with SIGSEGV in
ends_
std:
from unity::
- Chinese can't be shown completely in dash filter (LP: #984583)
- [Unity 5.10] compiz crashed with SIGSEGV in
unity:
unity:
(LP: #983646)
- [regression] Close button does not close the dash/HUD (LP: #986264)
- compiz crashed with SIGSEGV in g_volume_
fro...