aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/FbWindow.cc17
-rw-r--r--src/FbTk/FbWindow.hh5
-rw-r--r--src/FbWinFrame.cc2
3 files changed, 18 insertions, 6 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc
index 5a6417f..d3a7736 100644
--- a/src/FbTk/FbWindow.cc
+++ b/src/FbTk/FbWindow.cc
@@ -46,7 +46,7 @@ namespace FbTk {
46 46
47FbWindow::FbWindow():FbDrawable(), m_parent(0), m_screen_num(0), m_window(0), m_x(0), m_y(0), 47FbWindow::FbWindow():FbDrawable(), m_parent(0), m_screen_num(0), m_window(0), m_x(0), m_y(0),
48 m_width(0), m_height(0), m_border_width(0), m_depth(0), m_destroy(true), 48 m_width(0), m_height(0), m_border_width(0), m_depth(0), m_destroy(true),
49 m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), m_renderer(0) { 49 m_lastbg_color_set(false), m_lastbg_color(0), m_lastbg_pm(0), m_renderer(0), m_is_carrier(false) {
50 50
51} 51}
52 52
@@ -58,7 +58,8 @@ FbWindow::FbWindow(const FbWindow& the_copy):FbDrawable(),
58 m_border_width(the_copy.borderWidth()), 58 m_border_width(the_copy.borderWidth()),
59 m_depth(the_copy.depth()), m_destroy(true), 59 m_depth(the_copy.depth()), m_destroy(true),
60 m_lastbg_color_set(false), m_lastbg_color(0), 60 m_lastbg_color_set(false), m_lastbg_color(0),
61 m_lastbg_pm(0), m_renderer(the_copy.m_renderer) { 61 m_lastbg_pm(0), m_renderer(the_copy.m_renderer),
62 m_is_carrier(false) {
62 the_copy.m_window = 0; 63 the_copy.m_window = 0;
63} 64}
64 65
@@ -76,7 +77,7 @@ FbWindow::FbWindow(int screen_num,
76 m_destroy(true), 77 m_destroy(true),
77 m_lastbg_color_set(false), 78 m_lastbg_color_set(false),
78 m_lastbg_color(0), 79 m_lastbg_color(0),
79 m_lastbg_pm(0), m_renderer(0) { 80 m_lastbg_pm(0), m_renderer(0), m_is_carrier(false) {
80 81
81 create(RootWindow(display(), screen_num), 82 create(RootWindow(display(), screen_num),
82 x, y, width, height, eventmask, 83 x, y, width, height, eventmask,
@@ -93,7 +94,7 @@ FbWindow::FbWindow(const FbWindow &parent,
93 m_screen_num(parent.screenNumber()), 94 m_screen_num(parent.screenNumber()),
94 m_destroy(true), 95 m_destroy(true),
95 m_lastbg_color_set(false), m_lastbg_color(0), 96 m_lastbg_color_set(false), m_lastbg_color(0),
96 m_lastbg_pm(0), m_renderer(0) { 97 m_lastbg_pm(0), m_renderer(0), m_is_carrier(false) {
97 98
98 create(parent.window(), x, y, width, height, eventmask, 99 create(parent.window(), x, y, width, height, eventmask,
99 override_redirect, save_unders, depth, class_type); 100 override_redirect, save_unders, depth, class_type);
@@ -110,7 +111,7 @@ FbWindow::FbWindow(Window client):FbDrawable(), m_parent(0),
110 m_depth(0), 111 m_depth(0),
111 m_destroy(false), // don't destroy this window 112 m_destroy(false), // don't destroy this window
112 m_lastbg_color_set(false), m_lastbg_color(0), 113 m_lastbg_color_set(false), m_lastbg_color(0),
113 m_lastbg_pm(0), m_renderer(0) { 114 m_lastbg_pm(0), m_renderer(0), m_is_carrier(false) {
114 115
115 setNew(client); 116 setNew(client);
116} 117}
@@ -150,10 +151,14 @@ void FbWindow::setBackgroundPixmap(Pixmap bg_pixmap) {
150} 151}
151 152
152void FbWindow::updateBackground(bool only_if_alpha) { 153void FbWindow::updateBackground(bool only_if_alpha) {
154
155 if (isCarrier())
156 return;
157
153 Pixmap newbg = m_lastbg_pm; 158 Pixmap newbg = m_lastbg_pm;
154 unsigned char alpha = 255; 159 unsigned char alpha = 255;
155 bool free_newbg = false; 160 bool free_newbg = false;
156 161
157 if (m_lastbg_pm == None && !m_lastbg_color_set) 162 if (m_lastbg_pm == None && !m_lastbg_color_set)
158 return; 163 return;
159 164
diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh
index b08df5e..a630f4f 100644
--- a/src/FbTk/FbWindow.hh
+++ b/src/FbTk/FbWindow.hh
@@ -187,6 +187,9 @@ public:
187 void setRenderer(FbWindowRenderer &renderer) { m_renderer = &renderer; } 187 void setRenderer(FbWindowRenderer &renderer) { m_renderer = &renderer; }
188 void sendConfigureNotify(int x, int y, unsigned int width, unsigned int height); 188 void sendConfigureNotify(int x, int y, unsigned int width, unsigned int height);
189 189
190 /// this window is basicly a carrier and does not need background-updates
191 void setCarrier(bool flag) { m_is_carrier = flag; }
192 bool isCarrier() const { return m_is_carrier; }
190 /// forces full background change, recalcing of alpha values if necessary 193 /// forces full background change, recalcing of alpha values if necessary
191 void updateBackground(bool only_if_alpha); 194 void updateBackground(bool only_if_alpha);
192 195
@@ -221,6 +224,8 @@ private:
221 Pixmap m_lastbg_pm; 224 Pixmap m_lastbg_pm;
222 225
223 FbWindowRenderer *m_renderer; 226 FbWindowRenderer *m_renderer;
227
228 bool m_is_carrier;
224}; 229};
225 230
226bool operator == (Window win, const FbWindow &fbwin); 231bool operator == (Window win, const FbWindow &fbwin);
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index a1745ef..8313f4a 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -86,6 +86,8 @@ FbWinFrame::FbWinFrame(FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl,
86 m_themelistener(*this), 86 m_themelistener(*this),
87 m_shape(new Shape(m_window, theme.shapePlace())) { 87 m_shape(new Shape(m_window, theme.shapePlace())) {
88 m_theme.reconfigSig().attach(&m_themelistener); 88 m_theme.reconfigSig().attach(&m_themelistener);
89 m_window.setCarrier(true);
90 m_clientarea.setCarrier(true);
89 init(); 91 init();
90} 92}
91 93