Merge branch 'revert' into 'master'

truncate long window labels, maximized windows have no visible border, fix makefile

See merge request nilix/ryudo!1
This commit is contained in:
Iris Lightshard 2019-12-05 05:23:31 +00:00
commit 662e30eb40
3 changed files with 18 additions and 27 deletions

9
key.c
View file

@ -106,11 +106,8 @@ keypress(XKeyEvent *e)
int rightcode = XKeysymToKeycode(dpy, NEXTVIRT_KEY); int rightcode = XKeysymToKeycode(dpy, NEXTVIRT_KEY);
int leftcode = XKeysymToKeycode(dpy, PREVVIRT_KEY); int leftcode = XKeysymToKeycode(dpy, PREVVIRT_KEY);
static int scrw = 0; static XWindowAttributes ra;
static int scrh = 0; XGetWindowAttributes(dpy, DefaultRootWindow(dpy), &ra);
scrw = current->screen->width;
scrh = current->screen->height;
/* basic wm functionality */ /* basic wm functionality */
@ -123,7 +120,7 @@ keypress(XKeyEvent *e)
if (e->keycode == rcode && (e->state&SHORTCUTMOD) == (MODBITS)) if (e->keycode == rcode && (e->state&SHORTCUTMOD) == (MODBITS))
reshape(current, Button3, sweep, 0); reshape(current, Button3, sweep, 0);
if (e->keycode == mcode && (e->state&SHORTCUTMOD) == (MODBITS)) if (e->keycode == mcode && (e->state&SHORTCUTMOD) == (MODBITS))
quickreshape(current, -BORDER, -BORDER, scrw+BORDER, scrh+BORDER); quickreshape(current, -BORDER, -BORDER, ra.width + 2*BORDER, ra.height + 2*BORDER);
/* half snap */ /* half snap */
if (e->keycode == hcode && (e->state&SHORTCUTMOD) == (MODBITS)) if (e->keycode == hcode && (e->state&SHORTCUTMOD) == (MODBITS))

View file

@ -341,7 +341,8 @@ getcmaps(Client *c)
void void
setlabel(Client *c) setlabel(Client *c)
{ {
char *label, *p, *lc, i; char *label, *p, *lc;
int i;
if(c->iconname != 0) if(c->iconname != 0)
label = c->iconname; label = c->iconname;
@ -355,13 +356,13 @@ setlabel(Client *c)
label = "no label"; label = "no label";
if((p = index(label, ':')) != 0) if((p = index(label, ':')) != 0)
*p = '\0'; *p = '\0';
for (lc = label, i = 0; lc++, i++; *lc != 0){ for (i = 0, lc = label; *lc != '\0'; lc++, i++){
if (i >= 24) if (i >= 23){
{
label[22] = '~'; label[22] = '~';
label[23] = '\0'; label[23] = '\0';
} }
} }
c->label = label; c->label = label;
} }

View file

@ -1,8 +1 @@
if [ "x$WSYSTYPE" != xx11 ]; then
echo 'default:V: all'
echo
echo 'all install clean nuke:'
echo ' # WSYSTYPE is not x11, and ryudo is only for x11'
exit 0
fi
cat $PLAN9/src/mkmany cat $PLAN9/src/mkmany