summary refs log tree commit diff
path: root/client.c
diff options
context:
space:
mode:
authorjasper <jasper>2007-10-02 18:01:45 +0000
committerjasper <jasper>2007-10-02 18:01:45 +0000
commit56994282f007b8b5175f08eb3dfab40713f7e9b4 (patch)
treebcb7ceafdc93d19b0d72fb59edb09d4728ce5a1f /client.c
parent05848673965c20c4a0be4d3d0b024b75ba234e51 (diff)
downloadcwm-56994282f007b8b5175f08eb3dfab40713f7e9b4.tar.gz
cwm-56994282f007b8b5175f08eb3dfab40713f7e9b4.tar.xz
cwm-56994282f007b8b5175f08eb3dfab40713f7e9b4.zip
When cycling, only the end of the window names will be printed if the
name is too long. so show the beginning instead.

from Pierre Riteau <pierre.riteau at free.fr>

"looks correct" matthieu@
Diffstat (limited to 'client.c')
-rw-r--r--client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/client.c b/client.c
index b2a30bb..f21b114 100644
--- a/client.c
+++ b/client.c
@@ -705,6 +705,10 @@ client_cycleinfo(struct client_ctx *cc)
 	if ((diff = cc->geom.height - (y + h)) < 0)
 		y += diff;
 
+	/* Don't hide the beginning of the window names */
+	if (x < 0)
+		x = 0;
+
 	XReparentWindow(X_Dpy, sc->infowin, cc->win, 0, 0);
 	XMoveResizeWindow(X_Dpy, sc->infowin, x, y, w, h);
 	XMapRaised(X_Dpy, sc->infowin);