diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-03-22 06:58:38 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-03-22 06:58:38 +0000 |
| commit | 9b514b3b6165c80cfe7152c2088a97765f6c82f4 (patch) | |
| tree | d85de6a62807386ad9ff0275e1e6b2c7f58a9f78 | |
| parent | d59db115520d7175b181c53d179c3ddb97c3139f (diff) | |
add the client_kill function, and the kill action, and bind it to the middle mouse button on the close button.
| -rw-r--r-- | openbox/action.c | 5 | ||||
| -rw-r--r-- | openbox/action.h | 2 | ||||
| -rw-r--r-- | openbox/client.c | 5 | ||||
| -rw-r--r-- | openbox/client.h | 5 | ||||
| -rw-r--r-- | plugins/mouse/mouse.c | 2 |
5 files changed, 18 insertions, 1 deletions
diff --git a/openbox/action.c b/openbox/action.c index 6a86cf33..3e463d66 100644 --- a/openbox/action.c +++ b/openbox/action.c @@ -73,6 +73,11 @@ void action_close(union ActionData *data) client_close(data->client.c); } +void action_kill(union ActionData *data) +{ + client_kill(data->client.c); +} + void action_shade(union ActionData *data) { client_shade(data->client.c, TRUE); diff --git a/openbox/action.h b/openbox/action.h index c8e00487..cf6f633e 100644 --- a/openbox/action.h +++ b/openbox/action.h @@ -104,6 +104,8 @@ void action_focusraise(union ActionData *data); /* ClientAction */ void action_close(union ActionData *data); /* ClientAction */ +void action_kill(union ActionData *data); +/* ClientAction */ void action_shade(union ActionData *data); /* ClientAction */ void action_unshade(union ActionData *data); diff --git a/openbox/client.c b/openbox/client.c index c35c62db..bb3b3767 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -1652,6 +1652,11 @@ void client_close(Client *self) XSendEvent(ob_display, self->window, FALSE, NoEventMask, &ce); } +void client_kill(Client *self) +{ + XKillClient(ob_display, self->window); +} + void client_set_desktop(Client *self, guint target) { guint old, i; diff --git a/openbox/client.h b/openbox/client.h index 34a61c96..808f4e5f 100644 --- a/openbox/client.h +++ b/openbox/client.h @@ -380,9 +380,12 @@ void client_maximize(Client *self, gboolean max, int dir, */ void client_shade(Client *self, gboolean shade); -/*! Request the client to close its window. */ +/*! Request the client to close its window */ void client_close(Client *self); +/*! Kill the client off violently */ +void client_kill(Client *self); + /*! Sends the window to the specified desktop */ void client_set_desktop(Client *self, guint target); diff --git a/plugins/mouse/mouse.c b/plugins/mouse/mouse.c index b332099a..ea943f5a 100644 --- a/plugins/mouse/mouse.c +++ b/plugins/mouse/mouse.c @@ -407,6 +407,8 @@ static void binddef() mbind("1", "icon", MouseAction_DClick, a); a = action_new(action_close); mbind("1", "close", MouseAction_Click, a); + a = action_new(action_kill); + mbind("2", "close", MouseAction_Click, a); a = action_new(action_toggle_omnipresent); mbind("1", "alldesktops", MouseAction_Click, a); |
