-
Notifications
You must be signed in to change notification settings - Fork 15.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle a nil backgroundColor in win.getBackgroundColor() (#28186)
* fix: handle a nil backgroundColor in win.getBackgroundColor() * spec: add crash case * fix: update to fix native_views transparent color * chore: fix lint Co-authored-by: Samuel Attard <sattard@slack-corp.com> Co-authored-by: Samuel Attard <sam@electronjs.org>
- Loading branch information
1 parent
592430f
commit b740cd2
Showing
3 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
spec-main/fixtures/crash-cases/transparent-window-get-background-color/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const { app, BrowserWindow } = require('electron'); | ||
|
||
function createWindow () { | ||
// Create the browser window. | ||
const mainWindow = new BrowserWindow({ | ||
transparent: true | ||
}); | ||
mainWindow.getBackgroundColor(); | ||
} | ||
|
||
app.on('ready', () => { | ||
createWindow(); | ||
setTimeout(() => app.quit()); | ||
}); |