GNOME Bugzilla – Bug 746898
Metacity debug output cuts off window title
Last modified: 2015-04-03 20:15:16 UTC
When a window sends buggy timestamps metacity outputs debug messages. The debug messages contain the title of the window to identify which window has problems. But unfortunately it is hardcoded that the length of the title is always 10. This can be found in: metacity/src/core/window-props.c:653 652 /* strndup is a hack since GNU libc has broken %.10s */ 653 str = g_strndup (window->title, 10); Current debug output: Window manager warning: 0x1600018 (Bottom Exp) appears to be one of the offending windows with a timestamp of 39887360. Working around... Expected debug output: Window manager warning: 0x1600018 (Bottom Expanded Edge Panel) appears to be one of the offending windows with a timestamp of 39887360. Working around... I suggest to increase the length of the title either to `strlen(title)` or a more sensibel length such as 255: -str = g_strndup (window->title, 10); +str = g_strndup (window->title, strlen(window->title)); This was introduced by commit 9feebc05c799190fa5ff699dd3f358b2d6c95eee a long time ago, I dont know why that was choosen to be so short in the first place, but it does not seem to have technical reasons.