_focused = false;
// not a transient by default of course
_transient_for = 0;
+ // pick a layer to start from
+ _layer = Layer_Normal;
getArea();
getDesktop();
_above = true;
} else if (state ==
property->atom(otk::OBProperty::net_wm_state_below)) {
- printf("Setting below\n");
if (_below) continue;
_below = true;
}
} else if (e.message_type == property->atom(otk::OBProperty::net_wm_state)) {
// can't compress these
#ifdef DEBUG
- printf("below=%ld above=%ld\n", property->atom(otk::OBProperty::net_wm_state_below), property->atom(otk::OBProperty::net_wm_state_above));
printf("net_wm_state %s %ld %ld for 0x%lx\n",
(e.data.l[0] == 0 ? "Remove" : e.data.l[0] == 1 ? "Add" :
e.data.l[0] == 2 ? "Toggle" : "INVALID"),
#ifdef DEBUG
printf("net_active_window for 0x%lx\n", _window);
#endif
+ if (_shaded)
+ shade(false);
+ // XXX: deiconify
focus();
Openbox::instance->screen(_screen)->restack(true, this); // raise
}
_area.setPos(x, y);
// move the frame to be in the requested position
- if (frame) // this can be called while mapping, before frame exists
+ if (frame) { // this can be called while mapping, before frame exists
frame->adjustPosition();
+
+ // send synthetic configure notify (we don't need to if we aren't mapped
+ // yet)
+ XEvent event;
+ event.type = ConfigureNotify;
+ event.xconfigure.display = otk::OBDisplay::display;
+ event.xconfigure.event = _window;
+ event.xconfigure.window = _window;
+ event.xconfigure.x = x;
+ event.xconfigure.y = y;
+ event.xconfigure.width = _area.width();
+ event.xconfigure.height = _area.height();
+ event.xconfigure.border_width = _border_width;
+ event.xconfigure.above = frame->window();
+ event.xconfigure.override_redirect = False;
+ XSendEvent(event.xconfigure.display, event.xconfigure.window, False,
+ StructureNotifyMask, &event);
+ }
}
ce.xclient.data.l[2] = 0l;
ce.xclient.data.l[3] = 0l;
ce.xclient.data.l[4] = 0l;
- XSendEvent(otk::OBDisplay::display, _window, False, NoEventMask, &ce);
+ XSendEvent(otk::OBDisplay::display, _window, false, NoEventMask, &ce);
}