Menu

#5 DOM_PAINT_EVENT parameters for x,y are always 0,0

open
None
5
2010-11-15
2010-11-12
Anonymous
No

I always seem to receive 0,0 as x,y in DOM_PAINT_EVENT. Shouldn't x,y be the same as the values received in NPP_SetWindow (in the window parameter)?

(The values for width and height in DOM_PAINT_EVENT are correct)

Discussion

  • Nobody/Anonymous

    Here is an typical debug output. Notice the values received during the NPP_SetWindow:

    0xb7fe16c0:ns_plugin[DEBUG] -- NP_GetValue()
    0xb7fe16c0:ns_plugin[DEBUG] -- NP_GetValue()
    0xb7fe16c0:ns_plugin[DEBUG] -- NP_GetMIMEDescription()
    0xb7fe16c0:ns_plugin[INFO] -- NPP_New.
    0xb7fe16c0:ns_plugin[DEBUG] -- NPN_GetValue(0x86ae5b8)
    0xb7fe16c0:ns_plugin[DEBUG] -- NPN_GetStringIdentifier()
    0xb7fe16c0:ns_plugin[DEBUG] -- NPN_GetProperty()
    0xb7fe16c0:ns_plugin[DEBUG] -- NPN_GetStringIdentifier()
    0xb7fe16c0:ns_plugin[DEBUG] -- NPN_GetProperty()
    0xb7fe16c0:ns_plugin[DEBUG] -- NPN_ReleaseVariantValue()
    0xb7fe16c0:ns_plugin[DEBUG] -- NPN_ReleaseObject()
    0xb7fe16c0:ns_plugin[DEBUG] -- NPN_ReleaseObject()
    0xb7fe16c0:ns_plugin[DEBUG] -- NPN_SetValue(0x86ae5b8)
    0xb7fe16c0:ns_plugin[INFO] -- NPP_SetWindow()
    0xb7fe16c0:ns_plugin[INFO] -- NPP_SetWindow() window:(nil) 250x221@(300,300)

    ... Now here comes the first DOM_PAINT_EVENT:

    0xb7fe16c0:ns_plugin[DEBUG] -- NPP_HandleEvent(0xbfffc450)
    0xb7fe16c0:ns_plugin[DEBUG] -- NPP_HandleEvent DOM_PAINT_EVENT 300x300@(0,0)

    ....

    Why is the x,y->0,0???

     
  • Philippe Jawich

    Philippe Jawich - 2010-11-15
    • assigned_to: nobody --> memmel2
     

Log in to post a comment.