RFR: 8306119: Many components respond to a mouse event by requesting focus without supplying the MOUSE_EVENT cause

Prasanta Sadhukhan psadhukhan at openjdk.org
Tue May 16 09:03:03 UTC 2023


Many Swing components request a focus transfer in response to a mouse event, but fail to supply a Cause when requesting focus. A focus event listener will find the cause to be UNKNOWN, but MOUSE_EVENT would be more appropriate. 
Fixed by adding MOUSE_EVENT cause to requestFocus() when it is called for mouse events...

-------------

Commit messages:
 - 8306119: Many components respond to a mouse event by requesting focus without supplying the MOUSE_EVENT cause

Changes: https://git.openjdk.org/jdk/pull/14004/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14004&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8306119
  Stats: 27 lines in 11 files changed: 9 ins; 0 del; 18 mod
  Patch: https://git.openjdk.org/jdk/pull/14004.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14004/head:pull/14004

PR: https://git.openjdk.org/jdk/pull/14004



More information about the client-libs-dev mailing list