diff options
author | Joaquín Ignacio Aramendía <[email protected]> | 2014-06-25 19:06:17 -0300 |
---|---|---|
committer | Joaquín Ignacio Aramendía <[email protected]> | 2014-06-26 20:03:32 -0300 |
commit | a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95 (patch) | |
tree | b451afa6025e587f0ee287601427e572712e3428 /src/wm-tester/test-gravity.c | |
parent | 32050fd47713d9254e05344a6afd87202fa45d11 (diff) | |
download | marco-a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.tar.bz2 marco-a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.tar.xz |
Remove all trailing whitespaces in the code tree
Just run:
$ find -name '*.c' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i
$ find -name '*.h' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i
Diffstat (limited to 'src/wm-tester/test-gravity.c')
-rw-r--r-- | src/wm-tester/test-gravity.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/src/wm-tester/test-gravity.c b/src/wm-tester/test-gravity.c index 8e5b581c..4276549b 100644 --- a/src/wm-tester/test-gravity.c +++ b/src/wm-tester/test-gravity.c @@ -4,11 +4,11 @@ #include <string.h> static int gravities[10] = { - NorthWestGravity, - NorthGravity, + NorthWestGravity, + NorthGravity, NorthEastGravity, - WestGravity, - CenterGravity, + WestGravity, + CenterGravity, EastGravity, SouthWestGravity, SouthGravity, @@ -73,7 +73,7 @@ calculate_position (int i, int doubled, int *x, int *y) *x = 150; *y = 150; } - else + else { int xoff = x_offset[i % 3]; int yoff = y_offset[i / 3]; @@ -82,7 +82,7 @@ calculate_position (int i, int doubled, int *x, int *y) xoff *= 2; yoff *= 2; } - + *x = screen_x_fraction[i % 3] * screen_width + xoff; *y = screen_y_fraction[i / 3] * screen_height + yoff; } @@ -123,12 +123,12 @@ int main (int argc, char **argv) int screen; XEvent ev; int noframes; - + if (argc > 1 && strcmp (argv[1], "--noframes") == 0) noframes = 1; else noframes = 0; - + d = XOpenDisplay (NULL); screen = DefaultScreen (d); @@ -138,11 +138,11 @@ int main (int argc, char **argv) for (i=0; i<10; i++) { int x, y; - + calculate_position (i, doubled[i], &x, &y); - w = XCreateSimpleWindow (d, RootWindow (d, screen), - x, y, WINDOW_WIDTH, WINDOW_HEIGHT, 0, + w = XCreateSimpleWindow (d, RootWindow (d, screen), + x, y, WINDOW_WIDTH, WINDOW_HEIGHT, 0, WhitePixel (d, screen), WhitePixel (d, screen)); windows[i] = w; @@ -150,11 +150,11 @@ int main (int argc, char **argv) window_rects[i].y = y; window_rects[i].width = WINDOW_WIDTH; window_rects[i].height = WINDOW_HEIGHT; - + XSelectInput (d, w, ButtonPressMask | ExposureMask | StructureNotifyMask); - + hints.flags = USPosition | PMinSize | PMaxSize | PWinGravity; - + hints.min_width = WINDOW_WIDTH / 2; hints.min_height = WINDOW_HEIGHT / 2; @@ -170,7 +170,7 @@ int main (int argc, char **argv) hints.max_height = WINDOW_HEIGHT * 2 + WINDOW_HEIGHT / 2; #endif hints.win_gravity = gravities[i]; - + XSetWMNormalHints (d, w, &hints); XStoreName (d, w, window_gravity_to_string (hints.win_gravity)); @@ -179,10 +179,10 @@ int main (int argc, char **argv) { MotifWmHints mwm; Atom mwm_atom; - + mwm.decorations = 0; mwm.flags = MWM_HINTS_DECORATIONS; - + mwm_atom = XInternAtom (d, "_MOTIF_WM_HINTS", False); XChangeProperty (d, w, mwm_atom, mwm_atom, @@ -190,7 +190,7 @@ int main (int argc, char **argv) (unsigned char *)&mwm, sizeof (MotifWmHints)/sizeof (long)); } - + XMapWindow (d, w); } @@ -201,14 +201,14 @@ int main (int argc, char **argv) if (ev.xany.type == ConfigureNotify) { i = find_window (ev.xconfigure.window); - + if (i >= 0) { Window ignored; - + window_rects[i].width = ev.xconfigure.width; window_rects[i].height = ev.xconfigure.height; - + XClearArea (d, windows[i], 0, 0, ev.xconfigure.width, ev.xconfigure.height, @@ -227,17 +227,17 @@ int main (int argc, char **argv) } } else if (ev.xany.type == Expose) - { + { i = find_window (ev.xexpose.window); - + if (i >= 0) { GC gc; XGCValues values; char buf[256]; - + values.foreground = BlackPixel (d, screen); - + gc = XCreateGC (d, windows[i], GCForeground, &values); @@ -245,7 +245,7 @@ int main (int argc, char **argv) "%d,%d", window_rects[i].x, window_rects[i].y); - + XDrawString (d, windows[i], gc, 10, 15, buf, strlen (buf)); @@ -253,10 +253,10 @@ int main (int argc, char **argv) "%dx%d", window_rects[i].width, window_rects[i].height); - + XDrawString (d, windows[i], gc, 10, 35, buf, strlen (buf)); - + XFreeGC (d, gc); } } @@ -267,13 +267,13 @@ int main (int argc, char **argv) if (i >= 0) { /* Button 1 = move, 2 = resize, 3 = both at once */ - - if (ev.xbutton.button == Button1) - { + + if (ev.xbutton.button == Button1) + { int x, y; - + calculate_position (i, doubled[i], &x, &y); - XMoveWindow (d, windows[i], x, y); + XMoveWindow (d, windows[i], x, y); } else if (ev.xbutton.button == Button2) { @@ -287,7 +287,7 @@ int main (int argc, char **argv) else if (ev.xbutton.button == Button3) { int x, y; - + calculate_position (i, !doubled[i], &x, &y); if (doubled[i]) |