Fix lots of warnings.
Incorporate changes from Andrey Mirtchovski.
This commit is contained in:
parent
64044a070a
commit
e62ba5ec0b
9 changed files with 58 additions and 25 deletions
|
|
@ -1,5 +1,6 @@
|
|||
/* Copyright (c) 1994-1996 David Hogan, see README for licence details */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xos.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
|
@ -9,6 +10,8 @@
|
|||
#include "dat.h"
|
||||
#include "fns.h"
|
||||
|
||||
int isNew;
|
||||
|
||||
int
|
||||
manage(Client *c, int mapped)
|
||||
{
|
||||
|
|
@ -25,7 +28,11 @@ manage(Client *c, int mapped)
|
|||
if (XGetClassHint(dpy, c->window, &class) != 0) { /* ``Success'' */
|
||||
c->instance = class.res_name;
|
||||
c->class = class.res_class;
|
||||
c->is9term = (strcmp(c->class, "9term") == 0);
|
||||
c->is9term = 0;
|
||||
if(isNew){
|
||||
c->is9term = strstr(c->class, "term") || strstr(c->class, "Term");
|
||||
isNew = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
c->instance = 0;
|
||||
|
|
@ -257,7 +264,7 @@ gravitate(Client *c, int invert)
|
|||
dy = 2*delta;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "9wm: bad window gravity %d for 0x%x\n", gravity, c->window);
|
||||
fprintf(stderr, "9wm: bad window gravity %d for 0x%x\n", gravity, (int)c->window);
|
||||
return;
|
||||
}
|
||||
dx += BORDER;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue