<AWT Dev> [PATCH] Some small type fixes

Oleg Sukhodolsky Oleg.Sukhodolsky at Sun.COM
Wed Apr 2 06:50:18 PDT 2008


Roman Kennke wrote:
> Hi Oleg,
> 
>> I have combined both your patches in one.  Could you please confirm that 
>> it is correct and complete and I will start internal review.
> 
> Thanks, yes it is correct.

Fix has been committed to AWT master.

Regards, Oleg.

P.S. thank you for contribution.
> 
> /Roman
> 
>> Thanks, Oleg.
>>
>> Roman Kennke wrote:
>>> In XWindow.c and XlibWrapper.c, some methods have int instead of jint in
>>> their signature. This doesn't compile for different jni.h. The attached
>>> patch fixes this. Could this be included in the OpenJDK tree?
>>>
>>> /Roman
>> einfaches Textdokument-Anlage (combined-patch.txt)
>> diff -r 908cab7b2f1c src/solaris/native/sun/awt/MouseInfo.c
>> --- a/src/solaris/native/sun/awt/MouseInfo.c	Tue Apr 01 17:38:46 2008 +0400
>> +++ b/src/solaris/native/sun/awt/MouseInfo.c	Wed Apr 02 16:02:12 2008 +0400
>> @@ -54,7 +54,7 @@ Java_sun_awt_DefaultMouseInfoPeer_fillPo
>>       int i;
>>       int32_t xr, yr, xw, yw;
>>       uint32_t keys;
>> -     BOOL pointerFound;
>> +     Bool pointerFound;
>>  
>>       AWT_LOCK();
>>       if (pointClass == NULL) {
>> @@ -102,7 +102,7 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_
>>      int32_t xr = 0, yr = 0, xw = 0, yw = 0;
>>      uint32_t keys = 0;
>>      uint32_t nchildren = 0;
>> -    BOOL pointerFound = 0;
>> +    Bool pointerFound = 0;
>>      struct FrameData *wdata = NULL;
>>      jobject winPeer = NULL;
>>  
>> diff -r 908cab7b2f1c src/solaris/native/sun/xawt/XWindow.c
>> --- a/src/solaris/native/sun/xawt/XWindow.c	Tue Apr 01 17:38:46 2008 +0400
>> +++ b/src/solaris/native/sun/xawt/XWindow.c	Wed Apr 02 16:02:12 2008 +0400
>> @@ -1234,7 +1234,7 @@ Java_sun_awt_X11_XWindow_initIDs
>>     }
>>  }
>>  
>> -JNIEXPORT int JNICALL
>> +JNIEXPORT jint JNICALL
>>  Java_sun_awt_X11_XWindow_getKeySymForAWTKeyCode(JNIEnv* env, jclass clazz, jint keycode) {
>>      return awt_getX11KeySym(keycode);
>>  }
>> diff -r 908cab7b2f1c src/solaris/native/sun/xawt/XlibWrapper.c
>> --- a/src/solaris/native/sun/xawt/XlibWrapper.c	Tue Apr 01 17:38:46 2008 +0400
>> +++ b/src/solaris/native/sun/xawt/XlibWrapper.c	Wed Apr 02 16:02:12 2008 +0400
>> @@ -359,7 +359,7 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_
>>      XDestroyWindow( (Display *)jlong_to_ptr(display),(Window) window);
>>  }
>>  
>> -JNIEXPORT int JNICALL Java_sun_awt_X11_XlibWrapper_XGrabPointer
>> +JNIEXPORT jint JNICALL Java_sun_awt_X11_XlibWrapper_XGrabPointer
>>  (JNIEnv *env, jclass clazz, jlong display, jlong window,
>>   jint owner_events, jint event_mask, jint pointer_mode,
>>   jint keyboard_mode, jlong confine_to, jlong cursor, jlong time)
>> @@ -377,7 +377,7 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_
>>      XUngrabPointer( (Display *)jlong_to_ptr(display), (Time) time);
>>  }
>>  
>> -JNIEXPORT int JNICALL Java_sun_awt_X11_XlibWrapper_XGrabKeyboard
>> +JNIEXPORT jint JNICALL Java_sun_awt_X11_XlibWrapper_XGrabKeyboard
>>  (JNIEnv *env, jclass clazz, jlong display, jlong window,
>>   jint owner_events, jint pointer_mode,
>>   jint keyboard_mode, jlong time)
>> @@ -621,7 +621,7 @@ JNIEXPORT void JNICALL Java_sun_awt_X11_
>>  
>>  }
>>  
>> -JNIEXPORT int JNICALL Java_sun_awt_X11_XlibWrapper_XTranslateCoordinates
>> +JNIEXPORT jint JNICALL Java_sun_awt_X11_XlibWrapper_XTranslateCoordinates
>>  (JNIEnv *env, jclass clazz, jlong display, jlong src_w, jlong dest_w,
>>   jlong src_x, jlong src_y, jlong dest_x_return, jlong dest_y_return,
>>   jlong child_return)
>> @@ -634,7 +634,7 @@ JNIEXPORT int JNICALL Java_sun_awt_X11_X
>>                    (Window *) jlong_to_ptr(child_return));
>>  }
>>  
>> -JNIEXPORT int JNICALL Java_sun_awt_X11_XlibWrapper_XEventsQueued
>> +JNIEXPORT jint JNICALL Java_sun_awt_X11_XlibWrapper_XEventsQueued
>>  (JNIEnv *env, jclass clazz, jlong display, jint mode) {
>>  
>>      AWT_CHECK_HAVE_LOCK();



More information about the awt-dev mailing list