Open new window offset from last focused window (#573)#576
Open new window offset from last focused window (#573)#576albinekb wants to merge 1 commit intovercel:masterfrom albinekb:new-window
Conversation
|
Looking good, one small tweak if possible, when you do "New Window" multiple times in a row (strange use case I realise) it keeps opening in the same spot. The focused window needs to be set to the newly opened one. |
|
We could simply trigger |
|
@lordgiotto yeah agreed |
|
@MrRio We should make another PR to keep commit history clean? Or we could append this modification to this PR? |
|
Ok, I just realized that's not the problem: on window creation |
|
I've fixed it in another PR :) |
|
The issue is that the onFocus event doesn't fire, which doesn't update the time used by getLastFocusedWindow |
|
Yeah, it's called on init rpc event, that triggers after session is created and everything in borwserWindow is initialized. I'll comment on your new PR thought, i've a suggestion about encapsulation :) |
|
Fixed in #581 |
When clicking "new window" in the dock, no window is focused, thus opening it at the same position as the old window.
This PR will make it use our awesome
getLastFocusedWindowso that it will work as expected even if no window is focused.Fixes #573