(PR welcome for linux and Mac!)
This module allow you to set the window attached to the HWND handle to be placed at the lowest z-index available aka bottom-most
It's the inverse of top-most.
Electron indeed have a top-most property but do not have a bottom-most one.
This native module is a wrapper around SetWindowPosition Win32 API function.
npm i -S electron-bottom-most # install the module
./node_modules/.bin/electron-rebuild -f -w electron-bottom-most # rebuild the module to match your electron version
Look at the index.html, index.js and package.json file to integrate it into your Electron application
Basically it consists of 2 steps
- Include the module in your .js file:
import { SetBottomMost } from 'electron-bottom-most';
- or -
const { SetBottomMost } = require('electron-bottom-most');
- Create your Electron BrowserWindow
let mainWindow = new BrowserWindow({
height: 800,
width: 800,
useContentSize: true,
transparent: !isDev,
frame: isDev,
focusable: isDev,
show: false
});
// load it
mainWindow.loadURL(__dirname + "/index.html");
//show it
mainWindow.show();
// get the native HWND handle
let handle = mainWindow.getNativeWindowHandle();
// set bottom most!
SetBottomMost(handle);
- Make it safe please
- Armaldio - Armaldio
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details