This is a preliminary patch to provide a new winoption for setting the gravity. It's barely tested and I'm actually unsude if its work. So I'm looking for comments on this. Thanks.
I have not invented 'gravity'. Its long in X. If I understand it right (and I hope so) the normal gravity is NorthWest, i.e. top left corner. A new window will be placed there. Resize and Move requests will be made, so that the top/left corner of the window will stay at this position. If its NorthEast the top/right corner would stay at the same position.
I would like to have this, because my editor is in the top/right corner. and sometimes if I open a file with thousends of lines, the editor widens the window, so that all line numbers fit. With the correct gravity the window would move slightly to the left also, so that nothing is hidden on the right side.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
for icewm-1.2
Hello,
would you care to explain what Gravity actually is? Maybe using wording suitable for documentation?
I have not invented 'gravity'. Its long in X. If I understand it right (and I hope so) the normal gravity is NorthWest, i.e. top left corner. A new window will be placed there. Resize and Move requests will be made, so that the top/left corner of the window will stay at this position. If its NorthEast the top/right corner would stay at the same position.
I would like to have this, because my editor is in the top/right corner. and sometimes if I open a file with thousends of lines, the editor widens the window, so that all line numbers fit. With the correct gravity the window would move slightly to the left also, so that nothing is hidden on the right side.
You can test this with a tool from the metacity package: src/wm-tester/test-gravity
I have learned a little more: the window position is not effected by the gravity only resize requests.