Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
This commit is contained in:
parent
77a0a5b519
commit
fa325e9b42
1021 changed files with 5688 additions and 6193 deletions
|
|
@ -19,7 +19,7 @@ setactive(Client *c, int on)
|
|||
|
||||
if(c->parent == c->screen->root)
|
||||
return;
|
||||
|
||||
|
||||
if(on){
|
||||
XUngrabButton(dpy, AnyButton, AnyModifier, c->parent);
|
||||
XSetInputFocus(dpy, c->window, RevertToPointerRoot, timestamp());
|
||||
|
|
@ -254,7 +254,7 @@ void
|
|||
shuffle(int up)
|
||||
{
|
||||
Client **l, *c;
|
||||
|
||||
|
||||
if(clients == 0 || clients->next == 0)
|
||||
return;
|
||||
if(!up){
|
||||
|
|
@ -282,4 +282,3 @@ shuffle(int up)
|
|||
/* top(clients); */
|
||||
/* active(clients); */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,4 +42,3 @@ colorpixel(Display *dpy, ScreenInfo *s, int depth, unsigned long rgb, unsigned l
|
|||
return rgb;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,15 +16,15 @@ typedef struct {
|
|||
Cursordata bigarrow = {
|
||||
16,
|
||||
{0, 0},
|
||||
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x3F,
|
||||
0xFF, 0x0F, 0xFF, 0x0F, 0xFF, 0x1F, 0xFF, 0x3F,
|
||||
0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x3F,
|
||||
0xCF, 0x1F, 0x8F, 0x0F, 0x07, 0x07, 0x03, 0x02,
|
||||
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x3F,
|
||||
0xFF, 0x0F, 0xFF, 0x0F, 0xFF, 0x1F, 0xFF, 0x3F,
|
||||
0xFF, 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0x3F,
|
||||
0xCF, 0x1F, 0x8F, 0x0F, 0x07, 0x07, 0x03, 0x02,
|
||||
},
|
||||
{ 0x00, 0x00, 0xFE, 0x7F, 0xFE, 0x3F, 0xFE, 0x0F,
|
||||
0xFE, 0x07, 0xFE, 0x07, 0xFE, 0x0F, 0xFE, 0x1F,
|
||||
0xFE, 0x3F, 0xFE, 0x7F, 0xFE, 0x3F, 0xCE, 0x1F,
|
||||
0x86, 0x0F, 0x06, 0x07, 0x02, 0x02, 0x00, 0x00,
|
||||
{ 0x00, 0x00, 0xFE, 0x7F, 0xFE, 0x3F, 0xFE, 0x0F,
|
||||
0xFE, 0x07, 0xFE, 0x07, 0xFE, 0x0F, 0xFE, 0x1F,
|
||||
0xFE, 0x3F, 0xFE, 0x7F, 0xFE, 0x3F, 0xCE, 0x1F,
|
||||
0x86, 0x0F, 0x06, 0x07, 0x02, 0x02, 0x00, 0x00,
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -198,7 +198,7 @@ ScreenInfo *s;
|
|||
s->root_pixmap = XCreatePixmapFromBitmapData(dpy,
|
||||
s->root, grey_bits, grey_width, grey_height,
|
||||
s->black, s->white, s->depth);
|
||||
|
||||
|
||||
s->bordcurs[BorderN] = XCreateFontCursor(dpy, 138);
|
||||
s->bordcurs[BorderNNE] = XCreateFontCursor(dpy, 136);
|
||||
s->bordcurs[BorderENE] = s->bordcurs[BorderNNE] ;
|
||||
|
|
@ -254,121 +254,121 @@ Cursor sightcursor = {
|
|||
|
||||
Cursor whitearrow = {
|
||||
{0, 0},
|
||||
{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFC,
|
||||
0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF8, 0xFF, 0xFC,
|
||||
0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFC,
|
||||
{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFC,
|
||||
0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF8, 0xFF, 0xFC,
|
||||
0xFF, 0xFE, 0xFF, 0xFF, 0xFF, 0xFE, 0xFF, 0xFC,
|
||||
0xF3, 0xF8, 0xF1, 0xF0, 0xE0, 0xE0, 0xC0, 0x40, },
|
||||
{0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x06, 0xC0, 0x1C,
|
||||
0xC0, 0x30, 0xC0, 0x30, 0xC0, 0x38, 0xC0, 0x1C,
|
||||
0xC0, 0x0E, 0xC0, 0x07, 0xCE, 0x0E, 0xDF, 0x1C,
|
||||
{0xFF, 0xFF, 0xFF, 0xFF, 0xC0, 0x06, 0xC0, 0x1C,
|
||||
0xC0, 0x30, 0xC0, 0x30, 0xC0, 0x38, 0xC0, 0x1C,
|
||||
0xC0, 0x0E, 0xC0, 0x07, 0xCE, 0x0E, 0xDF, 0x1C,
|
||||
0xD3, 0xB8, 0xF1, 0xF0, 0xE0, 0xE0, 0xC0, 0x40, }
|
||||
};
|
||||
|
||||
Cursor query = {
|
||||
{-7,-7},
|
||||
{0x0f, 0xf0, 0x1f, 0xf8, 0x3f, 0xfc, 0x7f, 0xfe,
|
||||
0x7c, 0x7e, 0x78, 0x7e, 0x00, 0xfc, 0x01, 0xf8,
|
||||
0x03, 0xf0, 0x07, 0xe0, 0x07, 0xc0, 0x07, 0xc0,
|
||||
{0x0f, 0xf0, 0x1f, 0xf8, 0x3f, 0xfc, 0x7f, 0xfe,
|
||||
0x7c, 0x7e, 0x78, 0x7e, 0x00, 0xfc, 0x01, 0xf8,
|
||||
0x03, 0xf0, 0x07, 0xe0, 0x07, 0xc0, 0x07, 0xc0,
|
||||
0x07, 0xc0, 0x07, 0xc0, 0x07, 0xc0, 0x07, 0xc0, },
|
||||
{0x00, 0x00, 0x0f, 0xf0, 0x1f, 0xf8, 0x3c, 0x3c,
|
||||
0x38, 0x1c, 0x00, 0x3c, 0x00, 0x78, 0x00, 0xf0,
|
||||
0x01, 0xe0, 0x03, 0xc0, 0x03, 0x80, 0x03, 0x80,
|
||||
{0x00, 0x00, 0x0f, 0xf0, 0x1f, 0xf8, 0x3c, 0x3c,
|
||||
0x38, 0x1c, 0x00, 0x3c, 0x00, 0x78, 0x00, 0xf0,
|
||||
0x01, 0xe0, 0x03, 0xc0, 0x03, 0x80, 0x03, 0x80,
|
||||
0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, }
|
||||
};
|
||||
|
||||
Cursor tl = {
|
||||
{-4, -4},
|
||||
{0xfe, 0x00, 0x82, 0x00, 0x8c, 0x00, 0x87, 0xff,
|
||||
0xa0, 0x01, 0xb0, 0x01, 0xd0, 0x01, 0x11, 0xff,
|
||||
0x11, 0x00, 0x11, 0x00, 0x11, 0x00, 0x11, 0x00,
|
||||
{0xfe, 0x00, 0x82, 0x00, 0x8c, 0x00, 0x87, 0xff,
|
||||
0xa0, 0x01, 0xb0, 0x01, 0xd0, 0x01, 0x11, 0xff,
|
||||
0x11, 0x00, 0x11, 0x00, 0x11, 0x00, 0x11, 0x00,
|
||||
0x11, 0x00, 0x11, 0x00, 0x11, 0x00, 0x1f, 0x00, },
|
||||
{0x00, 0x00, 0x7c, 0x00, 0x70, 0x00, 0x78, 0x00,
|
||||
0x5f, 0xfe, 0x4f, 0xfe, 0x0f, 0xfe, 0x0e, 0x00,
|
||||
0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00,
|
||||
{0x00, 0x00, 0x7c, 0x00, 0x70, 0x00, 0x78, 0x00,
|
||||
0x5f, 0xfe, 0x4f, 0xfe, 0x0f, 0xfe, 0x0e, 0x00,
|
||||
0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00,
|
||||
0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x00, 0x00, }
|
||||
};
|
||||
|
||||
Cursor t = {
|
||||
{-7, -8},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x06, 0xc0,
|
||||
0x1c, 0x70, 0x10, 0x10, 0x0c, 0x60, 0xfc, 0x7f,
|
||||
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0xff, 0xff,
|
||||
{0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x06, 0xc0,
|
||||
0x1c, 0x70, 0x10, 0x10, 0x0c, 0x60, 0xfc, 0x7f,
|
||||
0x80, 0x01, 0x80, 0x01, 0x80, 0x01, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||
0x03, 0x80, 0x0f, 0xe0, 0x03, 0x80, 0x03, 0x80,
|
||||
0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x00, 0x00,
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
|
||||
0x03, 0x80, 0x0f, 0xe0, 0x03, 0x80, 0x03, 0x80,
|
||||
0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }
|
||||
};
|
||||
|
||||
Cursor tr = {
|
||||
{-11, -4},
|
||||
{0x00, 0x7f, 0x00, 0x41, 0x00, 0x31, 0xff, 0xe1,
|
||||
0x80, 0x05, 0x80, 0x0d, 0x80, 0x0b, 0xff, 0x88,
|
||||
0x00, 0x88, 0x0, 0x88, 0x00, 0x88, 0x00, 0x88,
|
||||
{0x00, 0x7f, 0x00, 0x41, 0x00, 0x31, 0xff, 0xe1,
|
||||
0x80, 0x05, 0x80, 0x0d, 0x80, 0x0b, 0xff, 0x88,
|
||||
0x00, 0x88, 0x0, 0x88, 0x00, 0x88, 0x00, 0x88,
|
||||
0x00, 0x88, 0x00, 0x88, 0x00, 0x88, 0x00, 0xf8, },
|
||||
{0x00, 0x00, 0x00, 0x3e, 0x00, 0x0e, 0x00, 0x1e,
|
||||
0x7f, 0xfa, 0x7f, 0xf2, 0x7f, 0xf0, 0x00, 0x70,
|
||||
0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70,
|
||||
{0x00, 0x00, 0x00, 0x3e, 0x00, 0x0e, 0x00, 0x1e,
|
||||
0x7f, 0xfa, 0x7f, 0xf2, 0x7f, 0xf0, 0x00, 0x70,
|
||||
0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70,
|
||||
0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x00, }
|
||||
};
|
||||
|
||||
Cursor r = {
|
||||
{-8, -7},
|
||||
{0x07, 0xc0, 0x04, 0x40, 0x04, 0x40, 0x04, 0x58,
|
||||
0x04, 0x68, 0x04, 0x6c, 0x04, 0x06, 0x04, 0x02,
|
||||
0x04, 0x06, 0x04, 0x6c, 0x04, 0x68, 0x04, 0x58,
|
||||
{0x07, 0xc0, 0x04, 0x40, 0x04, 0x40, 0x04, 0x58,
|
||||
0x04, 0x68, 0x04, 0x6c, 0x04, 0x06, 0x04, 0x02,
|
||||
0x04, 0x06, 0x04, 0x6c, 0x04, 0x68, 0x04, 0x58,
|
||||
0x04, 0x40, 0x04, 0x40, 0x04, 0x40, 0x07, 0xc0, },
|
||||
{0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80,
|
||||
0x03, 0x90, 0x03, 0x90, 0x03, 0xf8, 0x03, 0xfc,
|
||||
0x03, 0xf8, 0x03, 0x90, 0x03, 0x90, 0x03, 0x80,
|
||||
{0x00, 0x00, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80,
|
||||
0x03, 0x90, 0x03, 0x90, 0x03, 0xf8, 0x03, 0xfc,
|
||||
0x03, 0xf8, 0x03, 0x90, 0x03, 0x90, 0x03, 0x80,
|
||||
0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00, }
|
||||
};
|
||||
|
||||
Cursor br = {
|
||||
{-11, -11},
|
||||
{0x00, 0xf8, 0x00, 0x88, 0x00, 0x88, 0x00, 0x88,
|
||||
0x00, 0x88, 0x00, 0x88, 0x00, 0x88, 0x00, 0x88,
|
||||
0xff, 0x88, 0x80, 0x0b, 0x80, 0x0d, 0x80, 0x05,
|
||||
{0x00, 0xf8, 0x00, 0x88, 0x00, 0x88, 0x00, 0x88,
|
||||
0x00, 0x88, 0x00, 0x88, 0x00, 0x88, 0x00, 0x88,
|
||||
0xff, 0x88, 0x80, 0x0b, 0x80, 0x0d, 0x80, 0x05,
|
||||
0xff, 0xe1, 0x00, 0x31, 0x00, 0x41, 0x00, 0x7f, },
|
||||
{0x00, 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70,
|
||||
0x0, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70,
|
||||
0x00, 0x70, 0x7f, 0xf0, 0x7f, 0xf2, 0x7f, 0xfa,
|
||||
{0x00, 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70,
|
||||
0x0, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70,
|
||||
0x00, 0x70, 0x7f, 0xf0, 0x7f, 0xf2, 0x7f, 0xfa,
|
||||
0x00, 0x1e, 0x00, 0x0e, 0x00, 0x3e, 0x00, 0x00, }
|
||||
};
|
||||
|
||||
Cursor b = {
|
||||
{-7, -7},
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
|
||||
0xfc, 0x7f, 0x0c, 0x60, 0x10, 0x10, 0x1c, 0x70,
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x80, 0x01, 0x80, 0x01, 0x80, 0x01,
|
||||
0xfc, 0x7f, 0x0c, 0x60, 0x10, 0x10, 0x1c, 0x70,
|
||||
0x06, 0xc0, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, },
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe,
|
||||
0x03, 0x80, 0x03, 0x80, 0x0f, 0xe0, 0x03, 0x80,
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x7f, 0xfe, 0x7f, 0xfe, 0x7f, 0xfe,
|
||||
0x03, 0x80, 0x03, 0x80, 0x0f, 0xe0, 0x03, 0x80,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }
|
||||
};
|
||||
|
||||
Cursor bl = {
|
||||
{-4, -11},
|
||||
{0x1f, 0x00, 0x11, 0x00, 0x11, 0x00, 0x11, 0x00,
|
||||
0x11, 0x00, 0x11, 0x00, 0x11, 0x00, 0x11, 0x00,
|
||||
0x11, 0xff, 0xd0, 0x01, 0xb0, 0x01, 0xa0, 0x01,
|
||||
{0x1f, 0x00, 0x11, 0x00, 0x11, 0x00, 0x11, 0x00,
|
||||
0x11, 0x00, 0x11, 0x00, 0x11, 0x00, 0x11, 0x00,
|
||||
0x11, 0xff, 0xd0, 0x01, 0xb0, 0x01, 0xa0, 0x01,
|
||||
0x87, 0xff, 0x8c, 0x00, 0x82, 0x00, 0xfe, 0x00, },
|
||||
{0x00, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00,
|
||||
0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00,
|
||||
0x0e, 0x00, 0x0f, 0xfe, 0x4f, 0xfe, 0x5f, 0xfe,
|
||||
{0x00, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00,
|
||||
0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x0e, 0x00,
|
||||
0x0e, 0x00, 0x0f, 0xfe, 0x4f, 0xfe, 0x5f, 0xfe,
|
||||
0x78, 0x00, 0x70, 0x00, 0x7c, 0x00, 0x00, 0x0, }
|
||||
};
|
||||
|
||||
Cursor l = {
|
||||
{-7, -7},
|
||||
{0x03, 0xe0, 0x02, 0x20, 0x02, 0x20, 0x1a, 0x20,
|
||||
0x16, 0x20, 0x36, 0x20, 0x60, 0x20, 0x40, 0x20,
|
||||
0x60, 0x20, 0x36, 0x20, 0x16, 0x20, 0x1a, 0x20,
|
||||
{0x03, 0xe0, 0x02, 0x20, 0x02, 0x20, 0x1a, 0x20,
|
||||
0x16, 0x20, 0x36, 0x20, 0x60, 0x20, 0x40, 0x20,
|
||||
0x60, 0x20, 0x36, 0x20, 0x16, 0x20, 0x1a, 0x20,
|
||||
0x02, 0x20, 0x02, 0x20, 0x02, 0x20, 0x03, 0xe0, },
|
||||
{0x00, 0x00, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0,
|
||||
0x09, 0xc0, 0x09, 0xc0, 0x1f, 0xc0, 0x3f, 0xc0,
|
||||
0x1f, 0xc0, 0x09, 0xc0, 0x09, 0xc0, 0x01, 0xc0,
|
||||
{0x00, 0x00, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0,
|
||||
0x09, 0xc0, 0x09, 0xc0, 0x1f, 0xc0, 0x3f, 0xc0,
|
||||
0x1f, 0xc0, 0x09, 0xc0, 0x09, 0xc0, 0x01, 0xc0,
|
||||
0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x00, 0x00, }
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ void
|
|||
mainloop(int shape_event)
|
||||
{
|
||||
XEvent ev;
|
||||
|
||||
|
||||
for(;;){
|
||||
getevent(&ev);
|
||||
|
||||
|
|
@ -134,7 +134,7 @@ configurereq(XConfigureRequestEvent *e)
|
|||
c->dy = e->height;
|
||||
if(e->value_mask & CWBorderWidth)
|
||||
c->border = e->border_width;
|
||||
|
||||
|
||||
if(c->dx >= c->screen->width && c->dy >= c->screen->height)
|
||||
c->border = 0;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ pullcalc(Client *c, int x, int y, BorderOrient bl, int init)
|
|||
c->dy = sy*(dy + 2*BORDER );
|
||||
c->x = px;
|
||||
c->y = py;
|
||||
|
||||
|
||||
/* compensate position for size changed due to size hints */
|
||||
if(spx)
|
||||
c->x -= c->dx - rdx;
|
||||
|
|
@ -444,7 +444,7 @@ drawbound(Client *c, int drawing)
|
|||
ScreenInfo *s;
|
||||
|
||||
if(debug) fprintf(stderr, "drawbound %d %dx%d+%d+%d\n", drawing, c->dx, c->dy, c->x, c->y);
|
||||
|
||||
|
||||
s = c->screen;
|
||||
x = c->x;
|
||||
y = c->y;
|
||||
|
|
@ -466,7 +466,7 @@ drawbound(Client *c, int drawing)
|
|||
XUnmapWindow(dpy, s->sweepwin);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
x += BORDER;
|
||||
y += BORDER;
|
||||
dx -= 2*BORDER;
|
||||
|
|
|
|||
|
|
@ -64,4 +64,3 @@ alttab(int shift)
|
|||
shuffle(shift);
|
||||
/* fprintf(stderr, "%sTab\n", shift ? "Back" : ""); */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ initscreen(ScreenInfo *s, int i, int background)
|
|||
s->min_cmaps = MinCmapsOfScreen(ScreenOfDisplay(dpy, i));
|
||||
s->depth = DefaultDepth(dpy, i);
|
||||
|
||||
/*
|
||||
/*
|
||||
* Figure out underlying screen format.
|
||||
*/
|
||||
if(XMatchVisualInfo(dpy, i, 16, TrueColor, &xvi)
|
||||
|
|
@ -288,7 +288,7 @@ initscreen(ScreenInfo *s, int i, int background)
|
|||
s->vis = DefaultVisual(dpy, i);
|
||||
}
|
||||
if(DefaultDepth(dpy, i) != s->depth){
|
||||
s->def_cmap = XCreateColormap(dpy, s->root, s->vis, AllocNone);
|
||||
s->def_cmap = XCreateColormap(dpy, s->root, s->vis, AllocNone);
|
||||
}
|
||||
|
||||
ds = DisplayString(dpy);
|
||||
|
|
@ -344,7 +344,7 @@ initscreen(ScreenInfo *s, int i, int background)
|
|||
attr.cursor = s->arrow;
|
||||
attr.event_mask = SubstructureRedirectMask
|
||||
| SubstructureNotifyMask | ColormapChangeMask
|
||||
| ButtonPressMask | ButtonReleaseMask | PropertyChangeMask
|
||||
| ButtonPressMask | ButtonReleaseMask | PropertyChangeMask
|
||||
| KeyPressMask | EnterWindowMask;
|
||||
mask = CWCursor|CWEventMask;
|
||||
XChangeWindowAttributes(dpy, s->root, mask, &attr);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ char *b2items[NUMVIRTUALS+1] =
|
|||
0
|
||||
};
|
||||
|
||||
Menu b2menu =
|
||||
Menu b2menu =
|
||||
{
|
||||
b2items
|
||||
};
|
||||
|
|
@ -116,7 +116,7 @@ button(XButtonEvent *e)
|
|||
e->x, e->y);
|
||||
XTranslateCoordinates(dpy, e->window, s->root, e->x, e->y,
|
||||
&e->x, &e->y, &dw);
|
||||
}
|
||||
}
|
||||
switch (e->button){
|
||||
case Button1:
|
||||
if(c){
|
||||
|
|
@ -132,7 +132,7 @@ button(XButtonEvent *e)
|
|||
XAllowEvents (dpy, ReplayPointer, curtime);
|
||||
} else if((e->state&(ShiftMask|ControlMask))==(ShiftMask|ControlMask)){
|
||||
menuhit(e, &egg);
|
||||
} else if(numvirtuals > 1 && (n = menuhit(e, &b2menu)) > -1)
|
||||
} else if(numvirtuals > 1 && (n = menuhit(e, &b2menu)) > -1)
|
||||
button2(n);
|
||||
return;
|
||||
case Button3:
|
||||
|
|
@ -389,7 +389,7 @@ switch_to_c(int n, Client *c)
|
|||
int i;
|
||||
|
||||
for(i = 0; i < numhidden; i++)
|
||||
if(c == hiddenc[i])
|
||||
if(c == hiddenc[i])
|
||||
break;
|
||||
|
||||
if(i == numhidden){
|
||||
|
|
@ -397,7 +397,7 @@ switch_to_c(int n, Client *c)
|
|||
XMapWindow(dpy, c->parent);
|
||||
setstate(c, NormalState);
|
||||
if(currents[virt] == c)
|
||||
active(c);
|
||||
active(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -421,6 +421,6 @@ switch_to(int n)
|
|||
|
||||
void
|
||||
initb2menu(int n)
|
||||
{
|
||||
{
|
||||
b2items[n] = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ Archive-name: showevent/part01
|
|||
|
||||
|
||||
There are times during debugging when it would be real useful to be able to
|
||||
print the fields of an event in a human readable form. Too many times I found
|
||||
myself scrounging around in section 8 of the Xlib manual looking for the valid
|
||||
fields for the events I wanted to see, then adding printf's to display the
|
||||
print the fields of an event in a human readable form. Too many times I found
|
||||
myself scrounging around in section 8 of the Xlib manual looking for the valid
|
||||
fields for the events I wanted to see, then adding printf's to display the
|
||||
numeric values of the fields, and then scanning through X.h trying to decode
|
||||
the cryptic detail and state fields. After playing with xev, I decided to
|
||||
write a couple of standard functions that I could keep in a library and call
|
||||
|
|
@ -35,9 +35,9 @@ spend the time writing functions like this, they just want to have them when
|
|||
they need them.
|
||||
|
||||
A simple, sample program is included which does little else but to demonstrate
|
||||
the use of these two functions. These functions have saved me many an hour
|
||||
the use of these two functions. These functions have saved me many an hour
|
||||
during debugging and I hope you find some benefit to these. If you have any
|
||||
comments, suggestions, improvements, or if you find any blithering errors you
|
||||
comments, suggestions, improvements, or if you find any blithering errors you
|
||||
can get it touch with me at the following location:
|
||||
|
||||
ken@richsun.UUCP
|
||||
|
|
@ -129,7 +129,7 @@ ServerTime(Time time)
|
|||
if(0)
|
||||
sprintf(buffer, "%lu day%s %02lu:%02lu:%02lu.%03lu",
|
||||
day, day == 1 ? "" : "(s)", hr, min, sec, msec);
|
||||
|
||||
|
||||
sprintf(buffer, "%lud%luh%lum%lu.%03lds", day, hr, min, sec, msec);
|
||||
return (buffer);
|
||||
}
|
||||
|
|
@ -770,7 +770,7 @@ VerbVisibility(XVisibilityEvent *ev)
|
|||
char *eventtype(XEvent *ev)
|
||||
{
|
||||
static char buffer[20];
|
||||
|
||||
|
||||
switch (ev->type) {
|
||||
case KeyPress:
|
||||
return ("KeyPress");
|
||||
|
|
@ -983,4 +983,3 @@ void printevent(XEvent *e)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,4 +45,3 @@ char **argv;
|
|||
printf("\n\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,12 +15,12 @@ main(int argc, char **argv)
|
|||
Display *dpy;
|
||||
Window window;
|
||||
XEvent event;
|
||||
|
||||
|
||||
if (!(dpy = XOpenDisplay(""))) {
|
||||
printf("Failed to open display...\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
screen = DefaultScreen(dpy);
|
||||
|
||||
window = XCreateSimpleWindow(dpy, RootWindow(dpy, screen), 100, 100,
|
||||
|
|
@ -42,4 +42,3 @@ main(int argc, char **argv)
|
|||
printevent(&event);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ void
|
|||
main(int argc, char **argv)
|
||||
{
|
||||
int screen;
|
||||
|
||||
|
||||
screen = 0;
|
||||
ARGBEGIN{
|
||||
case 's':
|
||||
|
|
@ -65,7 +65,7 @@ main(int argc, char **argv)
|
|||
usage();
|
||||
break;
|
||||
}ARGEND
|
||||
|
||||
|
||||
dpy = XOpenDisplay("");
|
||||
if(dpy == nil)
|
||||
sysfatal("open display: %r");
|
||||
|
|
@ -93,7 +93,7 @@ getproperty(Window w, Atom a)
|
|||
|
||||
n = 100;
|
||||
p = nil;
|
||||
XGetWindowProperty(dpy, w, a, 0, 100L, 0,
|
||||
XGetWindowProperty(dpy, w, a, 0, 100L, 0,
|
||||
AnyPropertyType, &type, &fmt,
|
||||
&n, &dummy, &p);
|
||||
if(p == nil || *p == 0)
|
||||
|
|
@ -132,7 +132,7 @@ getinfo(void)
|
|||
w = mallocz(nxwin*sizeof w[0], 1);
|
||||
if(w == 0)
|
||||
sysfatal("malloc: %r");
|
||||
|
||||
|
||||
Win *ww = w;
|
||||
for(i=0; i<nxwin; i++){
|
||||
memset(&attr, 0, sizeof attr);
|
||||
|
|
@ -157,7 +157,7 @@ getinfo(void)
|
|||
ww++;
|
||||
}
|
||||
nw = ww - w;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
listwindows(void)
|
||||
|
|
@ -169,7 +169,7 @@ listwindows(void)
|
|||
char rect[50];
|
||||
snprint(rect, sizeof rect, "%d,%d,%d,%d", ww->x, ww->y, ww->x+ww->dx, ww->y+ww->dy);
|
||||
print("%08x %-20s %-10s %s\n",
|
||||
(uint)ww->xw,
|
||||
(uint)ww->xw,
|
||||
rect,
|
||||
ww->instance,
|
||||
ww->class);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue