aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2004-02-27 11:55:27 (GMT)
committerfluxgen <fluxgen>2004-02-27 11:55:27 (GMT)
commit635e30e9157d5bee3beb337569262dd28989765d (patch)
treeb7558f1fb4a0e458a2c417bb63924c48ab64260c /src/FbTk
parentf2d92decb6f89f23c83cdc7dce50b1d5641271e1 (diff)
downloadfluxbox-635e30e9157d5bee3beb337569262dd28989765d.zip
fluxbox-635e30e9157d5bee3beb337569262dd28989765d.tar.bz2
improved transparent rendering
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/Menu.cc22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 2adc996..6d43268 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Menu.cc,v 1.54 2004/01/21 09:03:13 fluxgen Exp $ 25// $Id: Menu.cc,v 1.55 2004/02/27 11:55:27 fluxgen Exp $
26 26
27//use GNU extensions 27//use GNU extensions
28#ifndef _GNU_SOURCE 28#ifndef _GNU_SOURCE
@@ -508,7 +508,7 @@ void Menu::update(int active_index) {
508 508
509 menu.frame.setBackgroundPixmap(m_frame_pm.drawable()); 509 menu.frame.setBackgroundPixmap(m_frame_pm.drawable());
510 510
511 clearWindow(); 511 // clearWindow();
512 512
513 if (title_vis && visible) 513 if (title_vis && visible)
514 redrawTitle(); 514 redrawTitle();
@@ -523,6 +523,12 @@ void Menu::update(int active_index) {
523 523
524 if (m_parent && visible) 524 if (m_parent && visible)
525 m_parent->drawSubmenu(m_parent->which_sub); 525 m_parent->drawSubmenu(m_parent->which_sub);
526
527 menu.frame.clearArea(0, active_index * menu.item_h,
528 width(), menu.item_h);
529 menu.frame.updateTransparent(0, active_index * menu.item_h,
530 width(), menu.item_h);
531
526 } 532 }
527 533
528 menu.window.clear(); 534 menu.window.clear();
@@ -979,9 +985,11 @@ void Menu::drawItem(unsigned int index, bool highlight, bool clear, bool render_
979 menu.frame.clearArea(item_x, item_y, 985 menu.frame.clearArea(item_x, item_y,
980 menu.item_w, menu.item_h, False); 986 menu.item_w, menu.item_h, False);
981 987
988 if (render_trans) {
989 menu.frame.updateTransparent(item_x, item_y,
990 menu.item_w, menu.item_h);
991 }
982 992
983 menu.frame.updateTransparent(item_x, item_y,
984 menu.item_w, menu.item_h);
985 993
986} 994}
987 995
@@ -1228,11 +1236,15 @@ void Menu::exposeEvent(XExposeEvent &ee) {
1228 Menuitems::iterator it_end = menuitems.end(); 1236 Menuitems::iterator it_end = menuitems.end();
1229 for (ii = id; ii <= id_d && it != it_end; ++it, ii++) { 1237 for (ii = id; ii <= id_d && it != it_end; ++it, ii++) {
1230 unsigned int index = ii + (i * menu.persub); 1238 unsigned int index = ii + (i * menu.persub);
1231 drawItem(index, (which_sub == static_cast<signed>(index)), true, true, 1239 drawItem(index,
1240 (which_sub == static_cast<signed>(index)), // highlight
1241 true, // clear
1242 false, // render trans
1232 ee.x, ee.y, ee.width, ee.height); 1243 ee.x, ee.y, ee.width, ee.height);
1233 } 1244 }
1234 } 1245 }
1235 } 1246 }
1247 menu.frame.updateTransparent(ee.x, ee.y, ee.width, ee.height);
1236 } 1248 }
1237} 1249}
1238 1250