all repos — openbox @ 7990e6fc46c4a73139cb59e2d17df37ff1fe4e0a

openbox fork - make it a bit more like ryudo

add a PlaceWindow event hook type
Dana Jansens danakj@orodu.net
commit

7990e6fc46c4a73139cb59e2d17df37ff1fe4e0a

parent

7ca4d1cf8a1fd3b414219c77a57fff7d333f5e7f

3 files changed, 7 insertions(+), 1 deletions(-)

jump to
M src/openbox_wrap.ccsrc/openbox_wrap.cc

@@ -3131,6 +3131,7 @@ { SWIG_PY_INT, (char *)"KC_All", (long) ob::KC_All, 0, 0, 0},

{ SWIG_PY_INT, (char *)"NUM_KEY_CONTEXT", (long) ob::NUM_KEY_CONTEXT, 0, 0, 0}, { SWIG_PY_INT, (char *)"EventEnterWindow", (long) ob::EventEnterWindow, 0, 0, 0}, { SWIG_PY_INT, (char *)"EventLeaveWindow", (long) ob::EventLeaveWindow, 0, 0, 0}, +{ SWIG_PY_INT, (char *)"EventPlaceWindow", (long) ob::EventPlaceWindow, 0, 0, 0}, { SWIG_PY_INT, (char *)"EventNewWindow", (long) ob::EventNewWindow, 0, 0, 0}, { SWIG_PY_INT, (char *)"EventCloseWindow", (long) ob::EventCloseWindow, 0, 0, 0}, { SWIG_PY_INT, (char *)"EventStartup", (long) ob::EventStartup, 0, 0, 0},
M src/python.hhsrc/python.hh

@@ -52,6 +52,7 @@

enum EventAction { EventEnterWindow, EventLeaveWindow, + EventPlaceWindow, EventNewWindow, EventCloseWindow, EventStartup,
M src/screen.ccsrc/screen.cc

@@ -493,7 +493,11 @@ // reparented back to root automatically

XChangeSaveSet(otk::OBDisplay::display, window, SetModeInsert); if (!client->positionRequested()) { - // XXX: position the window intelligenty + // position the window intelligenty .. hopefully :) + // call the python PLACEWINDOW binding + EventData *data = new_event_data(_number, window, EventPlaceWindow, 0); + Openbox::instance->bindings()->fireEvent(data); + Py_DECREF((PyObject*)data); } // create the decoration frame for the client window