diff options
author | mathias <mathias> | 2005-04-27 21:18:41 (GMT) |
---|---|---|
committer | mathias <mathias> | 2005-04-27 21:18:41 (GMT) |
commit | f1c5abd17ffd572a7586d396622c2891881e5ca4 (patch) | |
tree | e4f8eaaf1f7f67ff657ff5de9ce989bd38216970 /src/FbTk/FbWindow.cc | |
parent | c0f725806323e370d8eda922e680a0b17db17175 (diff) | |
download | fluxbox-f1c5abd17ffd572a7586d396622c2891881e5ca4.zip fluxbox-f1c5abd17ffd572a7586d396622c2891881e5ca4.tar.bz2 |
i added an attribute to FbWindow to mark windows which are only used as
"carrier" (maybe a temporarly name?) ... carriers dont need background-updates
.. ever.
this leads to a big performance"boost" over the last commits. before we
updated also the windows which are the hosts for the apps (m_window and
m_clientarea in FbWinFrame) -> bad idea.
Diffstat (limited to 'src/FbTk/FbWindow.cc')
-rw-r--r-- | src/FbTk/FbWindow.cc | 17 |
1 files changed, 11 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 | ||
47 | FbWindow::FbWindow():FbDrawable(), m_parent(0), m_screen_num(0), m_window(0), m_x(0), m_y(0), | 47 | FbWindow::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 | ||
152 | void FbWindow::updateBackground(bool only_if_alpha) { | 153 | void 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 | ||