Fix a segfault

This commit is contained in:
Kevin Lange 2012-12-10 20:17:25 -08:00
parent 70a5de56f4
commit 3335eee65f
2 changed files with 8 additions and 6 deletions

View File

@ -2,7 +2,7 @@ CC = i686-pc-toaru-gcc
CPP = i686-pc-toaru-g++
CFLAGS = -std=c99 -U__STRICT_ANSI__ -O3 -m32 -Wa,--32
CPPFLAGS = -O3 -m32 -Wa,--32
EXTRAFLAGS = -s
EXTRAFLAGS = -g
EXECUTABLES = $(patsubst %.c,../hdd/bin/%,$(wildcard *.c))

View File

@ -293,11 +293,13 @@ void set_focused_window(window_t * n_focused) {
send_window_event(focused->owner, WE_FOCUSCHG, &wwt);
}
focused = n_focused;
w_window_t wwt;
wwt.wid = focused->wid;
wwt.left = 1;
send_window_event(focused->owner, WE_FOCUSCHG, &wwt);
make_top(focused);
if (focused) {
w_window_t wwt;
wwt.wid = focused->wid;
wwt.left = 1;
send_window_event(focused->owner, WE_FOCUSCHG, &wwt);
make_top(focused);
}
}
}