aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-01-05 22:58:11 (GMT)
committerfluxgen <fluxgen>2003-01-05 22:58:11 (GMT)
commit459f2563d2470712a969cf48f6a1474b364dd3c4 (patch)
treece25767b246b439387a101871dac664f4d19e6a8 /src/FbTk
parentb36851a47620c6035b2987bdff72f0ba26afe580 (diff)
downloadfluxbox_paul-459f2563d2470712a969cf48f6a1474b364dd3c4.zip
fluxbox_paul-459f2563d2470712a969cf48f6a1474b364dd3c4.tar.bz2
added border size
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/FbWindow.cc10
-rw-r--r--src/FbTk/FbWindow.hh10
2 files changed, 13 insertions, 7 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc
index 3a3040b..5fd70d7 100644
--- a/src/FbTk/FbWindow.cc
+++ b/src/FbTk/FbWindow.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWindow.cc,v 1.3 2002/12/16 11:17:26 fluxgen Exp $ 22// $Id: FbWindow.cc,v 1.4 2003/01/05 22:58:11 fluxgen Exp $
23 23
24#include "FbWindow.hh" 24#include "FbWindow.hh"
25 25
@@ -32,7 +32,8 @@ namespace FbTk {
32 32
33Display *FbWindow::s_display = 0; 33Display *FbWindow::s_display = 0;
34 34
35FbWindow::FbWindow():m_parent(0), m_screen_num(0), m_window(0) { 35FbWindow::FbWindow():m_parent(0), m_screen_num(0), m_window(0), m_x(0), m_y(0),
36 m_width(0), m_height(0), m_border_width(0) {
36 37
37 if (s_display == 0) 38 if (s_display == 0)
38 s_display = App::instance()->display(); 39 s_display = App::instance()->display();
@@ -83,6 +84,7 @@ void FbWindow::setBorderColor(const FbTk::Color &border_color) {
83} 84}
84void FbWindow::setBorderWidth(size_t size) { 85void FbWindow::setBorderWidth(size_t size) {
85 XSetWindowBorderWidth(s_display, m_window, size); 86 XSetWindowBorderWidth(s_display, m_window, size);
87 m_border_width = size;
86} 88}
87 89
88void FbWindow::setName(const char *name) { 90void FbWindow::setName(const char *name) {
@@ -170,7 +172,9 @@ void FbWindow::create(Window parent, int x, int y,
170 s_display = FbTk::App::instance()->display(); 172 s_display = FbTk::App::instance()->display();
171 173
172 assert(s_display); 174 assert(s_display);
173 175
176 m_border_width = 0;
177
174 long valmask = CWEventMask; 178 long valmask = CWEventMask;
175 XSetWindowAttributes values; 179 XSetWindowAttributes values;
176 values.event_mask = eventmask; 180 values.event_mask = eventmask;
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh
index 00c3026..0f4ff5e 100644
--- a/src/FbTk/FbWindow.hh
+++ b/src/FbTk/FbWindow.hh
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWindow.hh,v 1.5 2002/12/25 11:29:34 fluxgen Exp $ 22// $Id: FbWindow.hh,v 1.6 2003/01/05 22:55:14 fluxgen Exp $
23 23
24#ifndef FBTK_FBWINDOW_HH 24#ifndef FBTK_FBWINDOW_HH
25#define FBTK_FBWINDOW_HH 25#define FBTK_FBWINDOW_HH
@@ -76,6 +76,7 @@ public:
76 int y() const { return m_y; } 76 int y() const { return m_y; }
77 size_t width() const { return m_width; } 77 size_t width() const { return m_width; }
78 size_t height() const { return m_height; } 78 size_t height() const { return m_height; }
79 size_t borderWidth() const { return m_border_width; }
79 int screenNumber() const; 80 int screenNumber() const;
80 /// compare X window 81 /// compare X window
81 bool operator == (Window win) const { return m_window == win; } 82 bool operator == (Window win) const { return m_window == win; }
@@ -93,9 +94,10 @@ private:
93 static Display *s_display; 94 static Display *s_display;
94 const FbWindow *m_parent; 95 const FbWindow *m_parent;
95 int m_screen_num; 96 int m_screen_num;
96 Window m_window; ///< X window 97 Window m_window; ///< the X window
97 int m_x, m_y; ///< position 98 int m_x, m_y; ///< position of window
98 size_t m_width, m_height; 99 size_t m_width, m_height; ///< size of window
100 size_t m_border_width; // border size
99}; 101};
100 102
101bool operator == (Window win, const FbWindow &fbwin); 103bool operator == (Window win, const FbWindow &fbwin);