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/mouse.c | |
| parent | 0844866bbd05ea6673f64f23f729d9a43fe041b8 (diff) | |
grab root mouse bindings on desktop windows also, since they are conceptually the desktop.
Diffstat (limited to 'openbox/mouse.c')
| -rw-r--r-- | openbox/mouse.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/openbox/mouse.c b/openbox/mouse.c index bb768928..93d00784 100644 --- a/openbox/mouse.c +++ b/openbox/mouse.c @@ -17,6 +17,10 @@ typedef struct { GSList *actions[OB_MOUSE_NUM_ACTIONS]; /* lists of Action pointers */ } ObMouseBinding; +#define CLIENT_CONTEXT(co, cl) (co == OB_FRAME_CONTEXT_CLIENT || \ + (co == OB_FRAME_CONTEXT_ROOT && \ + cl->type == OB_CLIENT_TYPE_DESKTOP)) + /* Array of GSList*s of PointerBinding*s. */ static GSList *bound_contexts[OB_FRAME_NUM_CONTEXTS]; @@ -37,7 +41,7 @@ void mouse_grab_for_client(ObClient *client, gboolean grab) win = client->frame->window; mode = GrabModeAsync; mask = ButtonPressMask | ButtonMotionMask | ButtonReleaseMask; - } else if (i == OB_FRAME_CONTEXT_CLIENT) { + } else if (CLIENT_CONTEXT(i, client)) { win = client->frame->plate; mode = GrabModeSync; /* this is handled in event */ mask = ButtonPressMask; /* can't catch more than this with Sync @@ -211,7 +215,7 @@ void mouse_event(ObClient *client, ObFrameContext context, XEvent *e) e->xbutton.button, e->xbutton.x_root, e->xbutton.y_root); - if (context == OB_FRAME_CONTEXT_CLIENT) { + if (CLIENT_CONTEXT(context, client)) { /* Replay the event, so it goes to the client*/ XAllowEvents(ob_display, ReplayPointer, event_lasttime); /* Fall through to the release case! */ |
