bug-gnustep
[Top][All Lists]
Advanced

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

dragging image outside screen lead to crash


From: Wim Oudshoorn
Subject: dragging image outside screen lead to crash
Date: Sat, 17 Nov 2001 22:59:16 +0100 (CET)


As observed earlier, dragging an image outside the screen
leads to a crash.  Reason for this is the fact that the
call XGetImage only succeeds when the image is entirily
on the screen (not necessarily visible)

While fixing the functions involved I also changed
occurences of NSRect to XRectangle when the coordinates
are Xcoordinates.  This gets rid of a lot of floats and 
problems when using non-integer coordinates.

There are still a few (minor) problems left, all of
them in:

-[XGGState visibleRectForWindow:]

A)  I had to put a -1 on the size, otherwise 
        it would still fail in some circumstances.
        But I can not figure out why.

B)  It traverse the X windows list everytime,
        so this might be a performance hit.
        But I did not notice it.  
        
More serious is:

C)  It still might fail if between the invocation 
        of this method and the actual call to
        XGetImage.  
        I don't know enough about X programming
        to now how to solve this.

        I definitely need to find my XLib books
        again :-(


Wim Oudshoorn



This mail sould contain:

1. ChangeLog
2. Diff
3. a new file XGGeometry.h 
               


-----[ ChangeLog ]  ----------------------------------------------------

2001-11-17  Willem Rein Oudshoorn  <woudshoo@xs4all.nl>

        * xgps-devel/Source/XGGState.m 
        ([XGGState -visibleRectForWindow:]): new method
        ([XGGState 
-_compositeGState:sourcefromRect:fromRecttoPoint:toPointop:op]):
        cleaned up, replaced lots of floats with integers, fixed bug that
        caused a call to RGetXImage with wrong parameters.
        ([XGGState -DPSimage:]): cleaned up somewhat, replaced lots of
        floats with integers.

        * xgps-devel/Source/XGDrawingEngine.h (_bitmap_combine_alpha) 
        (_bitmap_combine_alpha): updated forward declaration.

        * xgps-devel/Source/XGContext.m: Changed emace editing mode from
        C++ to ObjectiveC

        * xgps-devel/Source/XGBitmap.m (_pixmap_combine_alpha) 
        (_bitmap_combine_alpha): Replaced floats with integers.

        * xgps-devel/Headers/gnustep/xgps/XGGeometry.h: new file

        * xgps/Headers/gnustep/xgps/XGGState.h: Added missing
        NSGraphicsContext.h include

Attachment: XGGeometry.h
Description: XGGeometry.h

Attachment: cvs-diff-2-edited.gz
Description: xgps-diff


reply via email to

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