bug-gnustep
[Top][All Lists]
Advanced

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

Re: DnD improvements


From: Willem Rein Oudshoorn
Subject: Re: DnD improvements
Date: 03 Dec 2001 08:52:39 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Adam Fedor <fedor@doc.com> writes:

> Willem Rein Oudshoorn wrote:
> 
> > Things still to do:
> > * Fix cursor setting bug with WindowMaker
> > * Work together with other DnD aware applications.
> > * Fix bug in NSColorWell usage of DnD
> >
> 
> 
> I added you patch with a few changes.
> 
> First, I didn't add the setting the background on a cached image,
> because it seems to work for me, or at least I don't see what is
> wrong. It may simply be that you don't have the 'GraphicCompositing'
> default set.  I've changed this to be YES by default, since it's
> confusing other people also (I've only recently documented it, so
> that's not surprising).

I have the `GraphicCompositing' set to YES.  But it is not
surprising that you did not see what was going wrong, I should
have described it better.  Two things:

(A) It is the right thing to do.  
(B) If you drag a color, e.g. from the color panel a colorwell,
    the image you drag looks as follows:

               Trans-  *
               parent  *
                       *
               *********

   Where * is black.  The background color of the image you're 
   dragging is THE color you are dragging.  
   Because in the old code the background color is ignored
   you do not see the color you are dragging.  
  
   If this works for you I am really surprised.  (or something else
   is changed)

> Also, the cursor management was screwed up, which I think was
> causing at least some of your cursor problems. It's probably my
> fault since I wrote it and obviously didn't understand a thing about
> cursors when I did. It should work a little better now, but it still
> leaves much to be desired.
 
I am not sure what code you are refering to, but the main problem was
that the call to
 
   XDefineCursor

with the exact SAME arguments, did work in some cases and did not in
other cases.  (NOTE: At least in my private version, I should
check the cvs version if this is also the case, but because 
I could not fix it I did not commit my changes to the cursor
stuff)

> 
> There still seems to be a problem with Dnd cursor setting. The
> cursor seems to change too often when draging and not always
> correctly (i.e. when you move the mouse quickly). This may be at
> least partially due to the fact that drag window doesn't track the
> mouse that well or perhaps it's something else. I'll try to look at
> it later, but I'll be away from the 'home office' for a few days so
> I don't know how much luck I'll have.

Actually it should work quite well.  However there are two problems
I am aware of and I am not sure if these are the same you noticed:

(A)  Moving the mouse very quickly and abruptly.  This causes the
     mouse cursor to be misaligned with the dragged image.
     I think this is caused by a bug in the PeriodicEvents code.
     (Something along the line:  
        - fire event
        - event handling code takes too long
        - periodic event firing stops until reset by
          another event
     But I have not investigated this.

(B)  Cursor changes.  This should work, BUT if the dragging 
     destination code does not implemented:

      - (unsigned int) draggingEntered:
      AND
      - (unsigned int) draggingUpdated:

     the cursor will look wrong.  This you can see in the NSColorWell
     code.  The NSColor*** stuff only implements -draggingEntered:
     So if you move your mouse inside the NSColor** view the 
     DnD code will use the generic -draggingUpdated: method and this
     method return 0, causing the cursor to change back to the 
     `forbidden' cursor.


There might be other problems, and I would like to hear them.  
Also I will try to fix (B) and later (A), but this week I 
will not have time.  

Wim Oudshoorn.

P.S.: DISCLAIMER.  The above mail is based on my recollection
     of the code, not on inspecting it.  But I am pretty sure :-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]