Bug 1176 - Misaligned Mousepointer and Window when using NEWT BCM VC IV on Raspberry Pi
: Misaligned Mousepointer and Window when using NEWT BCM VC IV on Raspberry Pi
Status: RESOLVED FIXED
: None
: Newt
: JogAmp
: embedded (show other bugs)
: 2.3.2
: embedded_arm linux
: P2 major
: Sven Gothel
:
:
:
 
Reported: 2015-07-17 02:55 CEST by Xerxes Rånby
Modified: 2015-09-27 01:30 CEST (History)
0 users

:
Type: DEFECT
SCM Refs:
a566a1b5a2828b38f1a5c4dfb215ab9b03e7acaa 1584cae39c6dca9e372000bb64534c881ebc3511 51268bc9874de7cc34dfe7741187238f7d46aafc
Workaround: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xerxes Rånby 2015-07-17 02:55:20 CEST
WindowImpl has a default position of 64,64
This caused a misaligned mousepointer and window
seen on the Raspberry Pi.

By overriding the default position to 0,0
we can workaround the issue for some use-cases:
https://github.com/xranby/jogl/commit/ee5171af3978702e442db4e7592c41ea8e5f7efa

We have analysed the bug and proposed ways to properly resolve it in the jogamp irc channel
http://jogamp.org/log/irc/jogamp_20150716145123.html#l209

(01:46:07) sgothel: [1] hence optional clamping of the position state (x, y) in the LinuxMouseTracker  - used by bcm to clamp to screen size
(01:46:45) sgothel: [2] our native bcm moveTo code shall reduce the dest-rect to avoid further artifacts (explicit clipping)
(01:47:14) sgothel: [3] our java bcm window code shall validate pos and size to not exceed screen size
Comment 1 Sven Gothel 2015-07-17 03:26:21 CEST
commit a566a1b5a2828b38f1a5c4dfb215ab9b03e7acaa
    Clamp window position and size to 0/0 and screen-size, 
    avoiding out-of screen window positions on BCM VC IV hardware
    
    Out of screen window positions on BCM VC IV hardware cause:
      - Misalignment of self-rendered mouse-pointer / window
        due to window-offset.
    
      - Artifacts when moving the mouse pointer partially
        out of screen.
    
    We still need to add the window position to rel. mouse-pointer position.

commit 1584cae39c6dca9e372000bb64534c881ebc3511
    Add window-position to window-relative mouse position in
    DisplayDriver.moveActivePointerIcon(..) call
Comment 2 Sven Gothel 2015-07-17 04:41:06 CEST
commit 51268bc9874de7cc34dfe7741187238f7d46aafc

Refine clamping of window position and size at native creation
    
- Refines commit a566a1b5a2828b38f1a5c4dfb215ab9b03e7acaa
    
- Issue clamping at 'canCreateNativeImpl()' instead of 'createNativeImpl()',
  allowing to define clamped position and size before utilizing these values
  at caller 'createNative()'.
  Otherwise a clamped position would cause to wait for the original position
  after 'createNativeImpl()'.
    
  This also allows to remove the positionChanged(..) / sizeChanged(..) calls in
  the native CreateWindow0() implementation.