#include <X11/Xatom.h>
#include <X11/keysym.h>
-#ifdef STDC_HEADERS
+#ifdef HAVE_STRING_H
# include <string.h>
-#endif // STDC_HEADERS
+#endif // HAVE_STRING_H
#ifdef DEBUG
# ifdef HAVE_STDIO_H
if ((openbox.isStartup()) ||
(frame.x >= 0 &&
(signed) (frame.y + frame.y_border) >= 0 &&
- frame.x <= (signed) screen->getWidth() &&
- frame.y <= (signed) screen->getHeight()))
+ frame.x <= (signed) screen->size().w() &&
+ frame.y <= (signed) screen->size().h()))
place_window = False;
}
associateClientWindow();
- if (! screen->isSloppyFocus())
+ if (! screen->sloppyFocus())
openbox.grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
GrabModeSync, GrabModeSync, None, None);
configure(frame.x, frame.y, frame.width, frame.height);
- if (! screen->isSloppyFocus())
+ if (! screen->sloppyFocus())
openbox.grabButton(Button1, 0, frame.plate, True, ButtonPressMask,
GrabModeSync, GrabModeSync, None, None);
else
client.min_width = client.min_height =
client.base_width = client.base_height =
client.width_inc = client.height_inc = 1;
- client.max_width = screen->getWidth();
- client.max_height = screen->getHeight();
+ client.max_width = screen->size().w();
+ client.max_height = screen->size().h();
client.min_aspect_x = client.min_aspect_y =
client.max_aspect_x = client.max_aspect_y = 1;
client.win_gravity = NorthWestGravity;
if (((signed) (frame.x + frame.width)) < 0) {
if (((signed) (frame.y + frame.y_border)) < 0)
configure(frame.border_w, frame.border_w, frame.width, frame.height);
- else if (frame.y > (signed) screen->getHeight())
- configure(frame.border_w, screen->getHeight() - frame.height,
+ else if (frame.y > (signed) screen->size().h())
+ configure(frame.border_w, screen->size().h() - frame.height,
frame.width, frame.height);
else
configure(frame.border_w, frame.y + frame.border_w,
frame.width, frame.height);
- } else if (frame.x > (signed) screen->getWidth()) {
+ } else if (frame.x > (signed) screen->size().w()) {
if (((signed) (frame.y + frame.y_border)) < 0)
- configure(screen->getWidth() - frame.width, frame.border_w,
+ configure(screen->size().w() - frame.width, frame.border_w,
frame.width, frame.height);
- else if (frame.y > (signed) screen->getHeight())
- configure(screen->getWidth() - frame.width,
- screen->getHeight() - frame.height, frame.width, frame.height);
+ else if (frame.y > (signed) screen->size().h())
+ configure(screen->size().w() - frame.width,
+ screen->size().h() - frame.height, frame.width, frame.height);
else
- configure(screen->getWidth() - frame.width,
+ configure(screen->size().w() - frame.width,
frame.y + frame.border_w, frame.width, frame.height);
}
XSendEvent(display, client.window, False, NoEventMask, &ce);
}
- if (screen->isSloppyFocus() && screen->doAutoRaise())
+ if (screen->sloppyFocus() && screen->autoRaise())
timer->start();
ret = True;
XMapSubwindows(display, frame.window);
XMapWindow(display, frame.window);
- if (flags.iconic && screen->doFocusNew()) setInputFocus();
+ if (flags.iconic && screen->focusNew()) setInputFocus();
flags.visible = True;
flags.iconic = False;
openbox_attrib.premax_w = frame.width;
openbox_attrib.premax_h = frame.height;
- dw = screen->getWidth();
+ dw = screen->size().w();
dw -= frame.border_w * 2;
dw -= frame.mwm_border_w * 2;
dw -= client.base_width;
- dh = screen->getHeight();
+ dh = screen->size().h();
dh -= frame.border_w * 2;
dh -= frame.mwm_border_w * 2;
dh -= ((frame.handle_h + frame.border_w) * decorations.handle);
dh -= client.base_height;
dh -= frame.y_border;
- if (! screen->doFullMax())
+ if (! screen->fullMax())
dh -= screen->getToolbar()->getExposedHeight() + frame.border_w;
if (dw < client.min_width) dw = client.min_width;
dh += ((frame.handle_h + frame.border_w) * decorations.handle);
dh += frame.mwm_border_w * 2;
- dx += ((screen->getWidth() - dw) / 2) - frame.border_w;
+ dx += ((screen->size().w() - dw) / 2) - frame.border_w;
- if (screen->doFullMax()) {
- dy += ((screen->getHeight() - dh) / 2) - frame.border_w;
+ if (screen->fullMax()) {
+ dy += ((screen->size().h() - dh) / 2) - frame.border_w;
} else {
- dy += (((screen->getHeight() - screen->getToolbar()->getExposedHeight())
+ dy += (((screen->size().h() - screen->getToolbar()->getExposedHeight())
- dh) / 2) - frame.border_w;
- switch (screen->getToolbarPlacement()) {
+ switch (screen->getToolbar()->placement()) {
case Toolbar::TopLeft:
case Toolbar::TopCenter:
case Toolbar::TopRight:
XSetWindowBorder(display, frame.plate, frame.uborder_pixel);
}
- if (screen->isSloppyFocus() && screen->doAutoRaise() && timer->isTiming())
+ if (screen->sloppyFocus() && screen->autoRaise() && timer->isTiming())
timer->stop();
}
redrawAllButtons();
- if (flags.transient || screen->doFocusNew())
+ if (flags.transient || screen->focusNew())
setInputFocus();
else
setFocusFlag(False);
shade();
}
- if (! (flags.focused || screen->isSloppyFocus()) ) {
+ if (! (flags.focused || screen->sloppyFocus()) ) {
setInputFocus(); // any click focus' the window in 'click to focus'
}
if (stack_change < 0) {
flags.moving = False;
openbox.maskWindowEvents(0, (OpenboxWindow *) 0);
- if (!screen->doOpaqueMove()) {
+ if (!screen->opaqueMove()) {
XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),
frame.move_x, frame.move_y, frame.resize_w - 1,
frame.resize_h - 1);
openbox.maskWindowEvents(client.window, this);
- if (! screen->doOpaqueMove()) {
+ if (! screen->opaqueMove()) {
openbox.grab();
frame.move_x = frame.x;
dx -= frame.border_w;
dy -= frame.border_w;
- int snap_distance = screen->getEdgeSnapThreshold();
+ int snap_distance = screen->edgeSnapThreshold();
// width/height of the snapping window
unsigned int snap_w = frame.width + (frame.border_w * 2);
- unsigned int snap_h = getHeight() + (frame.border_w * 2);
+ unsigned int snap_h = size().h() + (frame.border_w * 2);
if (snap_distance) {
- int drx = screen->getWidth() - (dx + snap_w);
+ int drx = screen->size().w() - (dx + snap_w);
if (dx < drx && (dx > 0 && dx < snap_distance) ||
(dx < 0 && dx > -snap_distance) )
dx = 0;
else if ( (drx > 0 && drx < snap_distance) ||
(drx < 0 && drx > -snap_distance) )
- dx = screen->getWidth() - snap_w;
+ dx = screen->size().w() - snap_w;
int dtty, dbby, dty, dby;
- switch (screen->getToolbarPlacement()) {
+ switch (screen->getToolbar()->placement()) {
case Toolbar::TopLeft:
case Toolbar::TopCenter:
case Toolbar::TopRight:
dtty = screen->getToolbar()->getExposedHeight() +
frame.border_w;
- dbby = screen->getHeight();
+ dbby = screen->size().h();
break;
default:
dy = dbby - snap_h;
}
- if (screen->doOpaqueMove()) {
+ if (screen->opaqueMove()) {
configure(dx, dy, frame.width, frame.height);
} else {
XDrawRectangle(display, screen->getRootWindow(), screen->getOpGC(),