add the client_kill function, and the kill action, and bind it to the middle mouse...
authorDana Jansens <danakj@orodu.net>
Sat, 22 Mar 2003 06:58:38 +0000 (06:58 +0000)
committerDana Jansens <danakj@orodu.net>
Sat, 22 Mar 2003 06:58:38 +0000 (06:58 +0000)
openbox/action.c
openbox/action.h
openbox/client.c
openbox/client.h
plugins/mouse/mouse.c

index 6a86cf3..3e463d6 100644 (file)
@@ -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);
index c8e0048..cf6f633 100644 (file)
@@ -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);
index c35c62d..bb3b376 100644 (file)
@@ -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;
index 34a61c9..808f4e5 100644 (file)
@@ -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);
 
index b332099..ea943f5 100644 (file)
@@ -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);