#include <X11/Xatom.h>
#include <X11/keysym.h>
-#include <assert.h>
#include "i18n.h"
#include "openbox.h"
#include "Workspace.h"
#include "Workspacemenu.h"
-#ifdef STDC_HEADERS
+#ifdef HAVE_STDLIB_H
# include <stdlib.h>
+#endif // HAVE_STDLIB_H
+
+#ifdef HAVE_STRING_H
# include <string.h>
+#endif // HAVE_STRING_H
+
+#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
-#endif // STDC_HEADERS
+#endif // HAVE_SYS_TYPES_H
#ifdef HAVE_CTYPE_H
# include <ctype.h>
iconList = new LinkedList<OpenboxWindow>;
image_control =
- new BImageControl(&openbox, this, True, openbox.getColorsPerChannel(),
+ new BImageControl(openbox, *this, True, openbox.getColorsPerChannel(),
openbox.getCacheLife(), openbox.getCacheMax());
image_control->installRootColormap();
root_colormap_installed = True;
void BScreen::LoadStyle(void) {
- obResource &conf = resource.styleconfig;
+ Resource &conf = resource.styleconfig;
conf.setFile(openbox.getStyleFilename());
if (!conf.load()) {
// load bevel, border and handle widths
if (conf.getValue("handleWidth", "HandleWidth", l)) {
- if (l <= getWidth() / 2 && l != 0)
+ if (l <= size().w() / 2 && l != 0)
resource.handle_width = l;
else
resource.handle_width = 6;
resource.border_width = 1;
if (conf.getValue("bevelWidth", "BevelWidth", l)) {
- if (l <= getWidth() / 2 && l != 0)
+ if (l <= size().w() / 2 && l != 0)
resource.bevel_width = l;
else
resource.bevel_width = 3;
resource.bevel_width = 3;
if (conf.getValue("frameWidth", "FrameWidth", l)) {
- if (l <= getWidth() / 2)
+ if (l <= size().w() / 2)
resource.frame_width = l;
else
resource.frame_width = resource.bevel_width;
void BScreen::showPosition(int x, int y) {
if (! geom_visible) {
XMoveResizeWindow(getBaseDisplay().getXDisplay(), geom_window,
- (getWidth() - geom_w) / 2,
- (getHeight() - geom_h) / 2, geom_w, geom_h);
+ (size().w() - geom_w) / 2,
+ (size().h() - geom_h) / 2, geom_w, geom_h);
XMapWindow(getBaseDisplay().getXDisplay(), geom_window);
XRaiseWindow(getBaseDisplay().getXDisplay(), geom_window);
void BScreen::showGeometry(unsigned int gx, unsigned int gy) {
if (! geom_visible) {
XMoveResizeWindow(getBaseDisplay().getXDisplay(), geom_window,
- (getWidth() - geom_w) / 2,
- (getHeight() - geom_h) / 2, geom_w, geom_h);
+ (size().w() - geom_w) / 2,
+ (size().h() - geom_h) / 2, geom_w, geom_h);
XMapWindow(getBaseDisplay().getXDisplay(), geom_window);
XRaiseWindow(getBaseDisplay().getXDisplay(), geom_window);
}
}
-
void BScreen::hideGeometry(void) {
if (geom_visible) {
XUnmapWindow(getBaseDisplay().getXDisplay(), geom_window);
geom_visible = False;
}
}
+
+void BScreen::saveToolbarHide(Bool b){
+ resource.toolbar_total_hide = b;
+ if (toolbar != NULL){
+ if (b)
+ toolbar->unMapToolbar();
+ else
+ toolbar->mapToolbar();
+ }
+
+}