diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-07-14 22:04:34 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-07-14 22:04:34 -0700 |
commit | f21823506dcb956d62c260e6e207f1dc2ce7732a (patch) | |
tree | 65372baf6b9b328a81edb87777cde5a3b6b1285b /src/twm.c | |
parent | c6ade914363426facb01a954650b804657114012 (diff) |
Whitespace fixes in src files
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/twm.c')
-rw-r--r-- | src/twm.c | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -199,7 +199,7 @@ Bool IsPrintScreen(Screen *s) return True; } } - XFree(pscreens); + XFree(pscreens); } return False; } @@ -293,7 +293,7 @@ main(int argc, char *argv[]) #define newhandler(sig) \ if (signal (sig, SIG_IGN) != SIG_IGN) (void) signal (sig, sigHandler) - + newhandler (SIGINT); newhandler (SIGHUP); newhandler (SIGQUIT); @@ -327,7 +327,7 @@ main(int argc, char *argv[]) appContext = XtCreateApplicationContext (); si = XtAppAddSignal(appContext, Done, NULL); - + if (!(dpy = XtOpenDisplay (appContext, display_name, "twm", "twm", NULL, 0, &zero, NULL))) { fprintf (stderr, "%s: unable to open display \"%s\"\n", @@ -336,7 +336,7 @@ main(int argc, char *argv[]) } if (fcntl(ConnectionNumber(dpy), F_SETFD, 1) == -1) { - fprintf (stderr, + fprintf (stderr, "%s: unable to mark display connection as close-on-exec\n", ProgramName); exit (1); @@ -402,7 +402,7 @@ main(int argc, char *argv[]) RedirectError = FALSE; XSetErrorHandler(CatchRedirectError); XSelectInput(dpy, RootWindow (dpy, scrnum), - ColormapChangeMask | EnterWindowMask | PropertyChangeMask | + ColormapChangeMask | EnterWindowMask | PropertyChangeMask | SubstructureRedirectMask | KeyPressMask | ButtonPressMask | ButtonReleaseMask); XSync(dpy, 0); @@ -422,7 +422,7 @@ main(int argc, char *argv[]) numManaged ++; /* Note: ScreenInfo struct is calloc'ed to initialize to zero. */ - Scr = ScreenList[scrnum] = + Scr = ScreenList[scrnum] = (ScreenInfo *) calloc(1, sizeof(ScreenInfo)); if (Scr == NULL) { @@ -483,7 +483,7 @@ main(int argc, char *argv[]) Scr->cmapInfo.root_pushes = 0; InstallWindowColormaps(0, &Scr->TwmRoot); - Scr->StdCmapInfo.head = Scr->StdCmapInfo.tail = + Scr->StdCmapInfo.head = Scr->StdCmapInfo.tail = Scr->StdCmapInfo.mru = NULL; Scr->StdCmapInfo.mruindex = 0; LocateStandardColormaps(); @@ -504,7 +504,7 @@ main(int argc, char *argv[]) if (DisplayCells(dpy, scrnum) < 3) Scr->Monochrome = MONOCHROME; - else if (DefaultVisual(dpy, scrnum)->class == GrayScale) + else if (DefaultVisual(dpy, scrnum)->class == GrayScale) Scr->Monochrome = GRAYSCALE; else Scr->Monochrome = COLOR; @@ -628,16 +628,16 @@ main(int argc, char *argv[]) } } - + attributes.border_pixel = Scr->DefaultC.fore; attributes.background_pixel = Scr->DefaultC.back; attributes.event_mask = (ExposureMask | ButtonPressMask | KeyPressMask | ButtonReleaseMask); attributes.backing_store = NotUseful; attributes.cursor = XCreateFontCursor (dpy, XC_hand2); - valuemask = (CWBorderPixel | CWBackPixel | CWEventMask | + valuemask = (CWBorderPixel | CWBackPixel | CWEventMask | CWBackingStore | CWCursor); - Scr->InfoWindow = XCreateWindow (dpy, Scr->Root, 0, 0, + Scr->InfoWindow = XCreateWindow (dpy, Scr->Root, 0, 0, (unsigned int) 5, (unsigned int) 5, (unsigned int) BW, 0, (unsigned int) CopyFromParent, @@ -648,7 +648,7 @@ main(int argc, char *argv[]) " 8888 x 8888 ", 13); valuemask = (CWBorderPixel | CWBackPixel | CWBitGravity); attributes.bit_gravity = NorthWestGravity; - Scr->SizeWindow = XCreateWindow (dpy, Scr->Root, 0, 0, + Scr->SizeWindow = XCreateWindow (dpy, Scr->Root, 0, 0, (unsigned int) Scr->SizeStringWidth, (unsigned int) (Scr->SizeFont.height + SIZE_VINDENT*2), @@ -850,7 +850,7 @@ RestoreWithdrawnLocation (TwmWindow *tmp) unsigned int bw, mask; XWindowChanges xwc; - if (XGetGeometry (dpy, tmp->w, &JunkRoot, &xwc.x, &xwc.y, + if (XGetGeometry (dpy, tmp->w, &JunkRoot, &xwc.x, &xwc.y, &JunkWidth, &JunkHeight, &bw, &JunkDepth)) { GetGravityOffsets (tmp, &gravx, &gravy); @@ -891,7 +891,7 @@ RestoreWithdrawnLocation (TwmWindow *tmp) } -void +void Reborder (Time time) { TwmWindow *tmp; /* temp twm window structure */ @@ -917,7 +917,7 @@ Reborder (Time time) SetFocus ((TwmWindow*)NULL, time); } -static SIGNAL_T +static SIGNAL_T sigHandler(int sig) { XtNoticeSignal(si); @@ -930,7 +930,7 @@ sigHandler(int sig) void Done(XtPointer client_data, XtSignalId *si) { - if (dpy) + if (dpy) { Reborder(CurrentTime); XCloseDisplay(dpy); @@ -948,7 +948,7 @@ Done(XtPointer client_data, XtSignalId *si) Bool ErrorOccurred = False; XErrorEvent LastErrorEvent; -static int +static int TwmErrorHandler(Display *dpy, XErrorEvent *event) { LastErrorEvent = *event; @@ -963,7 +963,7 @@ TwmErrorHandler(Display *dpy, XErrorEvent *event) } -static int +static int CatchRedirectError(Display *dpy, XErrorEvent *event) { RedirectError = TRUE; |