aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimonb <simonb>2005-04-15 00:39:54 (GMT)
committersimonb <simonb>2005-04-15 00:39:54 (GMT)
commit6e774e79e1e747464f61e0d756c1fd07ed9ad777 (patch)
tree9870ab9444de3722f8a2b165a0ffb68b4f3e4029
parent95ea1a0151078b684844a0afb17a39384654dfaf (diff)
downloadfluxbox_paul-6e774e79e1e747464f61e0d756c1fd07ed9ad777.zip
fluxbox_paul-6e774e79e1e747464f61e0d756c1fd07ed9ad777.tar.bz2
fix a few drawwing issues, esp menu opening offscreen
-rw-r--r--ChangeLog4
-rw-r--r--src/FbTk/Menu.cc21
2 files changed, 14 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index d5deeb4..a8ee190 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.13 2Changes for 0.9.13
3*05/04/15:
4 * Fixed a few drawing bugs created by last patch (Simon)
5 (titlebar no clear on resize, menu opening offscreen...)
6 Menu.cc FbWinFrame.cc
3*05/04/11: 7*05/04/11:
4 * Rework lots of stuff relating to transparency, esp menus+frame (Simon) 8 * Rework lots of stuff relating to transparency, esp menus+frame (Simon)
5 + Massively reduce pixmap memory usage (view with xrestop) 9 + Massively reduce pixmap memory usage (view with xrestop)
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index 370afb8..a4aed46 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -388,10 +388,6 @@ void Menu::enableTitle() {
388} 388}
389 389
390void Menu::updateMenu(int active_index) { 390void Menu::updateMenu(int active_index) {
391 if (!m_visible) {
392 m_need_update = true;
393 return;
394 }
395 if (m_title_vis) { 391 if (m_title_vis) {
396 menu.item_w = theme().titleFont().textWidth(menu.label.c_str(), 392 menu.item_w = theme().titleFont().textWidth(menu.label.c_str(),
397 menu.label.size()); 393 menu.label.size());
@@ -425,9 +421,6 @@ void Menu::updateMenu(int active_index) {
425 menu.persub = 0; 421 menu.persub = 0;
426 } 422 }
427 423
428 if (menu.frame.alpha() != alpha())
429 menu.frame.setAlpha(alpha());
430
431 int itmp = (theme().itemHeight() * menu.persub); 424 int itmp = (theme().itemHeight() * menu.persub);
432 menu.frame_h = itmp < 1 ? 1 : itmp; 425 menu.frame_h = itmp < 1 ? 1 : itmp;
433 426
@@ -448,8 +441,16 @@ void Menu::updateMenu(int active_index) {
448 if (new_height < 1) 441 if (new_height < 1)
449 new_height = 1; 442 new_height = 1;
450 443
444 // must update main window size whether visible or not
445 // the rest can wait until the end
451 menu.window.resize(new_width, new_height); 446 menu.window.resize(new_width, new_height);
452 447
448 if (!m_visible)
449 return;
450
451 if (menu.frame.alpha() != alpha())
452 menu.frame.setAlpha(alpha());
453
453 Pixmap tmp = 0; 454 Pixmap tmp = 0;
454 if (m_title_vis && m_need_update) { 455 if (m_title_vis && m_need_update) {
455 tmp = menu.title_pixmap; 456 tmp = menu.title_pixmap;
@@ -1267,10 +1268,8 @@ void Menu::reconfigure() {
1267 1268
1268 menu.window.setBorderWidth(theme().borderWidth()); 1269 menu.window.setBorderWidth(theme().borderWidth());
1269 menu.title.setBorderWidth(theme().borderWidth()); 1270 menu.title.setBorderWidth(theme().borderWidth());
1270 1271
1271 if (m_visible) { 1272 updateMenu();
1272 updateMenu();
1273 }
1274} 1273}
1275 1274
1276 1275