diff options
author | fluxgen <fluxgen> | 2004-04-19 22:47:36 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-04-19 22:47:36 (GMT) |
commit | 20659577859fc0fc85aeaa82f7a6e1e41f17e5e7 (patch) | |
tree | 98bd86b2f81cb504b60869c6ddd9d289d1a33fa5 | |
parent | 9a9f87d1ca698811134adcf2804c89c343cdba58 (diff) | |
download | fluxbox-20659577859fc0fc85aeaa82f7a6e1e41f17e5e7.zip fluxbox-20659577859fc0fc85aeaa82f7a6e1e41f17e5e7.tar.bz2 |
minor cleaning
-rw-r--r-- | src/FbTk/Menu.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 4b59041..f6cbca4 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.58 2004/04/18 17:46:32 fluxgen Exp $ | 25 | // $Id: Menu.cc,v 1.59 2004/04/19 22:47:36 fluxgen Exp $ |
26 | 26 | ||
27 | //use GNU extensions | 27 | //use GNU extensions |
28 | #ifndef _GNU_SOURCE | 28 | #ifndef _GNU_SOURCE |
@@ -485,23 +485,19 @@ void Menu::update(int active_index) { | |||
485 | menu.title.borderWidth()*2 : 0), | 485 | menu.title.borderWidth()*2 : 0), |
486 | menu.window.width(), menu.frame_h); | 486 | menu.window.width(), menu.frame_h); |
487 | 487 | ||
488 | // render pixmaps | ||
489 | Display *disp = FbTk::App::instance()->display(); | ||
490 | |||
491 | XWindowAttributes attr; | ||
492 | 488 | ||
493 | if (m_need_update && (m_frame_pm.width() != menu.frame.width() || | 489 | if (m_need_update && (m_frame_pm.width() != menu.frame.width() || |
494 | m_frame_pm.height() != menu.frame.height() )){ | 490 | m_frame_pm.height() != menu.frame.height() )){ |
495 | XGetWindowAttributes(disp, menu.frame.window(), &attr); | 491 | |
496 | m_frame_pm = FbTk::FbPixmap(menu.frame.window(), | 492 | m_frame_pm = FbTk::FbPixmap(menu.frame.window(), |
497 | menu.frame.width(), menu.frame.height(), | 493 | menu.frame.width(), menu.frame.height(), |
498 | attr.depth); | 494 | menu.frame.depth()); |
499 | 495 | ||
500 | if (m_frame_pm.drawable() == 0) { | 496 | if (m_frame_pm.drawable() == 0) { |
501 | cerr<<"FbTk::Menu: Warning: Failed to create pixmap ("<< | 497 | cerr<<"FbTk::Menu: Warning: Failed to create pixmap ("<< |
502 | menu.frame.window()<<", "<<menu.frame.width()<<", "<< | 498 | menu.frame.window()<<", "<<menu.frame.width()<<", "<< |
503 | menu.frame.height()<< | 499 | menu.frame.height()<< |
504 | ", "<<attr.depth<<") !"<<endl; | 500 | ", "<<menu.frame.depth()<<") !"<<endl; |
505 | } else if (menu.sublevels > 0 && menu.persub * menu.sublevels != menuitems.size()) { | 501 | } else if (menu.sublevels > 0 && menu.persub * menu.sublevels != menuitems.size()) { |
506 | 502 | ||
507 | // TODO: fill only that part of the menuframe with the | 503 | // TODO: fill only that part of the menuframe with the |