From bb8b9ddbc5c7932f184aeed744f4762b5c95fe28 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sun, 13 Apr 2003 08:36:38 +0000 Subject: pass the Client for frame_context cuz the client might be NULL --- openbox/frame.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'openbox/frame.c') diff --git a/openbox/frame.c b/openbox/frame.c index 765c4b59..a223aa5e 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -646,12 +646,15 @@ Context frame_context_from_string(char *name) return Context_None; } -Context frame_context(Frame *self, Window win) +Context frame_context(Client *client, Window win) { + Frame *self; + if (win == ob_root) return Context_Root; - if (self == NULL) return Context_None; - if (win == self->client->window) return Context_Client; + if (client == NULL) return Context_None; + if (win == client->window) return Context_Client; + self = client->frame; if (win == self->window) return Context_Frame; if (win == self->plate) return Context_Client; if (win == self->title) return Context_Titlebar; -- cgit v1.2.3