]> Dogcows Code - chaz/openbox/commitdiff
add a PlaceWindow event hook type
authorDana Jansens <danakj@orodu.net>
Tue, 7 Jan 2003 06:50:21 +0000 (06:50 +0000)
committerDana Jansens <danakj@orodu.net>
Tue, 7 Jan 2003 06:50:21 +0000 (06:50 +0000)
src/openbox_wrap.cc
src/python.hh
src/screen.cc

index bf1383eb7d3d9fb0d55be1277ee106ba2c7572d0..dfa50d662089694c549ab23a7eba7b33938b01af 100644 (file)
@@ -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 *)"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},
index 81b3b0ca3b11eb6b7acd72334131ea174d9d542c..cfa625d035fd36ed329239ac73f1fb83eff2153b 100644 (file)
@@ -52,6 +52,7 @@ enum KeyContext {
 enum EventAction {
   EventEnterWindow,
   EventLeaveWindow,
+  EventPlaceWindow,
   EventNewWindow,
   EventCloseWindow,
   EventStartup,
index a403fa13ad8e9709da54b7e36cf835ef0a45dd0b..f7587abcbfc6a9ed4e51fce2fedebb874c9b19bf 100644 (file)
@@ -493,7 +493,11 @@ void OBScreen::manageWindow(Window window)
   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
This page took 0.028099 seconds and 4 git commands to generate.