]> Dogcows Code - chaz/openbox/blobdiff - src/Screen.cc
renamed the obResource class to Resource.
[chaz/openbox] / src / Screen.cc
index 74c299d408534c03a4d5082b2e6fc2e82cf509c7..08c2d9eeb14eed235e2dd8a499ccdf3c1982ee28 100644 (file)
@@ -32,7 +32,6 @@
 
 #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>
@@ -230,7 +235,7 @@ BScreen::BScreen(Openbox &ob, int scrn) : ScreenInfo(ob, scrn), openbox(ob) {
   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;
@@ -991,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()) {
@@ -1253,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;
@@ -1266,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;
@@ -1274,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;
@@ -2188,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);
 
@@ -2222,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);
 
@@ -2252,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.026791 seconds and 4 git commands to generate.