X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fscreen.cc;h=de1927b6ab7d037bdaf4d2ab8a89237d8e2103cf;hb=41a03629c9f166f7a1b427ed1634b44c6c38da6e;hp=d47a1540f83133130d2cf4e3e14c29e7c4914ba3;hpb=44d653e3e8d042bf3f1d68108a8197a895888da8;p=chaz%2Fopenbox diff --git a/src/screen.cc b/src/screen.cc index d47a1540..de1927b6 100644 --- a/src/screen.cc +++ b/src/screen.cc @@ -134,7 +134,7 @@ Screen::Screen(int screen) openbox->registerHandler(_info->rootWindow(), this); // call the python Startup callbacks - EventData data(_number, 0, EventAction::Shutdown, 0); + EventData data(_number, 0, EventAction::Startup, 0); openbox->bindings()->fireEvent(&data); } @@ -512,16 +512,15 @@ void Screen::manageWindow(Window window) // reparent the client to the frame client->frame->grabClient(); - if (!(openbox->state() == Openbox::State_Starting || - client->positionRequested())) { + if (openbox->state() != Openbox::State_Starting) { // position the window intelligenty .. hopefully :) // call the python PLACEWINDOW binding EventData data(_number, client, EventAction::PlaceWindow, 0); openbox->bindings()->fireEvent(&data); } - EventData data(_number, client, EventAction::DisplayingWindow, 0); - openbox->bindings()->fireEvent(&data); + EventData ddata(_number, client, EventAction::DisplayingWindow, 0); + openbox->bindings()->fireEvent(&ddata); // if on the current desktop.. (or all desktops) if (client->desktop() == _desktop || @@ -536,7 +535,7 @@ void Screen::manageWindow(Window window) // add to the screen's list clients.push_back(client); // once the client is in the list, update our strut to include the new - // client's + // client's (it is good that this happens after window placement!) updateStrut(); // this puts into the stacking order, then raises it _stacking.push_back(client); @@ -546,8 +545,8 @@ void Screen::manageWindow(Window window) openbox->bindings()->grabButtons(true, client); - EventData data(_number, client, EventAction::NewWindow, 0); - openbox->bindings()->fireEvent(&data); + EventData ndata(_number, client, EventAction::NewWindow, 0); + openbox->bindings()->fireEvent(&ndata); #ifdef DEBUG printf("Managed window 0x%lx frame 0x%lx\n", @@ -608,6 +607,10 @@ void Screen::unmanageWindow(Client *client) // remove from the screen's list clients.remove(client); + // once the client is out of the list, update our strut to remove it's + // influence + updateStrut(); + // unfocus the client (calls the focus callbacks) client->unfocus();