Use Accessibility. There's a utility called Moom that does that. That's the only way an outside app can move some of my windows, because the window positioning code path is convoluted - consider just what's involved in moving a window whose position comes from the OS inside a virtual machine.
Even normal apps may get confused at a move that doesn't come in via expected channels. ----- Original Message ----- From: "Rick Mann" <rm...@latencyzero.com> To: "Cocoa-Dev List" <cocoa-dev@lists.apple.com> Sent: Saturday, July 28, 2012 7:50:00 PM Subject: Repositioning another app's windows? Hi. I frequently add and remove external monitors from my laptop. Each time I do this, the windows all get rearranged. I wonder if it's not possible to write an agent that listens for screen geometry changes, and repositions app windows in the right place each time a monitor is added or removed. If this utility already exists, I'd love to hear about it. If not, is there a reliable way to get at all the windows currently instantiated, and determine which they are? I've looked briefly at the accessibility APIs, and that might do the trick. But I wonder if there's not another way I should consider. I know I can listen for screen geometry changes, I've done it before (gonna have to dig up that code). Thanks! -- Rick _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/lrucker%40vmware.com This email sent to lruc...@vmware.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com