Giter Site home page Giter Site logo

我有2个屏幕, 屏幕1 写代码, 屏幕2 放 app预览窗口,每次修改 主进程代码 后, 新生成的app 都会出现在屏幕1,并且会把焦点给切过去 about electron-vite-react HOT 2 CLOSED

shifenhutu avatar shifenhutu commented on May 27, 2024
我有2个屏幕, 屏幕1 写代码, 屏幕2 放 app预览窗口,每次修改 主进程代码 后, 新生成的app 都会出现在屏幕1,并且会把焦点给切过去

from electron-vite-react.

Comments (2)

brendan8c avatar brendan8c commented on May 27, 2024

I can't test this "I only have one screen", but maybe you need to look towards these values.
win.show() – Shows and gives focus to the window.
win.showInactive() – Shows the window but doesn't focus on it.
win.focusable – A boolean property that determines whether the window is focusable.

These changes are made to the vite.config.ts file.

  return {
    plugins: [
      electron({
        main: {
          focus: false,
          showInactive: true,
          // focusable: false,
          ****

from electron-vite-react.

shifenhutu avatar shifenhutu commented on May 27, 2024

thank you

from electron-vite-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.