diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-08-20 06:17:43 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-08-20 06:17:43 +0000 |
| commit | 6375df675f01dd1a9bc625e95d799b9cb40bcda3 (patch) | |
| tree | f1120f7e3b711f3cf27c5277d509c65dbb0d83cf /openbox/frame.c | |
| parent | 0844866bbd05ea6673f64f23f729d9a43fe041b8 (diff) | |
grab root mouse bindings on desktop windows also, since they are conceptually the desktop.
Diffstat (limited to 'openbox/frame.c')
| -rw-r--r-- | openbox/frame.c | 17 |
1 files changed, 15 insertions, 2 deletions
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; |
