src/solaris/classes/sun/awt/X11/XWindow.java

Print this page

        

*** 400,410 **** public void run() { AWTAccessor.getAWTEventAccessor().setPosted(e); ((Component)e.getSource()).dispatchEvent(e); } }, PeerEvent.ULTIMATE_PRIORITY_EVENT); ! if (focusLog.isLoggable(PlatformLogger.FINER) && (e instanceof FocusEvent)) focusLog.finer("Sending " + e); XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), pe); } /* --- 400,412 ---- public void run() { AWTAccessor.getAWTEventAccessor().setPosted(e); ((Component)e.getSource()).dispatchEvent(e); } }, PeerEvent.ULTIMATE_PRIORITY_EVENT); ! if (focusLog.isLoggable(PlatformLogger.FINER) && (e instanceof FocusEvent)) { ! focusLog.finer("Sending " + e); ! } XToolkit.postEvent(XToolkit.targetToAppContext(e.getSource()), pe); } /*
*** 658,668 **** super.handleButtonPressRelease(xev); XButtonEvent xbe = xev.get_xbutton(); if (isEventDisabled(xev)) { return; } ! if (eventLog.isLoggable(PlatformLogger.FINE)) eventLog.fine(xbe.toString()); long when; int modifiers; boolean popupTrigger = false; int button=0; boolean wheel_mouse = false; --- 660,672 ---- super.handleButtonPressRelease(xev); XButtonEvent xbe = xev.get_xbutton(); if (isEventDisabled(xev)) { return; } ! if (eventLog.isLoggable(PlatformLogger.FINE)) { ! eventLog.fine(xbe.toString()); ! } long when; int modifiers; boolean popupTrigger = false; int button=0; boolean wheel_mouse = false;
*** 692,704 **** mouseButtonClickAllowed |= XlibUtil.getButtonMask(lbutton); XWindow lastWindow = (lastWindowRef != null) ? ((XWindow)lastWindowRef.get()):(null); /* multiclick checking */ ! if (eventLog.isLoggable(PlatformLogger.FINEST)) eventLog.finest("lastWindow = " + lastWindow + ", lastButton " + lastButton + ", lastTime " + lastTime + ", multiClickTime " + XToolkit.getMultiClickTime()); if (lastWindow == this && lastButton == lbutton && (when - lastTime) < XToolkit.getMultiClickTime()) { clickCount++; } else { clickCount = 1; lastWindowRef = new WeakReference(this); --- 696,710 ---- mouseButtonClickAllowed |= XlibUtil.getButtonMask(lbutton); XWindow lastWindow = (lastWindowRef != null) ? ((XWindow)lastWindowRef.get()):(null); /* multiclick checking */ ! if (eventLog.isLoggable(PlatformLogger.FINEST)) { ! eventLog.finest("lastWindow = " + lastWindow + ", lastButton " + lastButton + ", lastTime " + lastTime + ", multiClickTime " + XToolkit.getMultiClickTime()); + } if (lastWindow == this && lastButton == lbutton && (when - lastTime) < XToolkit.getMultiClickTime()) { clickCount++; } else { clickCount = 1; lastWindowRef = new WeakReference(this);
*** 883,893 **** public void handleXCrossingEvent(XEvent xev) { super.handleXCrossingEvent(xev); XCrossingEvent xce = xev.get_xcrossing(); ! if (eventLog.isLoggable(PlatformLogger.FINEST)) eventLog.finest(xce.toString()); if (xce.get_type() == XConstants.EnterNotify) { enterNotify(xce.get_window()); } else { // LeaveNotify: leaveNotify(xce.get_window()); --- 889,901 ---- public void handleXCrossingEvent(XEvent xev) { super.handleXCrossingEvent(xev); XCrossingEvent xce = xev.get_xcrossing(); ! if (eventLog.isLoggable(PlatformLogger.FINEST)) { ! eventLog.finest(xce.toString()); ! } if (xce.get_type() == XConstants.EnterNotify) { enterNotify(xce.get_window()); } else { // LeaveNotify: leaveNotify(xce.get_window());
*** 1027,1041 **** --- 1035,1051 ---- ce = new ComponentEvent(target, ComponentEvent.COMPONENT_HIDDEN); postEventToEventQueue(ce); } private void dumpKeysymArray(XKeyEvent ev) { + if (keyEventLog.isLoggable(PlatformLogger.FINE)) { keyEventLog.fine(" "+Long.toHexString(XlibWrapper.XKeycodeToKeysym(XToolkit.getDisplay(), ev.get_keycode(), 0))+ "\n "+Long.toHexString(XlibWrapper.XKeycodeToKeysym(XToolkit.getDisplay(), ev.get_keycode(), 1))+ "\n "+Long.toHexString(XlibWrapper.XKeycodeToKeysym(XToolkit.getDisplay(), ev.get_keycode(), 2))+ "\n "+Long.toHexString(XlibWrapper.XKeycodeToKeysym(XToolkit.getDisplay(), ev.get_keycode(), 3))); } + } /** Return unicode character or 0 if no correspondent character found. Parameter is a keysym basically from keysymdef.h XXX: how about vendor keys? Is there some with Unicode value and not in the list? */
*** 1055,1072 **** static private int primaryUnicode2JavaKeycode(int uni) { return (uni > 0? sun.awt.ExtendedKeyCodes.getExtendedKeyCodeForChar(uni) : 0); //return (uni > 0? uni + 0x01000000 : 0); } void logIncomingKeyEvent(XKeyEvent ev) { keyEventLog.fine("--XWindow.java:handleKeyEvent:"+ev); dumpKeysymArray(ev); keyEventLog.fine("XXXXXXXXXXXXXX javakeycode will be most probably:0x"+ Integer.toHexString(XKeysym.getJavaKeycodeOnly(ev))); } public void handleKeyPress(XEvent xev) { super.handleKeyPress(xev); XKeyEvent ev = xev.get_xkey(); ! if (eventLog.isLoggable(PlatformLogger.FINE)) eventLog.fine(ev.toString()); if (isEventDisabled(xev)) { return; } handleKeyPress(ev); } --- 1065,1088 ---- static private int primaryUnicode2JavaKeycode(int uni) { return (uni > 0? sun.awt.ExtendedKeyCodes.getExtendedKeyCodeForChar(uni) : 0); //return (uni > 0? uni + 0x01000000 : 0); } void logIncomingKeyEvent(XKeyEvent ev) { + if (keyEventLog.isLoggable(PlatformLogger.FINE)) { keyEventLog.fine("--XWindow.java:handleKeyEvent:"+ev); + } dumpKeysymArray(ev); + if (keyEventLog.isLoggable(PlatformLogger.FINE)) { keyEventLog.fine("XXXXXXXXXXXXXX javakeycode will be most probably:0x"+ Integer.toHexString(XKeysym.getJavaKeycodeOnly(ev))); } + } public void handleKeyPress(XEvent xev) { super.handleKeyPress(xev); XKeyEvent ev = xev.get_xkey(); ! if (eventLog.isLoggable(PlatformLogger.FINE)) { ! eventLog.fine(ev.toString()); ! } if (isEventDisabled(xev)) { return; } handleKeyPress(ev); }
*** 1151,1161 **** --- 1167,1179 ---- unicodeFromPrimaryKeysym, jkeyExtended); if (unicodeKey > 0 && !isDeadKey) { + if (keyEventLog.isLoggable(PlatformLogger.FINE)) { keyEventLog.fine("fire _TYPED on "+unicodeKey); + } postKeyEvent( java.awt.event.KeyEvent.KEY_TYPED, ev.get_time(), java.awt.event.KeyEvent.VK_UNDEFINED, unicodeKey, java.awt.event.KeyEvent.KEY_LOCATION_UNKNOWN,
*** 1169,1179 **** } public void handleKeyRelease(XEvent xev) { super.handleKeyRelease(xev); XKeyEvent ev = xev.get_xkey(); ! if (eventLog.isLoggable(PlatformLogger.FINE)) eventLog.fine(ev.toString()); if (isEventDisabled(xev)) { return; } handleKeyRelease(ev); } --- 1187,1199 ---- } public void handleKeyRelease(XEvent xev) { super.handleKeyRelease(xev); XKeyEvent ev = xev.get_xkey(); ! if (eventLog.isLoggable(PlatformLogger.FINE)) { ! eventLog.fine(ev.toString()); ! } if (isEventDisabled(xev)) { return; } handleKeyRelease(ev); }