Skip to content

Commit

Permalink
adding clickthrough option (not fully baked)
Browse files Browse the repository at this point in the history
  • Loading branch information
catdad committed Apr 27, 2024
1 parent 433312b commit e3c1679
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ const minimize = () => void BrowserWindow.getFocusedWindow().minimize();

const close = () => void BrowserWindow.getFocusedWindow().close();

const clickthrough = () => {
const window = BrowserWindow.getFocusedWindow();

window.setIgnoreMouseEvents(true);
window.setAlwaysOnTop(true);
window.setOpacity(0.5);
};

module.exports = isomorphic({
name,
implementation: { close, minimize, maximizeToggle }
implementation: { close, minimize, maximizeToggle, clickthrough }
});

0 comments on commit e3c1679

Please sign in to comment.