#9546: Refactor StyledEdit's new document window positioning code into shared. ----------------------+---------------------------- Reporter: mmadia | Owner: nobody Type: bug | Status: new Priority: normal | Milestone: R1 Component: Kits | Version: R1/Development Resolution: | Keywords: Blocked By: | Blocking: 8735 Has a Patch: 0 | Platform: All ----------------------+---------------------------- Description changed by mmadia: Old description: > StyleEdit contains code for cascading newly opened document windows. i.e. > (File -> New) or (CMD + N) will result in a new window that is drawn > slightly down and to the right. If enough new windows are created, > instead of spilling off the screen, the starting position will be at the > top of the screen. > > IIRC, the code is: http://cgit.haiku- > os.org/haiku/tree/src/apps/stylededit/StyledEditApp.cpp#n41 > > This functionality should be refactored and relocated into > src/kits/shared. That will allow other programs to make use of it, > creating a more consistent and uniform behavior. New description: StyleEdit contains code for cascading newly opened document windows. i.e. (File -> New) or (CMD + N) will result in a new window that is drawn slightly down and to the right. If enough new windows are created, instead of spilling off the screen, the starting position will be at the top of the screen. IIRC, the code is: http://cgit.haiku- os.org/haiku/tree/src/apps/stylededit/StyledEditApp.cpp#n41 This functionality should be refactored and relocated into src/kits/shared. That will allow other programs to make use of it, creating a more consistent and uniform behavior. (From ticket:8735#comment:5) axeld: You could either create the window first, and then do the cascading with the window as argument (which could could use to retrieve the decorator frame), or pass in the last opened (or even current) window as a reference to compute the offset from. -- -- Ticket URL: <http://dev.haiku-os.org/ticket/9546#comment:1> Haiku <http://dev.haiku-os.org> Haiku - the operating system.