fix segfault on focusout
This commit is contained in:
parent
47d61d34ae
commit
7ab9b06a04
|
@ -2307,7 +2307,7 @@ main(int argc, char **argv) {
|
||||||
case FocusIn: {
|
case FocusIn: {
|
||||||
if (!inactive_transparency) break;
|
if (!inactive_transparency) break;
|
||||||
win *fw = find_win(dpy, ev.xfocus.window);
|
win *fw = find_win(dpy, ev.xfocus.window);
|
||||||
if (fw->window_type == WINTYPE_NORMAL) {
|
if (fw && fw->window_type == WINTYPE_NORMAL) {
|
||||||
fw->opacity = OPAQUE;
|
fw->opacity = OPAQUE;
|
||||||
determine_mode(dpy, fw);
|
determine_mode(dpy, fw);
|
||||||
}
|
}
|
||||||
|
@ -2316,7 +2316,7 @@ main(int argc, char **argv) {
|
||||||
case FocusOut: {
|
case FocusOut: {
|
||||||
if (!inactive_transparency) break;
|
if (!inactive_transparency) break;
|
||||||
win *fw = find_win(dpy, ev.xfocus.window);
|
win *fw = find_win(dpy, ev.xfocus.window);
|
||||||
if (fw->window_type == WINTYPE_NORMAL) {
|
if (fw && fw->window_type == WINTYPE_NORMAL) {
|
||||||
fw->opacity = (unsigned long)((double)0.5 * OPAQUE);
|
fw->opacity = (unsigned long)((double)0.5 * OPAQUE);
|
||||||
determine_mode(dpy, fw);
|
determine_mode(dpy, fw);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue