From: Dana Jansens Date: Fri, 23 May 2003 02:00:54 +0000 (+0000) Subject: missed a case of using the stacking list and assuming that its all clients still... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=b69473054b3cb2e47192e892ce834bf34f56003b;p=chaz%2Fopenbox missed a case of using the stacking list and assuming that its all clients still. fixed that assumption now. --- diff --git a/openbox/focus.c b/openbox/focus.c index 949a3291..ebe93a76 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -122,13 +122,17 @@ static gboolean focus_under_pointer() if (ob_pointer_pos(&x, &y)) { for (it = stacking_list; it != NULL; it = it->next) { - Client *c = it->data; - if (c->desktop == screen_desktop && - RECT_CONTAINS(c->frame->area, x, y)) - break; + if (WINDOW_IS_CLIENT(it->data)) { + Client *c = WINDOW_AS_CLIENT(it->data); + if (c->desktop == screen_desktop && + RECT_CONTAINS(c->frame->area, x, y)) + break; + } } - if (it != NULL) + if (it != NULL) { + g_assert(WINDOW_IS_CLIENT(it->data)); return client_normal(it->data) && client_focus(it->data); + } } return FALSE; }