- if (! blackbox->isStartup() && (isTransient() || screen->doFocusNew())) {
- XSync(blackbox->getXDisplay(), False); // make sure the frame is mapped..
- setInputFocus();
+ if (isNormal()) {
+ if (! blackbox->isStartup()) {
+ XSync(blackbox->getXDisplay(), False); // make sure the frame is mapped
+ if (screen->doFocusNew()|| (isTransient() && getTransientFor() &&
+ getTransientFor()->isFocused())) {
+ setInputFocus();
+ }
+ if (screen->getPlacementPolicy() == BScreen::ClickMousePlacement) {
+ int x, y, rx, ry;
+ Window c, r;
+ unsigned int m;
+ XQueryPointer(blackbox->getXDisplay(), screen->getRootWindow(),
+ &r, &c, &rx, &ry, &x, &y, &m);
+ beginMove(rx, ry);
+ }
+ }