fix a few drawwing issues, esp menu opening offscreen

This commit is contained in:
simonb 2005-04-15 00:39:54 +00:00
parent 95ea1a0151
commit 6e774e79e1
2 changed files with 14 additions and 11 deletions

View file

@ -1,5 +1,9 @@
(Format: Year/Month/Day)
Changes for 0.9.13
*05/04/15:
* Fixed a few drawing bugs created by last patch (Simon)
(titlebar no clear on resize, menu opening offscreen...)
Menu.cc FbWinFrame.cc
*05/04/11:
* Rework lots of stuff relating to transparency, esp menus+frame (Simon)
+ Massively reduce pixmap memory usage (view with xrestop)

View file

@ -388,10 +388,6 @@ void Menu::enableTitle() {
}
void Menu::updateMenu(int active_index) {
if (!m_visible) {
m_need_update = true;
return;
}
if (m_title_vis) {
menu.item_w = theme().titleFont().textWidth(menu.label.c_str(),
menu.label.size());
@ -425,9 +421,6 @@ void Menu::updateMenu(int active_index) {
menu.persub = 0;
}
if (menu.frame.alpha() != alpha())
menu.frame.setAlpha(alpha());
int itmp = (theme().itemHeight() * menu.persub);
menu.frame_h = itmp < 1 ? 1 : itmp;
@ -448,8 +441,16 @@ void Menu::updateMenu(int active_index) {
if (new_height < 1)
new_height = 1;
// must update main window size whether visible or not
// the rest can wait until the end
menu.window.resize(new_width, new_height);
if (!m_visible)
return;
if (menu.frame.alpha() != alpha())
menu.frame.setAlpha(alpha());
Pixmap tmp = 0;
if (m_title_vis && m_need_update) {
tmp = menu.title_pixmap;
@ -1267,10 +1268,8 @@ void Menu::reconfigure() {
menu.window.setBorderWidth(theme().borderWidth());
menu.title.setBorderWidth(theme().borderWidth());
if (m_visible) {
updateMenu();
}
updateMenu();
}