Oliver Graf writes:
Hrvoje Niksic <hniksic(a)srce.hr> writes:
> Oliver Graf <ograf(a)fga.de> writes:
>
> > --with-offix (*) Compile in support for OffiX drag and drop.
> > + *WARNING* If you compile in OffiX, you may not be
> > + able to use multiple X displays success-
> > + fully. If the two servers are from
> > + different vendors, the results may be
> > + unpredictable.
>
> WTF? You mean "if you USE OffiX," don't you?
Whoops, you're right. I'll fix it...
No, Hrvoje is wrong (and so are you). The comment is exactly correct.
The bug is not from using Offix, but from compiling with it.
Bug summary:
There are some global variables in offix.c that cache the Atoms of the
Dnd protocols. The function DndIsDropMessage (offix.c) tests an event
against these Atoms to see if an event is a Dnd event.
This function is called for every single X event, and if so, handled as a
Dnd event (x_event_to_emacs_event, in event-Xt.c).
The bug is the fact that different X servers use different Atoms for the
same events, but DndIsDropMessage() is viewing all displays as alike.
For example, the Solaris X Server uses 152 for WM_PROTOCOLS (sent
whenever I select a window). Exceed under Window NT uses 152 for
DndSelection. Can you see the punch-line yet?
I start XEmacs with the display on Solaris. I do a make-frame-on-display
onto an Exceed server on an NT. DndInitialize() caches DndSelection as
152. It also caches the display as the NT. Now, every time I select my
Solaris window, it gives a bogus drop. Even better is when I close the
last frame on the Exceed server, and the display closes. The next time I
enter the Solaris window, it tries to do a drop on a non-existant
display. Boom.
Please note that I have not actually tried to do a drag or drop. The bug
is that offix.c incorrectly thinks that I am trying to do a drop.
This is why the warning is correct as written.
> If even compiling with OffiX is so buggy, should we even include
it to
> this release?
We should incorporate it, cause only using it with multiple displays
is buggy.
To me, it depends on how useful it is. Most people will not use multiple
X Servers, or will at least use multiple identical ones. If DnD is
giving them something useful, leave it in. If it isn't, then dump it.
Certainly, we should not be auto-detecting it, but only doing it on a
user's direct request.
--
Colin