add a PlaceWindow event hook type
This commit is contained in:
parent
7ca4d1cf8a
commit
7990e6fc46
3 changed files with 7 additions and 1 deletions
|
@ -3131,6 +3131,7 @@ static swig_const_info swig_const_table[] = {
|
||||||
{ SWIG_PY_INT, (char *)"NUM_KEY_CONTEXT", (long) ob::NUM_KEY_CONTEXT, 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 *)"EventEnterWindow", (long) ob::EventEnterWindow, 0, 0, 0},
|
||||||
{ SWIG_PY_INT, (char *)"EventLeaveWindow", (long) ob::EventLeaveWindow, 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 *)"EventNewWindow", (long) ob::EventNewWindow, 0, 0, 0},
|
||||||
{ SWIG_PY_INT, (char *)"EventCloseWindow", (long) ob::EventCloseWindow, 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},
|
{ SWIG_PY_INT, (char *)"EventStartup", (long) ob::EventStartup, 0, 0, 0},
|
||||||
|
|
|
@ -52,6 +52,7 @@ enum KeyContext {
|
||||||
enum EventAction {
|
enum EventAction {
|
||||||
EventEnterWindow,
|
EventEnterWindow,
|
||||||
EventLeaveWindow,
|
EventLeaveWindow,
|
||||||
|
EventPlaceWindow,
|
||||||
EventNewWindow,
|
EventNewWindow,
|
||||||
EventCloseWindow,
|
EventCloseWindow,
|
||||||
EventStartup,
|
EventStartup,
|
||||||
|
|
|
@ -493,7 +493,11 @@ void OBScreen::manageWindow(Window window)
|
||||||
XChangeSaveSet(otk::OBDisplay::display, window, SetModeInsert);
|
XChangeSaveSet(otk::OBDisplay::display, window, SetModeInsert);
|
||||||
|
|
||||||
if (!client->positionRequested()) {
|
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
|
// create the decoration frame for the client window
|
||||||
|
|
Loading…
Reference in a new issue