]> Dogcows Code - chaz/openbox/blobdiff - src/Screen.cc
renamed the obResource class to Resource.
[chaz/openbox] / src / Screen.cc
index 368a6e8f14d79e6a08d04ed63411072261d65459..08c2d9eeb14eed235e2dd8a499ccdf3c1982ee28 100644 (file)
 #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>
@@ -990,7 +996,7 @@ void BScreen::removeWorkspaceNames(void) {
 
 
 void BScreen::LoadStyle(void) {
-  obResource &conf = resource.styleconfig;
+  Resource &conf = resource.styleconfig;
   
   conf.setFile(openbox.getStyleFilename());
   if (!conf.load()) {
@@ -1252,7 +1258,7 @@ void BScreen::LoadStyle(void) {
 
   // 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;
@@ -1265,7 +1271,7 @@ void BScreen::LoadStyle(void) {
     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;
@@ -1273,7 +1279,7 @@ void BScreen::LoadStyle(void) {
     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;
@@ -2187,8 +2193,8 @@ void BScreen::shutdown(void) {
 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);
 
@@ -2221,8 +2227,8 @@ void BScreen::showPosition(int x, int y) {
 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);
 
@@ -2251,10 +2257,20 @@ void BScreen::showGeometry(unsigned int gx, unsigned int gy) {
   }
 }
 
-
 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();
+  }
+
+}
This page took 0.02933 seconds and 4 git commands to generate.