Summary: | Newt and Java focus gained and lost events are inconsistent | ||
---|---|---|---|
Product: | [JogAmp] Newt | Reporter: | Jesse <narf_bro> |
Component: | windows | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | narf_bro |
Priority: | P5 | ||
Version: | 1 | ||
Hardware: | pc_x86_64 | ||
OS: | windows | ||
Type: | --- | SCM Refs: |
0be87f241c0f0b2f5881d9a602ce12378b8e453d
|
Workaround: | --- | ||
Bug Depends on: | 879 | ||
Bug Blocks: |
Description
Jesse
2013-11-05 16:41:32 CET
AWT [ NewtCanvasAWT.GLWindow ]: (Not a bug) The problem about temp. loosing and re-gaining focus is well known and more related how we implement focus traversal between GLWindow and the underlying AWT 'tree'. If the GLWindow requires the focus, we need to give it's AWT component the focus first - then steal it back and transfer it to GLWindow. This allows focus traversal back / forth within the AWT tree, while allowing GLWindow using the focus. We maybe able to review the current code .. hence I keep this bug open as an earmark. Due to a focus traversal change we lately made, maybe it's possible to avoid the focus ping-pong between AWT/GLWindow. But this is a tedious validation process. Is it simpler to just not issue the focusGained/Lost events in the case you described, rather than change the underlying functionality? If I have the GLWindow already focused I would not expect that it would issue a lose/regain focus event on every click, since it conceptually never lost focus. As it stands now, if I want to do something simple like shut off sounds in the game when the user clicks away from the window, I cannot reliably use focusGained/Lost, because they issue even if I have clicked within the window. |