{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/13290","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/13290/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/13290/comments","events_url":"https://api.github.com/repos/electron/electron/issues/13290/events","html_url":"https://github.com/electron/electron/pull/13290","id":333583137,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NzU4NTY3","number":13290,"title":"feat: BrowserWindow.getNormalBounds()","user":{"login":"emmkimme","id":14014607,"node_id":"MDQ6VXNlcjE0MDE0NjA3","avatar_url":"https://avatars2.githubusercontent.com/u/14014607?v=4","gravatar_id":"","url":"https://api.github.com/users/emmkimme","html_url":"https://github.com/emmkimme","followers_url":"https://api.github.com/users/emmkimme/followers","following_url":"https://api.github.com/users/emmkimme/following{/other_user}","gists_url":"https://api.github.com/users/emmkimme/gists{/gist_id}","starred_url":"https://api.github.com/users/emmkimme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmkimme/subscriptions","organizations_url":"https://api.github.com/users/emmkimme/orgs","repos_url":"https://api.github.com/users/emmkimme/repos","events_url":"https://api.github.com/users/emmkimme/events{/privacy}","received_events_url":"https://api.github.com/users/emmkimme/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-19T09:09:01Z","updated_at":"2018-08-24T21:33:30Z","closed_at":"2018-08-24T21:33:28Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/electron/electron/pulls/13290","html_url":"https://github.com/electron/electron/pull/13290","diff_url":"https://github.com/electron/electron/pull/13290.diff","patch_url":"https://github.com/electron/electron/pull/13290.patch"},"body":"•\tElectron version: master branch\r\n•\tOperating system: All\r\n\r\nWhen you have to serialize a layout of windows : position, size, state and visibility. If the window is in ‘maximized’ or ‘full-screen’ state, you have no way to get its bounds when restored.\r\nPurpose is to add a function which, whatever the state of window, returns the bounds of the window in normal state.\r\n\r\n**Proposal**\r\n\r\n     BrowserWindow.getBormalBounds(): Rectangle\r\nReturns Rectangle - Contains the window bounds of the normal state\r\n\r\n**Expected Behavior**\r\n\r\n     const w = new BrowserWindow({\r\n        width: 400,\r\n        height: 400\r\n      })\r\n     assertBoundsEqual(w.getBounds(),w.getNormalBounds())\r\n     const normalBounds = w.getBounds();\r\n\r\n      w.once('maximize', () => {\r\n        assertBoundsEqual(w.getNormalBounds(),normalBounds)\r\n      })\r\n      w.maximize()\r\n\r\nNote : I have been hesitating for a long time between getNormalBounds and getRestoredBounds (name of the internal Chromium function). But we are used to talk of minimized, maximized, full-screen and **normal** state (not restored or unmaximized) so I choose **normal**. Feel free to challenge this.\r\n\r\nNotes: Added a `getNormalBounds()` API to the `BrowserWindow` class to fetch window bounds while minimized.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/415888266","html_url":"https://github.com/electron/electron/pull/13290#issuecomment-415888266","issue_url":"https://api.github.com/repos/electron/electron/issues/13290","id":415888266,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTg4ODI2Ng==","user":{"login":"release-clerk[bot]","id":42386326,"node_id":"MDM6Qm90NDIzODYzMjY=","avatar_url":"https://avatars0.githubusercontent.com/in/16104?v=4","gravatar_id":"","url":"https://api.github.com/users/release-clerk%5Bbot%5D","html_url":"https://github.com/apps/release-clerk","followers_url":"https://api.github.com/users/release-clerk%5Bbot%5D/followers","following_url":"https://api.github.com/users/release-clerk%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/release-clerk%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/release-clerk%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/release-clerk%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/release-clerk%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/release-clerk%5Bbot%5D/repos","events_url":"https://api.github.com/users/release-clerk%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/release-clerk%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-08-24T21:33:30Z","updated_at":"2018-08-24T21:33:30Z","author_association":"NONE","body":"**Release Notes Persisted**\n\n> Added a `getNormalBounds()` API to the `BrowserWindow` class to fetch window bounds while minimized."}}
{"actor":{"display_login":"release-clerk"}}