Skip to content

Instantly share code, notes, and snippets.

View ahkohd's full-sized avatar
🔨
building

Victor Aremu ahkohd

🔨
building
View GitHub Profile
@ahkohd
ahkohd / render.js
Last active November 14, 2018 10:58
Work Around for Electron.JS Frameless window White Bar Bug After Maximize Cycle render process code snippet. https://medium.com/@victoraremu/fix-electron-js-frameless-window-white-bar-bug-after-maximize-cycle-fc1c59f4758c
import { remote, screen, ipcRenderer } from 'electron';
// …
customMaximize()
 {
// windows dimension and positon {width, height, x, y}
let resDetails = remote.getCurrentWindow().getBounds();
// use ipcRender to send custom-resize event to main thread to invoke the custom resize event handler to resize the window….
@ahkohd
ahkohd / main.js
Last active November 14, 2018 11:06
Work around for Electron.JS Frameless window White Bar Bug After Maximize Cycle main thread custom maximize and restore event handler. main.js/electron.js https://medium.com/@victoraremu/fix-electron-js-frameless-window-white-bar-bug-after-maximize-cycle-fc1c59f4758c
const {ipcMain} = require('electron');
// to store the restore window screen width and height and position…
let restoreWindowSave;
//...
function createWindow () {
// Create the browser window logics.
let win = new BrowserWindow({ width: 800, height: 600 });