X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fscreen.cc;h=3c364b4c25827528beede789704b8ba7ae5cd943;hb=6062fe404ce5f2505494132d5454370d696625ca;hp=f7587abcbfc6a9ed4e51fce2fedebb874c9b19bf;hpb=7990e6fc46c4a73139cb59e2d17df37ff1fe4e0a;p=chaz%2Fopenbox diff --git a/src/screen.cc b/src/screen.cc index f7587abc..3c364b4c 100644 --- a/src/screen.cc +++ b/src/screen.cc @@ -459,19 +459,21 @@ void OBScreen::manageWindow(Window window) XWMHints *wmhint; XSetWindowAttributes attrib_set; + otk::OBDisplay::grab(); + // is the window a docking app if ((wmhint = XGetWMHints(otk::OBDisplay::display, window))) { if ((wmhint->flags & StateHint) && wmhint->initial_state == WithdrawnState) { //slit->addClient(w); // XXX: make dock apps work! + otk::OBDisplay::ungrab(); + XFree(wmhint); return; } XFree(wmhint); } - otk::OBDisplay::grab(); - // choose the events we want to receive on the CLIENT window attrib_set.event_mask = OBClient::event_mask; attrib_set.do_not_propagate_mask = OBClient::no_propagate_mask; @@ -492,7 +494,8 @@ void OBScreen::manageWindow(Window window) // reparented back to root automatically XChangeSaveSet(otk::OBDisplay::display, window, SetModeInsert); - if (!client->positionRequested()) { + if (!(Openbox::instance->state() == Openbox::State_Starting || + client->positionRequested())) { // position the window intelligenty .. hopefully :) // call the python PLACEWINDOW binding EventData *data = new_event_data(_number, window, EventPlaceWindow, 0); @@ -516,12 +519,9 @@ void OBScreen::manageWindow(Window window) Openbox::instance->addClient(client->frame->grip_left(), client); Openbox::instance->addClient(client->frame->grip_right(), client); - bool shown = false; - // if on the current desktop.. (or all desktops) if (client->desktop() == _desktop || client->desktop() == (signed)0xffffffff) { - shown = true; client->frame->show(); }