summaryrefslogtreecommitdiff
path: root/src/add_window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/add_window.c')
-rw-r--r--src/add_window.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/add_window.c b/src/add_window.c
index 44e1bed..154a369 100644
--- a/src/add_window.c
+++ b/src/add_window.c
@@ -72,6 +72,8 @@ in this Software without prior written authorization from The Open Group.
#include "session.h"
#include "add_window.h"
+#define short_lookup (short)(long)(void*)
+
#define gray_width 2
#define gray_height 2
static char gray_bits[] = {
@@ -271,31 +273,31 @@ AddWindow(Window w, int iconm, IconMgr *iconp)
namelen = (int) strlen(tmp_win->name);
tmp_win->highlight = Scr->Highlight &&
- (!(short) (long) LookInList(Scr->NoHighlight, tmp_win->full_name,
- &tmp_win->class));
+ (!short_lookup LookInList(Scr->NoHighlight, tmp_win->full_name,
+ &tmp_win->class));
tmp_win->stackmode = Scr->StackMode &&
- (!(short) (long) LookInList(Scr->NoStackModeL, tmp_win->full_name,
- &tmp_win->class));
+ (!short_lookup LookInList(Scr->NoStackModeL, tmp_win->full_name,
+ &tmp_win->class));
tmp_win->titlehighlight = Scr->TitleHighlight &&
- (!(short) (long) LookInList(Scr->NoTitleHighlight, tmp_win->full_name,
- &tmp_win->class));
+ (!short_lookup LookInList(Scr->NoTitleHighlight, tmp_win->full_name,
+ &tmp_win->class));
- tmp_win->auto_raise = (short) (long) LookInList(Scr->AutoRaise,
- tmp_win->full_name,
- &tmp_win->class);
+ tmp_win->auto_raise = short_lookup LookInList(Scr->AutoRaise,
+ tmp_win->full_name,
+ &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) (long) LookInList(Scr->DontIconify, tmp_win->full_name,
- &tmp_win->class);
+ !short_lookup LookInList(Scr->DontIconify, tmp_win->full_name,
+ &tmp_win->class);
}
tmp_win->iconify_by_unmapping |=
- (short) (long) LookInList(Scr->IconifyByUn, tmp_win->full_name,
- &tmp_win->class);
+ short_lookup LookInList(Scr->IconifyByUn, tmp_win->full_name,
+ &tmp_win->class);
if (LookInList(Scr->WindowRingL, tmp_win->full_name, &tmp_win->class)) {
if (Scr->Ring) {
@@ -1049,6 +1051,7 @@ GrabKeys(TwmWindow *tmp_win)
if (tmp_win->icon_w)
XGrabKey(dpy, tmp->keycode, (unsigned) tmp->mods,
tmp_win->icon_w, True, GrabModeAsync, GrabModeAsync);
+ /* FALLTHRU */
case C_TITLE:
if (tmp_win->title_w)