diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-03-19 17:23:19 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-03-19 17:23:19 +0000 |
| commit | 78e64a0afffc29c3bbe019ee4add563c46d05dca (patch) | |
| tree | eaa012a26db8a1f0d95cb676042c91db42442832 | |
| parent | d42335e54d9eb70957eb3f4938b69cc3682cfec2 (diff) | |
add click on client binding. XAllow when clicking on the client
| -rw-r--r-- | plugins/mouse/mouse.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/plugins/mouse/mouse.c b/plugins/mouse/mouse.c index 9fc111a9..f1d872e8 100644 --- a/plugins/mouse/mouse.c +++ b/plugins/mouse/mouse.c @@ -213,7 +213,16 @@ static void event(ObEvent *e, void *foo) e->data.x.e->xbutton.window), e->data.x.client, e->data.x.e->xbutton.state, e->data.x.e->xbutton.button); - break; + + /* XXX dont look up the context so many times */ + if (engine_get_context(e->data.x.client, + e->data.x.e->xbutton.window) == + g_quark_try_string("client")) { + /* Replay the event, so it goes to the client*/ + XAllowEvents(ob_display, ReplayPointer, CurrentTime); + /* Fall through to the release case! */ + } else + break; case Event_X_ButtonRelease: if (e->data.x.e->xbutton.button == button) { @@ -367,9 +376,9 @@ static void binddef() a = action_new(action_resize); mbind("A-3", "frame", MouseAction_Motion, a); - a = action_new(action_raise); + a = action_new(action_focusraise); mbind("1", "titlebar", MouseAction_Press, a); - a = action_new(action_raise); + a = action_new(action_focusraise); mbind("1", "handle", MouseAction_Press, a); a = action_new(action_lower); mbind("2", "titlebar", MouseAction_Press, a); @@ -380,6 +389,9 @@ static void binddef() a = action_new(action_lower); mbind("A-3", "frame", MouseAction_Click, a); + a = action_new(action_focusraise); + mbind("1", "client", MouseAction_Press, a); + a = action_new(action_toggle_shade); mbind("1", "titlebar", MouseAction_DClick, a); a = action_new(action_shade); |
