X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FWindow.cc;h=8899ff1646c73ee7f70091a097b3fecae4a6a600;hb=7d67f8557b3254aeb370a995f417c86606e8a67d;hp=4c7a31d76d9536751908b498a34af527875a1a84;hpb=ec5ea27e53fb638052e5f13b63afcb476a6eef38;p=chaz%2Fopenbox diff --git a/src/Window.cc b/src/Window.cc index 4c7a31d7..8899ff16 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -153,10 +153,17 @@ BlackboxWindow::BlackboxWindow(Blackbox *b, Window w, BScreen *s) { client.rect.setRect(wattrib.x, wattrib.y, wattrib.width, wattrib.height); client.old_bw = wattrib.border_width; - timer = 0; windowmenu = 0; lastButtonPressTime = 0; + timer = new BTimer(blackbox, this); + timer->setTimeout(blackbox->getAutoRaiseDelay()); + + if (! getBlackboxHints()) { + getMWMHints(); + getNetWMHints(); + } + // get size, aspect, minimum/maximum size and other hints set by the // client getWMProtocols(); @@ -169,14 +176,6 @@ BlackboxWindow::BlackboxWindow(Blackbox *b, Window w, BScreen *s) { return; } - timer = new BTimer(blackbox, this); - timer->setTimeout(blackbox->getAutoRaiseDelay()); - - if (! getBlackboxHints()) { - getMWMHints(); - getNetWMHints(); - } - frame.window = createToplevelWindow(); frame.plate = createChildWindow(frame.window); associateClientWindow(); @@ -2514,7 +2513,8 @@ void BlackboxWindow::mapRequestEvent(const XMapRequestEvent *re) { if (isNormal()) { if (! blackbox->isStartup()) { XSync(blackbox->getXDisplay(), False); // make sure the frame is mapped - if (isTransient() || screen->doFocusNew()) { + if (screen->doFocusNew()|| (isTransient() && getTransientFor() && + getTransientFor()->isFocused())) { setInputFocus(); } if (screen->getPlacementPolicy() == BScreen::ClickMousePlacement) {