#include "i18n.hh"
#include "blackbox.hh"
+#include "Clientmenu.hh"
#include "Font.hh"
#include "GCCache.hh"
#include "Iconmenu.hh"
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();
return;
}
- timer = new BTimer(blackbox, this);
- timer->setTimeout(blackbox->getAutoRaiseDelay());
-
- if (! getBlackboxHints()) {
- getMWMHints();
- getNetWMHints();
- }
-
frame.window = createToplevelWindow();
frame.plate = createChildWindow(frame.window);
associateClientWindow();
if (isFocused())
blackbox->setFocusedWindow(this);
+
+ Clientmenu *menu = screen->getWorkspace(blackbox_attrib.workspace)->getMenu();
+ menu->setItemSelected(window_number, isFocused());
}
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) {