Hello!

I am playing with the ion3 source code and I added (in convert_geom)
the possibility to align the client window on the left or right edge
of the region if it is smaller than the region (because of sizehints,...).

Why: I wanted my XTerms to end up exactly on the right edge of my screen,
so I can "throw" the mouse against the right edge and it ends up on the
scrollbar. Makes scrolling (without wheel) much more practical, too bad that
the firefox scrollbar has a non-zero border (which I consider a usability bug).

My question is: What would be the best way to make this window alignment
configurable (left,right,center,...)? Should window gravity be used for that? 
Or Lua?

I would happily expand my hack to something that's useful for other
people. I attach the darcs whatsnew of my current hack.

best regards
-Edwin

What's new in "ioncore/activity.c" "ioncore/activity.h" "ioncore/attach.c" 
"ioncore/attach.h" "ioncore/binding.c" "ioncore/binding.h" "ioncore/bindmaps.c" 
"ioncore/bindmaps.h" "ioncore/classes.h" "ioncore/clientwin.c" 
"ioncore/clientwin.h" "ioncore/colormap.c" "ioncore/colormap.h" 
"ioncore/common.h" "ioncore/conf-bindings.c" "ioncore/conf-bindings.h" 
"ioncore/conf.c" "ioncore/conf.h" "ioncore/cursor.c" "ioncore/cursor.h" 
"ioncore/dummywc.h" "ioncore/event.c" "ioncore/event.h" "ioncore/eventh.c" 
"ioncore/eventh.h" "ioncore/exec.c" "ioncore/exec.h" "ioncore/exports.c" 
"ioncore/extlconv.c" "ioncore/extlconv.h" "ioncore/extlrx.c" "ioncore/focus.c" 
"ioncore/focus.h" "ioncore/frame-draw.c" "ioncore/frame-draw.h" 
"ioncore/frame-pointer.c" "ioncore/frame-pointer.h" "ioncore/frame.c" 
"ioncore/frame.h" "ioncore/framep.h" "ioncore/fullscreen.c" 
"ioncore/fullscreen.h" "ioncore/genws.c" "ioncore/genws.h" "ioncore/global.h" 
"ioncore/gr.c" "ioncore/gr.h" "ioncore/grab.c" "ioncore/grab.h" 
"ioncore/hooks.c" "ioncore/hooks.h" "ioncore/infowin.c" "ioncore/infowin.h" 
"ioncore/ioncore.c" "ioncore/ioncore.h" "ioncore/kbresize.c" 
"ioncore/kbresize.h" "ioncore/key.c" "ioncore/key.h" "ioncore/manage.c" 
"ioncore/manage.h" "ioncore/modules.c" "ioncore/modules.h" "ioncore/mplex.c" 
"ioncore/mplex.h" "ioncore/mplexp.h" "ioncore/mplexpholder.c" 
"ioncore/mplexpholder.h" "ioncore/mwmhints.c" "ioncore/mwmhints.h" 
"ioncore/names.c" "ioncore/names.h" "ioncore/netwm.c" "ioncore/netwm.h" 
"ioncore/pholder.c" "ioncore/pholder.h" "ioncore/pointer.c" "ioncore/pointer.h" 
"ioncore/presize.c" "ioncore/presize.h" "ioncore/property.c" 
"ioncore/property.h" "ioncore/rectangle.c" "ioncore/rectangle.h" 
"ioncore/regbind.c" "ioncore/regbind.h" "ioncore/reginfo.c" "ioncore/reginfo.h" 
"ioncore/region-iter.h" "ioncore/region.c" "ioncore/region.h" 
"ioncore/resize.c" "ioncore/resize.h" "ioncore/rootwin.c" "ioncore/rootwin.h" 
"ioncore/saveload.c" "ioncore/saveload.h" "ioncore/screen.c" "ioncore/screen.h" 
"ioncore/selection.c" "ioncore/selection.h" "ioncore/sizehint.c" 
"ioncore/sizehint.h" "ioncore/strings.c" "ioncore/strings.h" "ioncore/tags.c" 
"ioncore/tags.h" "ioncore/window.c" "ioncore/window.h" "ioncore/xic.c" 
"ioncore/xic.h" "ioncore/xwindow.c" "ioncore/xwindow.h":

{
hunk ./ioncore/clientwin.c 1028
+    bool left=FALSE;
+    bool right=FALSE;
hunk ./ioncore/clientwin.c 1054
-    geom->x=max_geom->x+max_geom->w/2-geom->w/2;
+    right=TRUE;
+
+    if (left)
+       geom->x=max_geom->x;
+    else if (right)
+       geom->x=max_geom->x+max_geom->w-geom->w;
+    else
+       geom->x=max_geom->x+max_geom->w/2-geom->w/2;
}

Reply via email to