mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-23 16:10:52 +00:00
Correction for bug with dragview.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@20504 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
93045595ed
commit
6a708ea7a2
2 changed files with 18 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-12-30 18:38 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/x11/XGDragView.m: _handleDrag: method correction for
|
||||
bug#11352 and for fixes to allow compilation with gcc < 3.0.
|
||||
|
||||
2004-12-09 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/win32/WIN32Server.m (-standardcursor:): Don't set
|
||||
|
|
|
@ -559,22 +559,17 @@ static XGDragView *sharedDragView = nil;
|
|||
*/
|
||||
- (void) _handleDrag: (NSEvent*)theEvent
|
||||
{
|
||||
// Caching some often used values. These values do not
|
||||
// change in this method.
|
||||
Display *xDisplay = [XGServer currentXDisplay];
|
||||
// Use eWindow for coordination transformation
|
||||
NSWindow *eWindow = [theEvent window];
|
||||
Display *xDisplay = [XGServer currentXDisplay]; // Caching some often used values.
|
||||
NSWindow *eWindow = [theEvent window]; // Use eWindow for coordination transformation
|
||||
NSDate *theDistantFuture = [NSDate distantFuture];
|
||||
NSImage *dragImage = [dragCell image];
|
||||
unsigned int eventMask = NSLeftMouseDownMask | NSLeftMouseUpMask
|
||||
| NSLeftMouseDraggedMask | NSMouseMovedMask
|
||||
| NSPeriodicMask | NSAppKitDefinedMask | NSFlagsChangedMask;
|
||||
|
||||
NSPoint startPoint;
|
||||
|
||||
// Storing values, to restore after we have finished.
|
||||
NSPoint startPoint; // Storing values, to restore after we have finished.
|
||||
NSCursor *cursorBeforeDrag = [NSCursor currentCursor];
|
||||
|
||||
BOOL refreshedView = NO;
|
||||
|
||||
// Unset the target window
|
||||
targetWindow = 0;
|
||||
targetMask = NSDragOperationAll;
|
||||
|
@ -617,6 +612,14 @@ static XGDragView *sharedDragView = nil;
|
|||
while ([theEvent type] != NSLeftMouseUp)
|
||||
{
|
||||
[self _handleEventDuringDragging: theEvent];
|
||||
|
||||
// FIXME: Force the redisplay of the source view after the drag.
|
||||
// Temporary fix for bug#11352.
|
||||
if(refreshedView == NO)
|
||||
{
|
||||
[dragSource display];
|
||||
refreshedView = YES;
|
||||
}
|
||||
|
||||
theEvent = [NSApp nextEventMatchingMask: eventMask
|
||||
untilDate: theDistantFuture
|
||||
|
|
Loading…
Reference in a new issue