From a9d6701d977700b18e31a70cc7982431bc702095 Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Thu, 18 Jun 2020 18:34:59 -0400 Subject: fix the cppcheck style- and format-warnings also bump version to 1.0.11.1, reflecting ongoing work since release Signed-off-by: Thomas E. Dickey --- src/add_window.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/add_window.c') diff --git a/src/add_window.c b/src/add_window.c index f919b77..e6bde43 100644 --- a/src/add_window.c +++ b/src/add_window.c @@ -147,11 +147,9 @@ TwmWindow * AddWindow(Window w, int iconm, IconMgr *iconp) { TwmWindow *tmp_win; /* new twm window structure */ - int stat; XEvent event; unsigned long valuemask; /* mask for create windows */ XSetWindowAttributes attributes; /* attributes for create windows */ - int width, height; /* tmp variable */ int ask_user; /* don't know where to put the window */ int gravx, gravy; /* gravity signs for positioning */ int namelen; @@ -289,12 +287,14 @@ AddWindow(Window w, int iconm, IconMgr *iconp) &tmp_win->class); if (tmp_win->auto_raise) Scr->NumAutoRaises++; - tmp_win->iconify_by_unmapping = Scr->IconifyByUnmapping; if (Scr->IconifyByUnmapping) { tmp_win->iconify_by_unmapping = iconm ? FALSE : !short_lookup LookInList(Scr->DontIconify, tmp_win->full_name, &tmp_win->class); } + else { + tmp_win->iconify_by_unmapping = Scr->IconifyByUnmapping; + } tmp_win->iconify_by_unmapping |= short_lookup LookInList(Scr->IconifyByUn, tmp_win->full_name, &tmp_win->class); @@ -427,11 +427,14 @@ AddWindow(Window w, int iconm, IconMgr *iconp) if (!(tmp_win->wmhints && tmp_win->wmhints->flags & StateHint && tmp_win->wmhints->initial_state == IconicState)) { Bool firsttime = True; + int height, width; /* better wait until all the mouse buttons have been * released. */ while (TRUE) { + int stat; + XUngrabServer(dpy); XSync(dpy, 0); XGrabServer(dpy); -- cgit v1.2.3