This is the mail archive of the guile-gtk@sources.redhat.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gdk-event-string and NULL


I propose to made a change,

        * gdk-1.2.defs, gdk-support.c (gdk_event_string): Return #f for
        key.string == NULL as occurs for GDK_KEY_RELEASE, previously returned
        an empty string, but only due to a of 0 bytes from NULL.  Use
        scm_mem2string to return whole key.length, since string can contain
        '\0' bytes.

I think this can be regarded as a bug fix.  Returning an empty string
for GDK_KEY_RELEASE looks like only a happy coincidence, not an
intended feature.  Certainly #f for NULL corresponds to the general
behaviour in other places.

I think it's unlikely anyone would be depending on an empty string,
since it's the key press where one is interested in the string,
there's nothing useful to get on the release.

Attachment: gdk-support.c.event-string.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]