summaryrefslogtreecommitdiff
path: root/src/client.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-25 05:46:02 +0000
committerDana Jansens <danakj@orodu.net>2002-12-25 05:46:02 +0000
commit0816364a039fb0a0b2f989394ffb6af0b5221b3f (patch)
tree9a3a93f237aa3b90550a0773d502bed5abb3b022 /src/client.cc
parentb34824a4e2ddc0247099fa1b3952de426bfde05b (diff)
handle mouse clicks in the python scripts now
Diffstat (limited to 'src/client.cc')
-rw-r--r--src/client.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/client.cc b/src/client.cc
index a0dc6d76..a22a18a6 100644
--- a/src/client.cc
+++ b/src/client.cc
@@ -835,6 +835,30 @@ void OBClient::move(int x, int y)
}
+void OBClient::close()
+{
+ XEvent ce;
+ const otk::OBProperty *property = Openbox::instance->property();
+
+ if (!(_functions & Func_Close)) return;
+
+ // XXX: itd be cool to do timeouts and shit here for killing the client's
+ // process off
+
+ ce.xclient.type = ClientMessage;
+ ce.xclient.message_type = property->atom(otk::OBProperty::wm_protocols);
+ ce.xclient.display = otk::OBDisplay::display;
+ ce.xclient.window = _window;
+ ce.xclient.format = 32;
+ ce.xclient.data.l[0] = property->atom(otk::OBProperty::wm_delete_window);
+ ce.xclient.data.l[1] = CurrentTime;
+ ce.xclient.data.l[2] = 0l;
+ ce.xclient.data.l[3] = 0l;
+ ce.xclient.data.l[4] = 0l;
+ XSendEvent(otk::OBDisplay::display, _window, False, NoEventMask, &ce);
+}
+
+
void OBClient::configureRequestHandler(const XConfigureRequestEvent &e)
{
OtkEventHandler::configureRequestHandler(e);