Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

294
Views
Electron: ¿agregar un oyente de clics cuando setIgnoreMouseEvents se establece en verdadero?

¿Alguien sabe si es posible capturar eventos de clic con Electron cuando setIgnoreMouseEvents es verdadero? Estoy usando Electron como una superposición transparente, reenviando los clics a una aplicación en segundo plano. Cuando la aplicación en segundo plano recibe un clic, me gustaría actualizar la aplicación Electron, pero el detector de clics no se activa. Aquí está el código:

índice.js

 const electron = require('electron'); const fetch = require('electron-fetch').default const { app, BrowserWindow, session } = require('electron') function createWindow () { const win = new BrowserWindow({ width: 3840, height: 2160, x: 0, y: 0, transparent: true, frame: false, alwaysOnTop: true, focusable: false, webPreferences: { nodeIntegration: true, enableRemoteModule: true, contextIsolation: false, } }) win.setFocusable(false); win.setIgnoreMouseEvents(true, { forward: true }), // forward clicks to background application win.webContents.openDevTools(); win.loadFile('index.html') } app.on('ready', () => { console.log('app is now ready'); createWindow(); });

índice.js

 const electron = require('electron'); const remote = require("electron").remote; let win = remote.getCurrentWindow(); window.addEventListener("mousemove", event => { console.log("mouse movements are detected") }); window.addEventListener("click", event => { console.log("how can I get this log statement to print in the console?") // never fires });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!