if (! screen->sloppyFocus())
openbox.grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
- GrabModeSync, GrabModeSync, None, None);
+ GrabModeSync, GrabModeSync, frame.plate, None);
openbox.grabButton(Button1, Mod1Mask, frame.window, True,
ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
- GrabModeAsync, None, openbox.getMoveCursor());
+ GrabModeAsync, frame.window, openbox.getMoveCursor());
openbox.grabButton(Button2, Mod1Mask, frame.window, True,
- ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, None);
+ ButtonReleaseMask, GrabModeAsync, GrabModeAsync, frame.window, None);
openbox.grabButton(Button3, Mod1Mask, frame.window, True,
ButtonReleaseMask | ButtonMotionMask, GrabModeAsync,
- GrabModeAsync, None, None);
+ GrabModeAsync, frame.window, None);
positionWindows();
XRaiseWindow(display, frame.plate);
}
-void OpenboxWindow::positionButtons(Bool redecorate_label) {
+void OpenboxWindow::positionButtons() {
const char *format = openbox.getTitleBarLayout();
const unsigned int bw = frame.bevel_w + 1;
const unsigned int by = frame.bevel_w + 1;
}
}
- if (!hasclose) {
- openbox.removeWindowSearch(frame.close_button);
- XDestroyWindow(display, frame.close_button);
- frame.close_button = None;
+ if (!hasclose && frame.close_button) {
+ openbox.removeWindowSearch(frame.close_button);
+ XDestroyWindow(display, frame.close_button);
+ frame.close_button = None;
}
- if (!hasiconify) {
- openbox.removeWindowSearch(frame.iconify_button);
- XDestroyWindow(display, frame.iconify_button);
- frame.iconify_button = None;
+ if (!hasiconify && frame.iconify_button) {
+ openbox.removeWindowSearch(frame.iconify_button);
+ XDestroyWindow(display, frame.iconify_button);
+ frame.iconify_button = None;
}
- if (!hasmaximize) {
- openbox.removeWindowSearch(frame.maximize_button);
- XDestroyWindow(display, frame.maximize_button);
- frame.maximize_button = None;
+ if (!hasmaximize && frame.iconify_button) {
+ openbox.removeWindowSearch(frame.maximize_button);
+ XDestroyWindow(display, frame.maximize_button);
+ frame.maximize_button = None;
}
- if (redecorate_label)
- decorateLabel();
+
redrawLabel();
redrawAllButtons();
}
XMoveWindow(display, frame.window, frame.x, frame.y);
+ setFocusFlag(flags.focused);
positionWindows();
decorate();
- setFocusFlag(flags.focused);
- redrawAllButtons();
} else {
frame.x = dx;
frame.y = dy;
openbox_attrib.premax_x = openbox_attrib.premax_y = 0;
openbox_attrib.premax_w = openbox_attrib.premax_h = 0;
- redrawAllButtons();
+ redrawMaximizeButton(flags.maximized);
setState(current_state);
return;
}
configure(dx, dy, dw, dh);
screen->getWorkspace(workspace_number)->raiseWindow(this);
- redrawAllButtons();
+ redrawMaximizeButton(flags.maximized);
setState(current_state);
}
openbox.grab();
if (! validateClient()) return;
- if (decorations.titlebar) positionButtons();
-
setState(NormalState);
- redrawAllButtons();
-
if (flags.transient || screen->focusNew())
setInputFocus();
else
if (decorations.close && (! frame.close_button)) {
createCloseButton();
- if (decorations.titlebar) positionButtons(True);
+ if (decorations.titlebar) {
+ positionButtons();
+ decorateLabel();
+ }
if (windowmenu) windowmenu->reconfigure();
}
}