[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: x11proto-core 7.0.13 will break Tk

On 7/20/08, Florian Weimer <fw@deneb.enyo.de> wrote:
> * Sergei Golovan:
>  > Certainly affected packages are tk8.3, tk8.4, tk8.5, blt, tile. Also
>  > perl-tk and ruby are likely to break after possible upgrade of
>  > x11proto-core. (May be other packages which use Tk.)
> What about statically-linked, proprietary applications?  Why hasn't this
>  happened in the past?

Tk adds its own X event numbers to a table of events. And puts it just
after the last existing event (the following is an excerpt from tk.h):

 * Extensions to the X event set
#define VirtualEvent	    (LASTEvent)
#define ActivateNotify	    (LASTEvent + 1)
#define DeactivateNotify    (LASTEvent + 2)
#define MouseWheelEvent     (LASTEvent + 3)
#define TK_LASTEVENT	    (LASTEvent + 4)

#define MouseWheelMask	    (1L << 28)

#define ActivateMask	    (1L << 29)
#define VirtualEventMask    (1L << 30)
#define TK_LASTEVENT	    (LASTEvent + 4)

It looks that until the last month there were exactly 35 events
(LASTEvent equals 35), so the Tk core library, all extensions linked
to it (which use event numbers directly) and all statically linked
propriatory binaries were binary compatible.

Now X people have added another event number (GenericEvent), which
means that in the former excerpt LASTEvent changes to 36. So, if two
extensions use the same tk.h but different x11proto-core versions
(7.0.12 and 7.0.13) they will not be binary compatible. Statically
linked proprietory binaries should be fine if they never receive
GenericEvent from X (I'm not an expert, so I realy don't know if its
possible to receive X event if an application doesn't know about it).

Sergei Golovan

Reply to: