[dev] [st PATCH] X geometry changes

From: <suckless_AT_dev97.com>
Date: Fri, 25 Apr 2014 21:52:15 +0300

From: Yuri Karaban <suckless_AT_dev97.com>

Hello,

Currently st does not follow X geometry specification. Implementation
is incomplete and partially broken:

- There is calculation of offset parameters, but these parameters are
  never saved in window manager hints. Therefore setting offsets has
  no effect.

- Instead of specifying initial geometry, current implementation locks
  window dimensions to specified geometry and window becomes
  unresizable.

- Current implementation interprets window dimensions as pixels, while
  common practice for text oriented applications (like terminals and
  editors) is to treat witdh and height as rows and columns.

  XWMGeometry(3) function is interpreting the width and height as
  multipliers for width increment and height increment hints.

  Also xwininfo(1) is showing geometry in rows and columns if window
  have resize increment hints.

  And finally width and height in pixels don't make sense for the
  window with discrete dimensions.


I suspect that suckless community is predominantly using tiling window
managers which by their nature is ignoring geometry hints. Therefore
those problems could be unnoticed.

I created a patch to address aforementioned problems. With this patch
it's possible to configure dimensions and placement like for any other
X application.

For example:

st -g 80x50+0+0 # open 80x50 window aligned to upper left corner
st -g 80x30-0-0 # open 80x30 window aligned to lower bottom corner
st -g 80x25+200-100 # open 80x25 window 200px from left and 100px from bottom

Yuri Karaban (1):
  Honor X geometry specifications

 st.c | 98 ++++++++++++++++++++++++++------------------------------------------
 1 file changed, 38 insertions(+), 60 deletions(-)

-- 
1.9.2
Received on Fri Apr 25 2014 - 20:52:15 CEST

This archive was generated by hypermail 2.3.0 : Fri Apr 25 2014 - 21:00:08 CEST