Question again …
After an application was launched by
shell.App.launch(), I connect the signal of
windows-changed, and call
metaWindow.move_resize_frame(false, x, y, width, height);
But the problem is that it can’t move and resize the window. Looks the window manager just ignore this operation. Bu if a window has existed for a long time (say maybe more than two seconds after showing in the workspace), calling
metaWindow.move_resize_frame(false, x, y, width, height); can move and resize the the window.
What’s wrong here? How can I know when an app’s window can be moved and resized by calling
metaWindow.move_resize_frame(false, x, y, width, height); after it was launched? Any solution for this issue?
Code is at https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager/pull/18 in case someone want to see the code. All relevant code is here: https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager/blob/bb0fbd0e4671809a8700a8ffb017932e01861773/moveSession.js#L73-L153.
Still need help.