From 0da967a8313bad4a9dbcca9b5c760bda32b7981f Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 11 Nov 2002 11:33:32 +0000 Subject: [PATCH] remove the redundant _size property in OBScreen, and set the geometry root property properly. add otk::Point::setPoint --- otk/point.hh | 3 +++ src/screen.cc | 4 ++-- src/screen.hh | 6 ------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/otk/point.hh b/otk/point.hh index 2c6d334c..edccbe1a 100644 --- a/otk/point.hh +++ b/otk/point.hh @@ -31,6 +31,9 @@ public: void setY(int x) { _x = x; } //! Returns the y value int y() const { return _x; } + + //! Changes the x and y values + void setPoint(int x, int y) { _x = x; _y = y; } }; } diff --git a/src/screen.cc b/src/screen.cc index 7413b163..e3217cca 100644 --- a/src/screen.cc +++ b/src/screen.cc @@ -76,8 +76,8 @@ OBScreen::OBScreen(int screen, const otk::Configuration &config) // Set the netwm atoms for geomtery and viewport - unsigned long geometry[] = { _size.x(), - _size.y() }; + unsigned long geometry[] = { _info->getWidth(), + _info->getHeight() }; Openbox::instance->property()->set(_info->getRootWindow(), otk::OBProperty::net_desktop_geometry, otk::OBProperty::Atom_Cardinal, diff --git a/src/screen.hh b/src/screen.hh index 8d7bc6b0..d047d0c2 100644 --- a/src/screen.hh +++ b/src/screen.hh @@ -13,7 +13,6 @@ extern "C" { #include "otk/image.hh" #include "otk/strut.hh" #include "otk/rect.hh" -#include "otk/point.hh" #include "otk/style.hh" #include "otk/configuration.hh" // TEMPORARY @@ -61,9 +60,6 @@ private: //! Is the root colormap currently installed? bool _root_cmap_installed; - //! The dimentions of the screen - otk::Point _size; - //! All managed clients on the screen ClientList _clients; @@ -107,8 +103,6 @@ public: inline bool managed() const { return _managed; } //! Returns the Image Control used for rendering on the screen inline otk::BImageControl *imageControl() { return _image_control; } - //! Returns the dimentions of the screen - inline const otk::Point &size() const { return _size; } //! Returns the area of the screen not reserved by applications' Struts inline const otk::Rect &area() const { return _area; } //! Returns the style in use on the screen -- 2.39.2