8000 hookWindowMessage callback not called on all window messages · Issue #7746 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
hookWindowMessage callback not called on all window messages #7746
Closed
@aknuth

Description

@aknuth
  • Electron version: 1.4.4
  • Operating system: windows / all

let's take e.g. mouse input notifications - according to the microsoft reference the following is defined:

#define WM_LBUTTONDOWN                  0x0201
#define WM_LBUTTONUP                    0x0202

I translated this into electron code:

 mainWindow.hookWindowMessage(513, (wParam,lParam) =>{
    var x = lParam[0]+256*lParam[1];
    var y = lParam[2]+256*lParam[3];
    console.log('mousedown:'+x+':'+y);
})
mainWindow.hookWindowMessage(514, (wParam,lParam) =>{
    var x = lParam[0]+256*lParam[1];
    var y = lParam[2]+256*lParam[3];
    console.log('mouseup:'+x+':'+y);
})

I would expect to get both hooks called, but only the mouseup one is called.
Do I misunderstand anything ?

Another interesting behaviour about mousemove:

#define WM_MOUSEMOVE                    0x0200
mainWindow.hookWindowMessage(512, (wParam,lParam) =>{
        var x = lParam[0]+256*lParam[1]; //& 0xFFFF;
        var y = lParam[2]+256*lParam[3];
        console.log('move:'+x+':'+y);
})

This one is called only if the mouse keeps clicked (left button, right button, anyway). I'd expect it to be called on every mouse move no matter if the mouse is clicked.

thanks a lot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0