<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1176</bug_id>
          
          <creation_ts>2015-07-17 02:55:20 +0200</creation_ts>
          <short_desc>Misaligned Mousepointer and Window when using NEWT BCM VC IV on Raspberry Pi</short_desc>
          <delta_ts>2015-09-27 01:30:24 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Newt</product>
          <component>embedded</component>
          <version>2.3.2</version>
          <rep_platform>embedded_arm</rep_platform>
          <op_sys>linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Xerxes Rånby">xerxes</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          
          
          <cf_type>DEFECT</cf_type>
          <cf_scm_refs>a566a1b5a2828b38f1a5c4dfb215ab9b03e7acaa
1584cae39c6dca9e372000bb64534c881ebc3511
51268bc9874de7cc34dfe7741187238f7d46aafc</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4783</commentid>
    <comment_count>0</comment_count>
    <who name="Xerxes Rånby">xerxes</who>
    <bug_when>2015-07-17 02:55:20 +0200</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4784</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-07-17 03:26:21 +0200</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4785</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2015-07-17 04:41:06 +0200</bug_when>
    <thetext>commit 51268bc9874de7cc34dfe7741187238f7d46aafc

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

    </bug>

</bugzilla>