mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-04 19:46:53 +00:00
setInitialPosition: Always set the initial position for new windows
Since it's too early to set the position on `window-added` we do it in `setInitialPosition` when the window actor is known to exist.
This commit is contained in:
@@ -303,12 +303,15 @@ function setInitialPosition(actor, existing) {
|
||||
return;
|
||||
}
|
||||
let space = spaces.spaceOfWindow(metaWindow);
|
||||
|
||||
// Only move the frame when dealing with new windows
|
||||
!existing && metaWindow.move_frame(true,
|
||||
metaWindow.scrollwm_initial_position.x,
|
||||
metaWindow.scrollwm_initial_position.y);
|
||||
|
||||
|
||||
if (metaWindow.has_focus()) {
|
||||
space.selectedWindow = metaWindow;
|
||||
// Only move the frame when dealing with new windows
|
||||
!existing && metaWindow.move_frame(true,
|
||||
metaWindow.scrollwm_initial_position.x,
|
||||
metaWindow.scrollwm_initial_position.y)
|
||||
ensure_viewport(space, metaWindow, true);
|
||||
} else {
|
||||
move_to(space, metaWindow,
|
||||
|
||||
Reference in New Issue
Block a user