<AWT Dev> [9] Review Request for 6961123: setWMClass fails to null-terminate WM_CLASS string

Omair Majid omajid at redhat.com
Thu Dec 24 22:22:51 UTC 2015


Hi,

I ran across some funny characters appearing in the application title
under gnome shell and it turned out to be an old bug.

Bug: https://bugs.openjdk.java.net/browse/JDK-6961123
Webrev: http://cr.openjdk.java.net/~omajid/webrevs/6961123-missing-null-wmclass/00/

The ICCCM [1] states:

    The WM_CLASS property (of type STRING without control characters)
    contains two consecutive null-terminated strings. 
    ...
    Note that WM_CLASS strings are null-terminated and, thus, differ
    from the general conventions that STRING properties are
    null-separated. 

But AWT doesn't do that. It uses two null-separated strings for
WM_CLASS. The webrev fixes that.

Thanks,
Omair

[1] https://tronche.com/gui/x/icccm/sec-4.html

-- 
PGP Key: 66484681 (http://pgp.mit.edu/)
Fingerprint = F072 555B 0A17 3957 4E95  0056 F286 F14F 6648 4681


More information about the awt-dev mailing list