X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fscreen.cc;h=8ea1b49ea8a0432f48bf86ed50278a9434cbb880;hb=eef665c6b899cea2598b4b5cbfc4129dcf90287f;hp=d9067aa05f9e789e7470545f4f556d3ad5ff71fb;hpb=056ff3b50cddd39b6f45969c17611dc3bf396ae9;p=chaz%2Fopenbox diff --git a/src/screen.cc b/src/screen.cc index d9067aa0..8ea1b49e 100644 --- a/src/screen.cc +++ b/src/screen.cc @@ -520,7 +520,13 @@ void OBScreen::manageWindow(Window window) Openbox::instance->bindings()->grabButtons(true, client); // XXX: make this optional or more intelligent - client->focus(); + if (client->normal()) + client->focus(); + + // call the python NEWWINDOW binding + EventData *data = new_event_data(window, EventNewWindow, 0); + Openbox::instance->bindings()->fireEvent(data); + Py_DECREF((PyObject*)data); } @@ -528,6 +534,11 @@ void OBScreen::unmanageWindow(OBClient *client) { OBFrame *frame = client->frame; + // call the python CLOSEWINDOW binding + EventData *data = new_event_data(client->window(), EventCloseWindow, 0); + Openbox::instance->bindings()->fireEvent(data); + Py_DECREF((PyObject*)data); + Openbox::instance->bindings()->grabButtons(false, client); // remove from the stacking order