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/menus.c | |
parent | c6ade914363426facb01a954650b804657114012 (diff) |
Whitespace fixes in src files
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/menus.c')
-rw-r--r-- | src/menus.c | 220 |
1 files changed, 110 insertions, 110 deletions
diff --git a/src/menus.c b/src/menus.c index 4dd4da9..eb8f0e8 100644 --- a/src/menus.c +++ b/src/menus.c @@ -98,7 +98,7 @@ int ConstMoveXL; int ConstMoveXR; int ConstMoveYT; int ConstMoveYB; - + /* Globals used to keep track of whether the mouse has moved during a resize function. */ int ResizeOrigX; @@ -166,7 +166,7 @@ InitMenus() * \param win_name the window name (if any) * \param action the action string associated with the function (if any) */ -Bool AddFuncKey (char *name, int cont, int mods, int func, char *win_name, +Bool AddFuncKey (char *name, int cont, int mods, int func, char *win_name, char *action) { FuncKey *tmp; @@ -213,7 +213,7 @@ Bool AddFuncKey (char *name, int cont, int mods, int func, char *win_name, -int CreateTitleButton (char *name, int func, char *action, MenuRoot *menuroot, +int CreateTitleButton (char *name, int func, char *action, MenuRoot *menuroot, Bool rightside, Bool append) { TitleButton *tb = (TitleButton *) malloc (sizeof(TitleButton)); @@ -242,7 +242,7 @@ int CreateTitleButton (char *name, int func, char *action, MenuRoot *menuroot, /* * Cases for list: - * + * * 1. empty list, prepend left put at head of list * 2. append left, prepend right put in between left and right * 3. append right put at tail of list @@ -279,8 +279,8 @@ int CreateTitleButton (char *name, int func, char *action, MenuRoot *menuroot, /** - * Do all the necessary stuff to load in a titlebar button. If we can't find - * the button, then put in a question; if we can't find the question mark, + * Do all the necessary stuff to load in a titlebar button. If we can't find + * the button, then put in a question; if we can't find the question mark, * something is wrong and we are probably going to be in trouble later on. */ void InitTitlebarButtons () @@ -399,7 +399,7 @@ PaintEntry(MenuRoot *mr, MenuItem *mi, int exposure) else gc = Scr->MenuGC; - MyFont_DrawString(dpy, mr->w, &Scr->MenuFont, gc, + MyFont_DrawString(dpy, mr->w, &Scr->MenuFont, gc, mi->x, text_y, mi->item, mi->strlen); } @@ -444,7 +444,7 @@ PaintEntry(MenuRoot *mr, MenuItem *mi, int exposure) text_y, mi->item, mi->strlen); } } - + void PaintMenu(MenuRoot *mr, XEvent *e) @@ -511,7 +511,7 @@ UpdateMenu() if (Event.type != MotionNotify) continue; - + if (!ActiveMenu) continue; @@ -554,7 +554,7 @@ UpdateMenu() done = TRUE; /* if we weren't on the active entry, let's turn the old - * active one off + * active one off */ if (!done && ActiveItem->func != F_TITLE) { @@ -564,7 +564,7 @@ UpdateMenu() } /* if we weren't on the active item, change the active item and turn - * it on + * it on */ if (!done) { @@ -577,16 +577,16 @@ UpdateMenu() } /* now check to see if we were over the arrow of a pull right entry */ - if (ActiveItem && ActiveItem->func == F_MENU && + if (ActiveItem && ActiveItem->func == F_MENU && ((ActiveMenu->width - x) < (ActiveMenu->width >> 1))) { MenuRoot *save = ActiveMenu; - int savex = MenuOrigins[MenuDepth - 1].x; + int savex = MenuOrigins[MenuDepth - 1].x; int savey = MenuOrigins[MenuDepth - 1].y; if (MenuDepth < MAXMENUDEPTH) { - PopUpMenu (ActiveItem->sub, - (savex + (ActiveMenu->width >> 1)), + PopUpMenu (ActiveItem->sub, + (savex + (ActiveMenu->width >> 1)), (savey + ActiveItem->item_num * Scr->EntryHeight) /*(savey + ActiveItem->item_num * Scr->EntryHeight + (Scr->EntryHeight >> 1))*/, False); @@ -676,7 +676,7 @@ NewMenuRoot(char *name) * \param back background color string */ MenuItem * -AddToMenu(MenuRoot *menu, char *item, char *action, MenuRoot *sub, int func, +AddToMenu(MenuRoot *menu, char *item, char *action, MenuRoot *sub, int func, char *fore, char *back) { MenuItem *tmp; @@ -810,10 +810,10 @@ MakeMenu(MenuRoot *mr) attributes.save_under = True; } mr->shadow = XCreateWindow (dpy, Scr->Root, 0, 0, - (unsigned int) mr->width, + (unsigned int) mr->width, (unsigned int) mr->height, (unsigned int)0, - CopyFromParent, + CopyFromParent, (unsigned int) CopyFromParent, (Visual *) CopyFromParent, valuemask, &attributes); @@ -954,14 +954,14 @@ MakeMenu(MenuRoot *mr) * \param x,y location of upper left of menu * \param center whether or not to center horizontally over position */ -Bool +Bool PopUpMenu (MenuRoot *menu, int x, int y, Bool center) { int WindowNameCount; TwmWindow **WindowNames; TwmWindow *tmp_win2,*tmp_win3; int i; - int (*compar)(const char *, const char *) = + int (*compar)(const char *, const char *) = (Scr->CaseSensitive ? strcmp : XmuCompareISOLatin1); if (!menu) return False; @@ -982,7 +982,7 @@ PopUpMenu (MenuRoot *menu, int x, int y, Bool center) menu->width = 0; menu->mapped = NEVER_MAPPED; AddToMenu(menu, "TWM Windows", NULLSTR, NULL, F_TITLE,NULLSTR,NULLSTR); - + for(tmp_win = Scr->TwmRoot.next , WindowNameCount=0; tmp_win != NULL; tmp_win = tmp_win->next) @@ -1137,14 +1137,14 @@ FindMenuRoot(char *name) -static Bool +static Bool belongs_to_twm_window (TwmWindow *t, Window w) { if (!t) return False; if (w == t->frame || w == t->title_w || w == t->hilite_w || w == t->icon_w || w == t->icon_bm_w) return True; - + if (t && t->titlebuttons) { register TBWindow *tbw; register int nb = Scr->TBInfo.nleft + Scr->TBInfo.nright; @@ -1157,7 +1157,7 @@ belongs_to_twm_window (TwmWindow *t, Window w) -void +void resizeFromCenter(Window w, TwmWindow *tmp_win) { int lastx, lasty, bw2; @@ -1177,11 +1177,11 @@ resizeFromCenter(Window w, TwmWindow *tmp_win) height = Scr->SizeFont.height + SIZE_VINDENT * 2; #endif XGetGeometry(dpy, w, &JunkRoot, &origDragX, &origDragY, - (unsigned int *)&DragWidth, (unsigned int *)&DragHeight, + (unsigned int *)&DragWidth, (unsigned int *)&DragHeight, &JunkBW, &JunkDepth); XWarpPointer(dpy, None, w, - 0, 0, 0, 0, DragWidth/2, DragHeight/2); - XQueryPointer (dpy, Scr->Root, &JunkRoot, + 0, 0, 0, 0, DragWidth/2, DragHeight/2); + XQueryPointer (dpy, Scr->Root, &JunkRoot, &JunkChild, &JunkX, &JunkY, &AddingX, &AddingY, &JunkMask); #if 0 @@ -1207,7 +1207,7 @@ resizeFromCenter(Window w, TwmWindow *tmp_win) { XMaskEvent(dpy, ButtonPressMask | PointerMotionMask, &event); - + if (event.type == MotionNotify) { /* discard any extra motion events before a release */ while(XCheckMaskEvent(dpy, @@ -1215,38 +1215,38 @@ resizeFromCenter(Window w, TwmWindow *tmp_win) if (event.type == ButtonPress) break; } - + if (event.type == ButtonPress) { MenuEndResize(tmp_win); XMoveResizeWindow(dpy, w, AddingX, AddingY, AddingW, AddingH); break; } - + /* if (!DispatchEvent ()) continue; */ if (event.type != MotionNotify) { continue; } - + /* * XXX - if we are going to do a loop, we ought to consider - * using multiple GXxor lines so that we don't need to + * using multiple GXxor lines so that we don't need to * grab the server. */ XQueryPointer(dpy, Scr->Root, &JunkRoot, &JunkChild, &JunkX, &JunkY, &AddingX, &AddingY, &JunkMask); - + if (lastx != AddingX || lasty != AddingY) { MenuDoResize(AddingX, AddingY, tmp_win); - + lastx = AddingX; lasty = AddingY; } - + } -} +} @@ -1254,32 +1254,32 @@ resizeFromCenter(Window w, TwmWindow *tmp_win) * execute a twm root function. * * \param func the function to execute - * \param action the menu action to execute + * \param action the menu action to execute * \param w the window to execute this function on * \param tmp_win the twm window structure * \param event the event that caused the function * \param context the context in which the button was pressed * \param pulldown flag indicating execution from pull down menu * - * \return TRUE if should continue with remaining actions, + * \return TRUE if should continue with remaining actions, * else FALSE to abort */ int -WarpThere(TwmWindow *t) +WarpThere(TwmWindow *t) { if (Scr->WarpUnmapped || t->mapped) { if (!t->mapped) DeIconify (t); if (!Scr->NoRaiseWarp) XRaiseWindow (dpy, t->frame); - WarpToWindow (t); - return 1; - } + WarpToWindow (t); + return 1; + } return 0; } int -ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, +ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, XEvent *eventp, int context, int pulldown) { static Time last_time = 0; @@ -1390,7 +1390,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, SortIconManager((IconMgr *) NULL); else if (tmp_win->iconmgr) SortIconManager(tmp_win->iconmgrp); - else + else Bell(XkbBI_Info,0,tmp_win->w); Scr->SortIconMgr = save_sort; @@ -1445,39 +1445,39 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, PopDownMenu(); if (pulldown) - XWarpPointer(dpy, None, Scr->Root, + XWarpPointer(dpy, None, Scr->Root, 0, 0, 0, 0, eventp->xbutton.x_root, eventp->xbutton.y_root); if (w != tmp_win->icon_w) { /* can't resize icons */ if ((Context == C_FRAME || Context == C_WINDOW || Context == C_TITLE) - && fromMenu) + && fromMenu) resizeFromCenter(w, tmp_win); else { /* * see if this is being done from the titlebar */ - fromtitlebar = + fromtitlebar = belongs_to_twm_window (tmp_win, eventp->xbutton.window); - + /* Save pointer position so we can tell if it was moved or not during the resize. */ ResizeOrigX = eventp->xbutton.x_root; ResizeOrigY = eventp->xbutton.y_root; - + StartResize (eventp, tmp_win, fromtitlebar); - + do { XMaskEvent(dpy, ButtonPressMask | ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | ButtonMotionMask, &Event); - + if (fromtitlebar && Event.type == ButtonPress) { fromtitlebar = False; continue; } - + if (Event.type == MotionNotify) { /* discard any extra motion events before a release */ while @@ -1486,13 +1486,13 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, if (Event.type == ButtonRelease) break; } - + if (!DispatchEvent ()) continue; - + } while (!(Event.type == ButtonRelease || Cancel)); return TRUE; } - } + } break; @@ -1518,7 +1518,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, MoveFunction = func; if (pulldown) - XWarpPointer(dpy, None, Scr->Root, + XWarpPointer(dpy, None, Scr->Root, 0, 0, 0, 0, eventp->xbutton.x_root, eventp->xbutton.y_root); EventHandler[EnterNotify] = HandleUnknown; @@ -1544,8 +1544,8 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, else if (w != tmp_win->icon_w) { XTranslateCoordinates(dpy, w, tmp_win->frame, - eventp->xbutton.x, - eventp->xbutton.y, + eventp->xbutton.x, + eventp->xbutton.y, &DragX, &DragY, &JunkChild); w = tmp_win->frame; @@ -1566,7 +1566,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, * only do the constrained move if timer is set; need to check it * in case of stupid or wicked fast servers */ - if (ConstrainedMoveTime && + if (ConstrainedMoveTime && (eventp->xbutton.time - last_time) < ConstrainedMoveTime) { int width, height; @@ -1625,15 +1625,15 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, if (menuFromFrameOrWindowOrTitlebar) { /* warp the pointer to the middle of the window */ - XWarpPointer(dpy, None, Scr->Root, 0, 0, 0, 0, - origDragX + DragWidth / 2, + XWarpPointer(dpy, None, Scr->Root, 0, 0, 0, 0, + origDragX + DragWidth / 2, origDragY + DragHeight / 2); XFlush(dpy); } - + while (TRUE) { - long releaseEvent = menuFromFrameOrWindowOrTitlebar ? + long releaseEvent = menuFromFrameOrWindowOrTitlebar ? ButtonPress : ButtonRelease; long movementMask = menuFromFrameOrWindowOrTitlebar ? PointerMotionMask : ButtonMotionMask; @@ -1646,7 +1646,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, /* throw away enter and leave events until release */ if (Event.xany.type == EnterNotify || - Event.xany.type == LeaveNotify) continue; + Event.xany.type == LeaveNotify) continue; if (Event.type == MotionNotify) { /* discard any extra motion events before a logical release */ @@ -1693,7 +1693,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, CurrentDragY != origDragY))) tmp_win->icon_moved = TRUE; if (!Scr->OpaqueMove && menuFromFrameOrWindowOrTitlebar) - XMoveWindow(dpy, DragWindow, + XMoveWindow(dpy, DragWindow, Event.xbutton.x_root - DragWidth / 2, Event.xbutton.y_root - DragHeight / 2); break; @@ -1774,7 +1774,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, XMoveWindow(dpy, DragWindow, xl, yt); else MoveOutline(eventp->xmotion.root, xl, yt, w, h, - tmp_win->frame_bw, + tmp_win->frame_bw, moving_icon ? 0 : tmp_win->title_height); } } @@ -1788,7 +1788,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, else { xl = eventp->xmotion.x_root - (DragWidth / 2); yt = eventp->xmotion.y_root - (DragHeight / 2); - } + } w = DragWidth + 2 * JunkBW; h = DragHeight + 2 * JunkBW; @@ -1834,7 +1834,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, if ((mroot = FindMenuRoot(action)) == NULL) { - fprintf (stderr, "%s: couldn't find function \"%s\"\n", + fprintf (stderr, "%s: couldn't find function \"%s\"\n", ProgramName, action); return TRUE; } @@ -1882,13 +1882,13 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, XConfigureWindow (dpy, w, CWStackMode, &xwc); } break; - + case F_RAISE: if (DeferExecution(context, func, Scr->SelectCursor)) return TRUE; /* check to make sure raise is not from the WindowFunction */ - if (w == tmp_win->icon_w && Context != C_ROOT) + if (w == tmp_win->icon_w && Context != C_ROOT) XRaiseWindow(dpy, tmp_win->icon_w); else XRaiseWindow(dpy, tmp_win->frame); @@ -2007,12 +2007,12 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, if (count > 0) XStoreBytes (dpy, buff, count); close(fd); } else { - fprintf (stderr, - "%s: unable to open cut file \"%s\"\n", + fprintf (stderr, + "%s: unable to open cut file \"%s\"\n", ProgramName, tmp); } if (ptr != tmp) free (ptr); - } + } } else { XFree(ptr); } @@ -2089,23 +2089,23 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, len = strlen(action); for (t = Scr->TwmRoot.next; t != NULL; t = t->next) { - if (!strncmp(action, t->name, len)) + if (!strncmp(action, t->name, len)) if (WarpThere(t)) break; } if (!t) { for (t = Scr->TwmRoot.next; t != NULL; t = t->next) { - if (!strncmp(action, t->class.res_name, len)) + if (!strncmp(action, t->class.res_name, len)) if (WarpThere(t)) break; } if (!t) { for (t = Scr->TwmRoot.next; t != NULL; t = t->next) { - if (!strncmp(action, t->class.res_class, len)) + if (!strncmp(action, t->class.res_class, len)) if (WarpThere(t)) break; } } } - if (!t) + if (!t) Bell(XkbBI_MinorError,0,None); } break; @@ -2145,7 +2145,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, } } break; - + case F_WARPRING: switch (action[0]) { case 'n': @@ -2173,7 +2173,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, } else { - fprintf (stderr, "%s: unable to open file \"%s\"\n", + fprintf (stderr, "%s: unable to open file \"%s\"\n", ProgramName, ptr); } if (ptr != action) free(ptr); @@ -2243,7 +2243,7 @@ ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win, /** - * defer the execution of a function to the next button press if the context + * defer the execution of a function to the next button press if the context * is C_ROOT * * \param context the context in which the mouse button was pressed @@ -2265,7 +2265,7 @@ DeferExecution(int context, int func, Cursor cursor) return (TRUE); } - + return (FALSE); } @@ -2286,7 +2286,7 @@ ReGrab() /** - * checks each function in the list to see if it is one that needs + * checks each function in the list to see if it is one that needs * to be deferred. * * \param root the menu root to check @@ -2335,7 +2335,7 @@ NeedToDefer(MenuRoot *root) * execute the string by /bin/sh * \param s the string containing the command */ -static int +static int System (char *s) { int pid, status; @@ -2465,7 +2465,7 @@ DeIconify(TwmWindow *tmp_win) Zoom(t->icon_w, t->frame); else Zoom(tmp_win->icon_w, t->frame); - + XMapWindow(dpy, t->w); t->mapped = TRUE; if (Scr->NoRaiseDeicon) @@ -2473,7 +2473,7 @@ DeIconify(TwmWindow *tmp_win) else XMapRaised(dpy, t->frame); SetMapStateProp(t, NormalState); - + if (t->icon_w) { XUnmapWindow(dpy, t->icon_w); IconDown (t); @@ -2483,7 +2483,7 @@ DeIconify(TwmWindow *tmp_win) t->icon_on = FALSE; } } - + XSync (dpy, 0); } @@ -2524,7 +2524,7 @@ Iconify(TwmWindow *tmp_win, int def_x, int def_y) else Zoom(t->frame, tmp_win->icon_w); } - + /* * Prevent the receipt of an UnmapNotify, since that would * cause a transition to the Withdrawn state. @@ -2548,8 +2548,8 @@ Iconify(TwmWindow *tmp_win, int def_x, int def_y) t->icon = TRUE; t->icon_on = FALSE; } - } - + } + if (iconify) Zoom(tmp_win->frame, tmp_win->icon_w); @@ -2581,7 +2581,7 @@ Iconify(TwmWindow *tmp_win, int def_x, int def_y) -static void +static void Identify (TwmWindow *t) { int i, n, twidth, width, height; @@ -2627,7 +2627,7 @@ Identify (TwmWindow *t) width = 1; for (i = 0; i < n; i++) { - twidth = MyFont_TextWidth(&Scr->DefaultFont, Info[i], + twidth = MyFont_TextWidth(&Scr->DefaultFont, Info[i], strlen(Info[i])); if (twidth > width) width = twidth; @@ -2639,9 +2639,9 @@ Identify (TwmWindow *t) &dummy, &dummy, &udummy)) { px -= (width / 2); py -= (height / 3); - if (px + width + BW2 >= Scr->MyDisplayWidth) + if (px + width + BW2 >= Scr->MyDisplayWidth) px = Scr->MyDisplayWidth - width - BW2; - if (py + height + BW2 >= Scr->MyDisplayHeight) + if (py + height + BW2 >= Scr->MyDisplayHeight) py = Scr->MyDisplayHeight - height - BW2; if (px < 0) px = 0; if (py < 0) py = 0; @@ -2649,7 +2649,7 @@ Identify (TwmWindow *t) px = py = 0; } XMoveResizeWindow(dpy, Scr->InfoWindow, px, py, width, height); - XMapRaised(dpy, Scr->InfoWindow); + XMapRaised(dpy, Scr->InfoWindow); InfoLines = n; } @@ -2658,18 +2658,18 @@ void SetMapStateProp(TwmWindow *tmp_win, int state) { unsigned long data[2]; /* "suggested" by ICCCM version 1 */ - + data[0] = (unsigned long) state; - data[1] = (unsigned long) (tmp_win->iconify_by_unmapping ? None : + data[1] = (unsigned long) (tmp_win->iconify_by_unmapping ? None : tmp_win->icon_w); - XChangeProperty (dpy, tmp_win->w, _XA_WM_STATE, _XA_WM_STATE, 32, + XChangeProperty (dpy, tmp_win->w, _XA_WM_STATE, _XA_WM_STATE, 32, PropModeReplace, (unsigned char *) data, 2); } -Bool +Bool GetWMState (Window w, int *statep, Window *iwp) { Atom actual_type; @@ -2705,7 +2705,7 @@ WarpToScreen (int n, int inc) while (!newscr) { /* wrap around */ - if (n < 0) + if (n < 0) n = NumScreens - 1; else if (n >= NumScreens) n = 0; @@ -2716,7 +2716,7 @@ WarpToScreen (int n, int inc) n += inc; continue; } - fprintf (stderr, "%s: unable to warp to unmanaged screen %d\n", + fprintf (stderr, "%s: unable to warp to unmanaged screen %d\n", ProgramName, n); Bell(XkbBI_MinorError,0,None); return; @@ -2750,7 +2750,7 @@ BumpWindowColormap (TwmWindow *tmp, int inc) if (inc && tmp->cmaps.number_cwins > 0) { cwins = (ColormapWindow **) malloc(sizeof(ColormapWindow *)* tmp->cmaps.number_cwins); - if (cwins) { + if (cwins) { if ((previously_installed = /* SUPPRESS 560 */(Scr->cmapInfo.cmaps == &tmp->cmaps && tmp->cmaps.number_cwins))) { @@ -2772,7 +2772,7 @@ BumpWindowColormap (TwmWindow *tmp, int inc) tmp->cmaps.cwins = cwins; if (tmp->cmaps.number_cwins > 1) - bzero (tmp->cmaps.scoreboard, + bzero (tmp->cmaps.scoreboard, ColormapsScoreboardLength(&tmp->cmaps)); if (previously_installed) @@ -2802,11 +2802,11 @@ SetBorder (TwmWindow *tmp, Bool onoroff) if (tmp->highlight) { if (onoroff) { XSetWindowBorder (dpy, tmp->frame, tmp->border); - if (tmp->title_w) + if (tmp->title_w) XSetWindowBorder (dpy, tmp->title_w, tmp->border); } else { XSetWindowBorderPixmap (dpy, tmp->frame, tmp->gray); - if (tmp->title_w) + if (tmp->title_w) XSetWindowBorderPixmap (dpy, tmp->title_w, tmp->gray); } } @@ -2838,14 +2838,14 @@ DestroyMenu (MenuRoot *menu) * warping routines */ -void +void WarpAlongRing (XButtonEvent *ev, Bool forward) { TwmWindow *r, *head; if (Scr->RingLeader) head = Scr->RingLeader; - else if (!(head = Scr->Ring)) + else if (!(head = Scr->Ring)) return; if (forward) { @@ -2874,9 +2874,9 @@ WarpAlongRing (XButtonEvent *ev, Bool forward) p->ring.cursor_valid = True; p->ring.curs_x = ev->x_root - t->frame_x; p->ring.curs_y = ev->y_root - t->frame_y; - if (p->ring.curs_x < -p->frame_bw || + if (p->ring.curs_x < -p->frame_bw || p->ring.curs_x >= p->frame_width + p->frame_bw || - p->ring.curs_y < -p->frame_bw || + p->ring.curs_y < -p->frame_bw || p->ring.curs_y >= p->frame_height + p->frame_bw) { /* somehow out of window */ p->ring.curs_x = p->frame_width / 2; @@ -2888,7 +2888,7 @@ WarpAlongRing (XButtonEvent *ev, Bool forward) -void +void WarpToWindow (TwmWindow *t) { int x, y; @@ -2918,7 +2918,7 @@ WarpToWindow (TwmWindow *t) * data[0] message atom * data[1] time stamp */ -static void +static void send_clientmessage (Window w, Atom a, Time timestamp) { XClientMessageEvent ev; |