equal
deleted
inserted
replaced
531 (ev.get_type() == XConstants.MotionNotify || ev.get_type() == XConstants.EnterNotify || ev.get_type() == XConstants.LeaveNotify)) |
531 (ev.get_type() == XConstants.MotionNotify || ev.get_type() == XConstants.EnterNotify || ev.get_type() == XConstants.LeaveNotify)) |
532 { |
532 { |
533 processGlobalMotionEvent(ev); |
533 processGlobalMotionEvent(ev); |
534 } |
534 } |
535 |
535 |
|
536 if( ev.get_type() == XConstants.MappingNotify ) { |
|
537 // The 'window' field in this event is unused. |
|
538 // This application itself does nothing to initiate such an event |
|
539 // (no calls of XChangeKeyboardMapping etc.). |
|
540 // SunRay server sends this event to the application once on every |
|
541 // keyboard (not just layout) change which means, quite seldom. |
|
542 XlibWrapper.XRefreshKeyboardMapping(ev.pData); |
|
543 resetKeyboardSniffer(); |
|
544 setupModifierMap(); |
|
545 } |
536 XBaseWindow.dispatchToWindow(ev); |
546 XBaseWindow.dispatchToWindow(ev); |
537 |
547 |
538 Collection dispatchers = null; |
548 Collection dispatchers = null; |
539 synchronized(winToDispatcher) { |
549 synchronized(winToDispatcher) { |
540 Long key = Long.valueOf(xany.get_window()); |
550 Long key = Long.valueOf(xany.get_window()); |
2110 */ |
2120 */ |
2111 private static int backingStoreType; |
2121 private static int backingStoreType; |
2112 |
2122 |
2113 static final int XSUN_KP_BEHAVIOR = 1; |
2123 static final int XSUN_KP_BEHAVIOR = 1; |
2114 static final int XORG_KP_BEHAVIOR = 2; |
2124 static final int XORG_KP_BEHAVIOR = 2; |
|
2125 static final int IS_SUN_KEYBOARD = 1; |
|
2126 static final int IS_NONSUN_KEYBOARD = 2; |
|
2127 static final int IS_KANA_KEYBOARD = 1; |
|
2128 static final int IS_NONKANA_KEYBOARD = 2; |
|
2129 |
2115 |
2130 |
2116 static int awt_IsXsunKPBehavior = 0; |
2131 static int awt_IsXsunKPBehavior = 0; |
2117 static boolean awt_UseXKB = false; |
2132 static boolean awt_UseXKB = false; |
2118 static boolean awt_UseXKB_Calls = false; |
2133 static boolean awt_UseXKB_Calls = false; |
2119 static int awt_XKBBaseEventCode = 0; |
2134 static int awt_XKBBaseEventCode = 0; |
2138 } |
2153 } |
2139 return awt_IsXsunKPBehavior == XSUN_KP_BEHAVIOR ? true : false; |
2154 return awt_IsXsunKPBehavior == XSUN_KP_BEHAVIOR ? true : false; |
2140 } finally { |
2155 } finally { |
2141 awtUnlock(); |
2156 awtUnlock(); |
2142 } |
2157 } |
|
2158 } |
|
2159 |
|
2160 static int sunOrNotKeyboard = 0; |
|
2161 static int kanaOrNotKeyboard = 0; |
|
2162 static void resetKeyboardSniffer() { |
|
2163 sunOrNotKeyboard = 0; |
|
2164 kanaOrNotKeyboard = 0; |
|
2165 } |
|
2166 static boolean isSunKeyboard() { |
|
2167 if( sunOrNotKeyboard == 0 ) { |
|
2168 if( XlibWrapper.IsSunKeyboard( getDisplay() )) { |
|
2169 sunOrNotKeyboard = IS_SUN_KEYBOARD; |
|
2170 }else{ |
|
2171 sunOrNotKeyboard = IS_NONSUN_KEYBOARD; |
|
2172 } |
|
2173 } |
|
2174 return (sunOrNotKeyboard == IS_SUN_KEYBOARD); |
|
2175 } |
|
2176 static boolean isKanaKeyboard() { |
|
2177 if( kanaOrNotKeyboard == 0 ) { |
|
2178 if( XlibWrapper.IsKanaKeyboard( getDisplay() )) { |
|
2179 kanaOrNotKeyboard = IS_KANA_KEYBOARD; |
|
2180 }else{ |
|
2181 kanaOrNotKeyboard = IS_NONKANA_KEYBOARD; |
|
2182 } |
|
2183 } |
|
2184 return (kanaOrNotKeyboard == IS_KANA_KEYBOARD); |
2143 } |
2185 } |
2144 static boolean isXKBenabled() { |
2186 static boolean isXKBenabled() { |
2145 awtLock(); |
2187 awtLock(); |
2146 try { |
2188 try { |
2147 return awt_UseXKB; |
2189 return awt_UseXKB; |