[gui][PATCH] keyboard focus management updates

Thomas Fitzsimmons fitzsim@redhat.com
Fri May 7 05:10:00 GMT 2004


Hi,

This patch contains some updates to the focus management
implementation.  Java KeyEvents are now converted back to GDK key events
after they have passed through Java's focus managment system.  The patch
also contains other miscellaneous fixes.

Committed to java-gui-branch.

Tom

2004-05-06  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gnu/java/awt/peer/gtk/GtkComponentPeer.java
	(gtkWidgetRequestFocus): Mark protected.
	(GtkComponentPeer): Only set the peer's bounds if its component
	is valid.
	* java/awt/Component.java (static): Set the default keyboard
	focus manager.
	(requestFocus(), requestFocus(boolean), requestFocusInWindow(),
	requestFocusInWindow(temporary)): Don't request focus if the
	component is not showing.  Get tree lock before traversing
	component hierarchy.
	* java/awt/DefaultKeyboardFocusManager.java (dispatchEvent):
	Only set the global focus owner if it is not a Window.
	(processKeyEvent): Consume keystrokes associated with the focus
	traversal keystroke.
	(focusPreviousComponent, focusNextComponent, upFocusCycle,
	downFocusCycle): Call requestFocusInWindow instead of
	requestFocus.
	* java/awt/EventDispatchThread.java (run): Move setting of
	default keyboard focus manager to Component.java.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
	(awt_keycode_to_keysym): New function.
	(gtkWidgetDispatchKeyEvent): Finish implementation.
	* jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEvents.c
	(pre_event_handler): Add FIXME comment.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: focus-management-updates.patch
Type: text/x-patch
Size: 34752 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20040507/92bd895e/attachment.bin>


More information about the Java-patches mailing list