diff options
Diffstat (limited to 'src/FbTk/FbWindow.cc')
-rw-r--r-- | src/FbTk/FbWindow.cc | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 056e2f1..fb68eb9 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc | |||
@@ -43,21 +43,28 @@ | |||
43 | 43 | ||
44 | namespace FbTk { | 44 | namespace FbTk { |
45 | 45 | ||
46 | FbWindow::FbWindow():FbDrawable(), m_parent(0), m_screen_num(0), m_window(0), m_x(0), m_y(0), | 46 | FbWindow::FbWindow(): |
47 | m_width(0), m_height(0), m_border_width(0), m_depth(0), m_destroy(true), | 47 | FbDrawable(), |
48 | m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), m_renderer(0) { | 48 | m_parent(0), m_screen_num(0), m_window(0), |
49 | m_x(0), m_y(0), m_width(0), m_height(0), | ||
50 | m_border_width(0), m_border_color(0), | ||
51 | m_depth(0), m_destroy(true), | ||
52 | m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), | ||
53 | m_renderer(0) { | ||
49 | 54 | ||
50 | } | 55 | } |
51 | 56 | ||
52 | FbWindow::FbWindow(const FbWindow& the_copy):FbDrawable(), | 57 | FbWindow::FbWindow(const FbWindow& the_copy): |
53 | m_parent(the_copy.parent()), | 58 | FbDrawable(), |
54 | m_screen_num(the_copy.screenNumber()), m_window(the_copy.window()), | 59 | m_parent(the_copy.parent()), |
55 | m_x(the_copy.x()), m_y(the_copy.y()), | 60 | m_screen_num(the_copy.screenNumber()), m_window(the_copy.window()), |
56 | m_width(the_copy.width()), m_height(the_copy.height()), | 61 | m_x(the_copy.x()), m_y(the_copy.y()), |
57 | m_border_width(the_copy.borderWidth()), | 62 | m_width(the_copy.width()), m_height(the_copy.height()), |
58 | m_depth(the_copy.depth()), m_destroy(true), | 63 | m_border_width(the_copy.borderWidth()), |
59 | m_lastbg_color_set(false), m_lastbg_color(0), | 64 | m_border_color(the_copy.borderColor()), |
60 | m_lastbg_pm(0), m_renderer(the_copy.m_renderer) { | 65 | m_depth(the_copy.depth()), m_destroy(true), |
66 | m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), | ||
67 | m_renderer(the_copy.m_renderer) { | ||
61 | the_copy.m_window = 0; | 68 | the_copy.m_window = 0; |
62 | } | 69 | } |
63 | 70 | ||
@@ -100,17 +107,14 @@ FbWindow::FbWindow(const FbWindow &parent, | |||
100 | 107 | ||
101 | }; | 108 | }; |
102 | 109 | ||
103 | FbWindow::FbWindow(Window client):FbDrawable(), m_parent(0), | 110 | FbWindow::FbWindow(Window client): |
104 | m_screen_num(0), | 111 | FbDrawable(), |
105 | m_window(0), | 112 | m_parent(0), m_screen_num(0), m_window(0), |
106 | m_x(0), m_y(0), | 113 | m_x(0), m_y(0), m_width(1), m_height(1), |
107 | m_width(1), m_height(1), | 114 | m_border_width(0), m_border_color(0), |
108 | m_border_width(0), | 115 | m_depth(0), m_destroy(false), // don't destroy this window |
109 | m_depth(0), | 116 | m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), |
110 | m_destroy(false), // don't destroy this window | 117 | m_renderer(0) { |
111 | m_lastbg_color_set(false), m_lastbg_color(0), | ||
112 | m_lastbg_pm(0), m_renderer(0) { | ||
113 | |||
114 | setNew(client); | 118 | setNew(client); |
115 | } | 119 | } |
116 | 120 | ||
@@ -235,6 +239,7 @@ void FbWindow::updateBackground(bool only_if_alpha) { | |||
235 | 239 | ||
236 | void FbWindow::setBorderColor(const FbTk::Color &border_color) { | 240 | void FbWindow::setBorderColor(const FbTk::Color &border_color) { |
237 | XSetWindowBorder(display(), m_window, border_color.pixel()); | 241 | XSetWindowBorder(display(), m_window, border_color.pixel()); |
242 | m_border_color = border_color.pixel(); | ||
238 | } | 243 | } |
239 | 244 | ||
240 | void FbWindow::setBorderWidth(unsigned int size) { | 245 | void FbWindow::setBorderWidth(unsigned int size) { |
@@ -373,6 +378,7 @@ FbWindow &FbWindow::operator = (const FbWindow &win) { | |||
373 | m_width = win.width(); | 378 | m_width = win.width(); |
374 | m_height = win.height(); | 379 | m_height = win.height(); |
375 | m_border_width = win.borderWidth(); | 380 | m_border_width = win.borderWidth(); |
381 | m_border_color = win.borderColor(); | ||
376 | m_depth = win.depth(); | 382 | m_depth = win.depth(); |
377 | // take over this window | 383 | // take over this window |
378 | win.m_window = 0; | 384 | win.m_window = 0; |
@@ -601,6 +607,7 @@ void FbWindow::create(Window parent, int x, int y, | |||
601 | 607 | ||
602 | 608 | ||
603 | m_border_width = 0; | 609 | m_border_width = 0; |
610 | m_border_color = 0; | ||
604 | 611 | ||
605 | long valmask = CWEventMask; | 612 | long valmask = CWEventMask; |
606 | XSetWindowAttributes values; | 613 | XSetWindowAttributes values; |