MarshallOfSound / Google-Play-Music-Desktop-Player-UNOFFICIAL-

A beautiful cross platform Desktop Player for Google Play Music
https://www.googleplaymusicdesktopplayer.com
MIT License
8.27k stars 767 forks source link

Side buttons of mouse not working #2081

Closed bendardenne closed 7 years ago

bendardenne commented 7 years ago

Hi,

I have seen several closed issues about this and it was supposed to be fixed at the time (Aug 2016 - #1429 #1425 #1423 #1442 ), however I can still replicate under 4.0.5 (Linux).

Issue is still the same: side buttons do nothing.

Thanks

jostrander commented 7 years ago

So for linux this was kind of a hack because nothing existed to grab these in chromium itself or electron. It specifically targets mouse buttons 8 and 9, so if you can test your buttons to see if that's what they are reporting that would help.

bendardenne commented 7 years ago

They do map to buttons 8 and 9 indeed.

ButtonPress event, serial 32, synthetic NO, window 0x5200001,
    root 0x2f5, subw 0x0, time 24853249, (372,454), root:(1336,494),
    state 0x10, button 8, same_screen YES

ButtonPress event, serial 32, synthetic NO, window 0x5200001,
    root 0x2f5, subw 0x0, time 24854289, (372,454), root:(1336,494),
    state 0x10, button 9, same_screen YES
jostrander commented 7 years ago

Not sure how savvy you are, but care to try and test the native library itself? https://github.com/jostrander/mouse-forward-back

On Fri, Jan 6, 2017 at 10:05 AM, Benoît Dardenne notifications@github.com wrote:

They do map to buttons 8 and 9 indeed.

ButtonPress event, serial 32, synthetic NO, window 0x5200001, root 0x2f5, subw 0x0, time 24853249, (372,454), root:(1336,494), state 0x10, button 8, same_screen YES

ButtonPress event, serial 32, synthetic NO, window 0x5200001, root 0x2f5, subw 0x0, time 24854289, (372,454), root:(1336,494), state 0x10, button 9, same_screen YES

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/issues/2081#issuecomment-270921895, or mute the thread https://github.com/notifications/unsubscribe-auth/AAucnUXgJoS77WhyXwzCQNifT2LWngnjks5rPlhMgaJpZM4Lcx_i .

bendardenne commented 7 years ago

Sure. I'm currently at work, I'll have a look this evening.

bendardenne commented 7 years ago

Trying to get a small test app running but I can't seem to get mouse-forward-back to play nice with electron:

App threw an error during load
Error: Module version mismatch. Expected 50, got 46. at Error (native) at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20) at Object.Module._extensions..node (module.js:583:18) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Module.require (module.js:483:17) at require (internal/module.js:20:19) at bindings (/home/bdardenn/test-mouse/node_modules/bindings/bindings.js:76:44) `

MarshallOfSound commented 7 years ago

@bendardenne You need to install and run electron-rebuild on your test app folder.

bendardenne commented 7 years ago

I tried that, I get a syntax error:

% ./node_modules/.bin/electron-rebuild /home/bdardenn/test-mouse/node_modules/spawn-rx/lib/index.js:139 let cmdArgs = ['/C', exe, ...args]; ^^^

SyntaxError: Unexpected token ...

MarshallOfSound commented 7 years ago

You need node.js v6+ for electron-rebuild

bendardenne commented 7 years ago

Upgraded to v6.9.4, "Rebuild complete" but sill module version mismatch.

I tried reinstalling both electron and mouse-forward-back and now I get "Error: Module version mismatch. Expected 50, got 48"

MarshallOfSound commented 7 years ago

Ensure that mouse-forward-back is declared as a prod dependency in your package.json and then run electron-rebuild again.

bendardenne commented 7 years ago

Alright, it's working thanks for the help.

I get : Error 10 (BadAccess (attempt to access private resource denied)): request 28.0 Error 10 (BadAccess (attempt to access private resource denied)): request 28.0

Which is also present on the output of GPMDP.

jostrander commented 7 years ago

That doesn't sound good. Is that only when you click the buttons or upon startup?

bendardenne commented 7 years ago

Upon startup.

jostrander commented 7 years ago

@MarshallOfSound The XLib docs state:

If some other client has issued a XGrabKey() with the same key combination on the same window, a BadAccess error results. When using AnyModifier or AnyKey, the request fails completely, and a BadAccess error results (no grabs are established) if there is a conflicting grab for any combination.

Did electron implement native button 8/9 binding?

MarshallOfSound commented 7 years ago

I do not believe so, I may have missed it or it might have slipped through in a Chromium update

MarshallOfSound commented 7 years ago

@jostrander Is there a resolution path for this issue or are we dead in the water?

jostrander commented 7 years ago

If this is broken in the test app as well, we can test with older versions of electron until we find one that works and see what changed, otherwise we'll need more system specific info to see if its an edge case.

bendardenne commented 7 years ago

I have been able to go back to 1.3.1 and the problem was already there. What information would you like me to provide?

MarshallOfSound commented 7 years ago

This issue has been marked as awaiting response for over a month so I'll be closing it out as it appears to have stalled out. If this issue gets more active I will reopen below 👍