From 6375df675f01dd1a9bc625e95d799b9cb40bcda3 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 20 Aug 2003 06:17:43 +0000 Subject: grab root mouse bindings on desktop windows also, since they are conceptually the desktop. --- openbox/frame.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'openbox/frame.c') diff --git a/openbox/frame.c b/openbox/frame.c index 4ecc7b61..0d5ddb2e 100644 --- a/openbox/frame.c +++ b/openbox/frame.c @@ -640,11 +640,24 @@ ObFrameContext frame_context(ObClient *client, Window win) if (win == RootWindow(ob_display, ob_screen)) return OB_FRAME_CONTEXT_ROOT; if (client == NULL) return OB_FRAME_CONTEXT_NONE; - if (win == client->window) return OB_FRAME_CONTEXT_CLIENT; + if (win == client->window) { + /* conceptually, this is the root window, as far as users are + concerned */ + if (client->type == OB_CLIENT_TYPE_DESKTOP) + return OB_FRAME_CONTEXT_ROOT; + return OB_FRAME_CONTEXT_CLIENT; + } self = client->frame; + if (win == self->plate) { + /* conceptually, this is the root window, as far as users are + concerned */ + if (client->type == OB_CLIENT_TYPE_DESKTOP) + return OB_FRAME_CONTEXT_ROOT; + return OB_FRAME_CONTEXT_CLIENT; + } + if (win == self->window) return OB_FRAME_CONTEXT_FRAME; - if (win == self->plate) return OB_FRAME_CONTEXT_CLIENT; if (win == self->title) return OB_FRAME_CONTEXT_TITLEBAR; if (win == self->label) return OB_FRAME_CONTEXT_TITLEBAR; if (win == self->handle) return OB_FRAME_CONTEXT_HANDLE; -- cgit v1.2.3