From a8034686351a4f6a3b69a836cb09c40606127f81 Mon Sep 17 00:00:00 2001 From: Sean Pringle Date: Tue, 1 Oct 2013 12:39:38 +1000 Subject: [PATCH] fullscreen flash crash bug --- action.c | 8 ++++++-- xoat.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/action.c b/action.c index 417166a..14fb1a7 100644 --- a/action.c +++ b/action.c @@ -105,8 +105,12 @@ void action_focus_monitor(void *data, int num, client *cli) void action_fullscreen(void *data, int num, client *cli) { if (!cli) return; - if (cli->full && GETPROP_LONG(cli->window, atoms[XOAT_SPOT], &cli->spot, 1)); - else SETPROP_LONG(cli->window, atoms[XOAT_SPOT], &cli->spot, 1); + + unsigned long spot; + if (cli->full && GETPROP_LONG(cli->window, atoms[XOAT_SPOT], &spot, 1)) + cli->spot = spot; + + SETPROP_LONG(cli->window, atoms[XOAT_SPOT], &cli->spot, 1); client_toggle_state(cli, atoms[_NET_WM_STATE_FULLSCREEN]); client_place_spot(cli, cli->full ? SPOT1: cli->spot, cli->monitor, 1); client_update_border(cli); diff --git a/xoat.c b/xoat.c index 2cd9d8e..7cd51d9 100644 --- a/xoat.c +++ b/xoat.c @@ -197,6 +197,7 @@ int oops(Display *d, XErrorEvent *ee) if (ee->error_code == BadWindow || (ee->request_code == X_SetInputFocus && ee->error_code == BadMatch) || (ee->request_code == X_ConfigureWindow && ee->error_code == BadMatch) + || (ee->request_code == X_ConfigureWindow && ee->error_code == BadValue) || (ee->request_code == X_GrabButton && ee->error_code == BadAccess) || (ee->request_code == X_GrabKey && ee->error_code == BadAccess) ) return 0;