On 2005-01-14 03:42:42 +0200 Gregory John Casamento <[EMAIL PROTECTED]> wrote:

Enrico,

--- Enrico Sersale <[EMAIL PROTECTED]> wrote:


In Gorm (GormInternalViewEditor.m) and in GWorkspace (Desktop/DesktopView.m and FSNode/FSNIconsView.m) -mouseDown and -mouseDragged: are broken by the recent changes in -back (Source/art/path.m _stroke:). Both the apps use about the same code to draw a rect that delimits an area where the included objects must be selected.

I've noticed this myself. I've been talking to Alex about it. I have a build from Dec 30 in which it doesn't occur. Alex also claims that he's seen it in xlib, but I haven't verified this as of yet.

In xlib this doesn't happen. Well, it can happen only with GWorkspace if you are not using the CVS version, but, in this case it is a bug in GW. Probably, Alex has seen this.

It's possible it could be broken in some common code between xlib/art. We need
to investigate this further.

No, the problem exactly is in back/Source/art/path.m, in _stroke:. Changing only this file with a older one fixes it.

The following example is from Gorm but it is actually the same in GWorkspace:

        while ([e type] != NSLeftMouseUp)
          {
            p = [self convertPoint: [e locationInWindow] fromView: nil];
        
            x = (p.x >= oldp.x) ? oldp.x : p.x;
            y = (p.y >= oldp.y) ? oldp.y : p.y;
            w = max(p.x, oldp.x) - min(p.x, oldp.x);
            w = (w == 0) ? 1 : w;
            h = max(p.y, oldp.y) - min(p.y, oldp.y);
            h = (h == 0) ? 1 : h;
        
            r = NSMakeRect(x, y, w, h);

            if (NSEqualRects(oldRect, NSZeroRect) == NO)
              {
                [verticalImage
                  compositeToPoint: NSMakePoint(NSMinX(oldRect), 
NSMinY(oldRect))
                  fromRect: NSMakeRect(0.0, 0.0, 1.0, oldRect.size.height)
                  operation: NSCompositeCopy];
                [verticalImage
                  compositeToPoint: NSMakePoint(NSMaxX(oldRect)-1, 
NSMinY(oldRect))
                  fromRect: NSMakeRect(1.0, 0.0, 1.0, oldRect.size.height)
                  operation: NSCompositeCopy];
                
                [horizontalImage
                  compositeToPoint: NSMakePoint(NSMinX(oldRect), 
NSMinY(oldRect))
                  fromRect: NSMakeRect(0.0, 0.0, oldRect.size.width, 1.0)
                  operation: NSCompositeCopy];
                [horizontalImage
                  compositeToPoint: NSMakePoint(NSMinX(oldRect), 
NSMaxY(oldRect)-1)
                  fromRect: NSMakeRect(0.0, 1.0, oldRect.size.width, 1.0)
                  operation: NSCompositeCopy];
              }

            {
              NSRect wr;
              wr = [self convertRect: r
                         toView: nil];
        
              [verticalImage lockFocus];
              NSCopyBits([[self window] gState],
                         NSMakeRect(NSMinX(wr), NSMinY(wr),
                                    1.0, r.size.height),
                         NSMakePoint(0.0, 0.0));
              NSCopyBits([[self window] gState],
                         NSMakeRect(NSMaxX(wr)-1, NSMinY(wr),
                                    1.0, r.size.height),
                         NSMakePoint(1.0, 0.0));
              [verticalImage unlockFocus];

              [horizontalImage lockFocus];
              NSCopyBits([[self window] gState],
                         NSMakeRect(NSMinX(wr), NSMinY(wr),
                                    r.size.width, 1.0),
                         NSMakePoint(0.0, 0.0));
              NSCopyBits([[self window] gState],
                         NSMakeRect(NSMinX(wr), NSMaxY(wr)-1,
                                    r.size.width, 1.0),
                         NSMakePoint(0.0, 1.0));
              [horizontalImage unlockFocus];
            }
        
            [[NSColor darkGrayColor] set];
            NSFrameRect(r);
            oldRect = r;
        
            [[self window] enableFlushWindow];
        
            [[self window] flushWindow];
            [[self window] disableFlushWindow];


e = [NSApp nextEventMatchingMask: eventMask untilDate: future inMode: NSEventTrackingRunLoopMode dequeue: YES]; }




Thanks, GJC

=====
Gregory John Casamento




_______________________________________________ Bug-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to