Fixed problems found by sttic code analyser.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@31326 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2010-09-11 14:00:35 +00:00
parent 1c986457b5
commit 82789ff26e
5 changed files with 28 additions and 12 deletions

View file

@ -1,3 +1,14 @@
2010-09-11 Fred Kiefer <FredKiefer@gmx.de>
* Source/x11/convert.c (image2StandardPseudoColor): Small change
to keep static code analyser happy.
* Source/x11/XGServerEvent.m (process_key_event): Don't process
the event if we don't have a key window.
* Source/x11/XGServerWindow.m (_computeDepth): Test for unknown
visual class.
* Tools/gpbs.m: Rename newDataWithVersion: into dataWithVersion to
follwo the Objective_c naming convention.
2010-09-10 Eric Wasylishen <ewasylishen@gmail.com>
* Source/win32/w32_activate.m: Revert the change to call
@ -7,10 +18,10 @@
* Source/win32/WIN32Server.m: Only show taskbar buttons for windows
which satisfy both:
- style mask isn't NSBorderlessWindowMask
- style mask don't have NSUtilityWindowMask set
Should fix bug 30911
2010-08-29 Eric Wasylishen <ewasylishen@gmail.com>

View file

@ -2015,15 +2015,18 @@ process_key_event (XEvent* xEvent, XGServer* context, NSEventType eventType,
if (_is_keyboard_initialized == NO)
initialize_keyboard ();
/* Process location */
window = [XGServer _windowWithTag: [[NSApp keyWindow] windowNumber]];
if (window != 0)
if (!window)
{
eventLocation.x = xEvent->xbutton.x;
eventLocation.y = xEvent->xbutton.y;
eventLocation = [context _XPointToOSPoint: eventLocation
for: window];
// No key event if we don't have a key window
return nil;
}
/* Process location */
eventLocation.x = xEvent->xbutton.x;
eventLocation.y = xEvent->xbutton.y;
eventLocation = [context _XPointToOSPoint: eventLocation
for: window];
/* Process characters */
keys = [context->inputServer lookupStringForEvent: (XKeyEvent *)xEvent

View file

@ -4246,6 +4246,8 @@ _computeDepth(int class, int bpp)
spp = 3;
break;
default:
NSLog(@"Unknown visual class %d in computeDepth", class);
return 0;
break;
}

View file

@ -635,7 +635,7 @@ image2StandardPseudoColor(RContext *ctx, RImage *image)
x1-=channels;
nerr[x++] = ptr[x1++];
nerr[x++] = ptr[x1++];
nerr[x++] = ptr[x1++];
nerr[x] = ptr[x1];
}
for (x=0; x<image->width*3; x+=3, ofs++) {
/* reduce pixel */

View file

@ -152,7 +152,7 @@ NSMutableDictionary *pasteboards = nil;
hasGNUDataForType: (BOOL)GNUData;
- (BOOL) checkConnection: (NSConnection*)c;
- (NSData*) data;
- (NSData*) newDataWithVersion: (int)version;
- (NSData*) dataWithVersion: (int)version;
- (id) owner;
- (id) pboard;
- (void) setData: (NSData*)d;
@ -234,7 +234,7 @@ NSMutableDictionary *pasteboards = nil;
return data;
}
- (NSData*) newDataWithVersion: (int)version
- (NSData*) dataWithVersion: (int)version
{
/*
* If the owner of this item is an X window - we can't use the data from
@ -766,7 +766,7 @@ NSMutableDictionary *pasteboards = nil;
if (d)
{
return [d newDataWithVersion: [e refNum]];
return [d dataWithVersion: [e refNum]];
}
}
return nil;