cleaning in the menu code
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbMenu.cc,v 1.1 2003/07/10 11:26:40 fluxgen Exp $ +// $Id: FbMenu.cc,v 1.2 2003/12/10 23:08:03 fluxgen Exp $ #include "FbMenu.hh"@@ -27,9 +27,9 @@ #include "MenuTheme.hh"
#include "Shape.hh" -FbMenu::FbMenu(MenuTheme &tm, int screen_num, FbTk::ImageControl &imgctrl, +FbMenu::FbMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, FbTk::XLayer &layer): - FbTk::Menu(tm, screen_num, imgctrl), + FbTk::Menu(tm, imgctrl), m_layeritem(fbwindow(), layer), m_shape(new Shape(fbwindow(), tm.shapePlaces())) {
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbMenu.hh,v 1.2 2003/07/10 11:25:13 fluxgen Exp $ +// $Id: FbMenu.hh,v 1.3 2003/12/10 23:08:03 fluxgen Exp $ #ifndef FBMENU_HH #define FBMENU_HH@@ -33,7 +33,7 @@ class Shape;
/// a layered and shaped menu class FbMenu:public FbTk::Menu { public: - FbMenu(MenuTheme &tm, int screen_num, FbTk::ImageControl &imgctrl, + FbMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, FbTk::XLayer &layer); ~FbMenu(); void clearWindow();
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Menu.cc,v 1.43 2003/11/28 23:26:27 fluxgen Exp $ +// $Id: Menu.cc,v 1.44 2003/12/10 23:08:06 fluxgen Exp $ //use GNU extensions #ifndef _GNU_SOURCE@@ -48,45 +48,18 @@ #include <iostream>
using namespace std; -namespace { -Pixmap getRootPixmap(int screen_num) { - Pixmap root_pm = 0; - // get root pixmap for transparency - Display *disp = FbTk::App::instance()->display(); - Atom real_type; - int real_format; - unsigned long items_read, items_left; - unsigned int *data; - if (XGetWindowProperty(disp, RootWindow(disp, screen_num), - XInternAtom(disp, "_XROOTPMAP_ID", false), - 0L, 1L, - false, XA_PIXMAP, &real_type, - &real_format, &items_read, &items_left, - (unsigned char **) &data) == Success && - items_read) { - root_pm = (Pixmap) (*data); - XFree(data); - } - - return root_pm; -} - -}; // end anonymous namespace - namespace FbTk { static Menu *shown = 0; Menu *Menu::s_focused = 0; -Menu::Menu(MenuTheme &tm, int screen_num, ImageControl &imgctrl): +Menu::Menu(MenuTheme &tm, ImageControl &imgctrl): m_theme(tm), - m_screen_num(screen_num), m_image_ctrl(imgctrl), - m_display(FbTk::App::instance()->display()), m_parent(0), - m_screen_width(DisplayWidth(m_display, screen_num)), - m_screen_height(DisplayHeight(m_display, screen_num)), + m_screen_width(DisplayWidth(FbTk::App::instance()->display(), tm.screenNum())), + m_screen_height(DisplayHeight(FbTk::App::instance()->display(), tm.screenNum())), m_alignment(ALIGNDONTCARE), m_border_width(0), m_themeobserver(*this),@@ -123,7 +96,7 @@ menu.sel_pixmap = None;
menu.bevel_w = 2; - menu.width = menu.title_h = menu.item_w = menu.frame_h = + menu.title_h = menu.item_w = menu.frame_h = m_theme.titleFont().height() + menu.bevel_w * 2; menu.sublevels =@@ -132,13 +105,11 @@ menu.minsub = 0;
menu.item_h = m_theme.frameFont().height() + menu.bevel_w; - menu.height = menu.title_h + 2 + menu.frame_h; - long event_mask = ButtonPressMask | ButtonReleaseMask | ButtonMotionMask | KeyPressMask | ExposureMask | FocusChangeMask; - //create menu window - menu.window = FbTk::FbWindow(screen_num, - menu.x, menu.y, menu.width, menu.height, + // create menu window + menu.window = FbTk::FbWindow(tm.screenNum(), + 0, 0, 10, 10, event_mask, true); // override redirect@@ -152,7 +123,7 @@
event_mask |= EnterWindowMask | LeaveWindowMask; //create menu title menu.title = FbTk::FbWindow(menu.window, - 0, 0, menu.width, menu.height, + 0, 0, width(), menu.title_h, event_mask); evm.add(*this, menu.title);@@ -160,7 +131,7 @@
event_mask |= PointerMotionMask; menu.frame = FbTk::FbWindow(menu.window, 0, menu.title_h, - menu.width, menu.frame_h, + width(), menu.frame_h ? menu.frame_h : 1, event_mask); evm.add(*this, menu.frame); // update style@@ -421,30 +392,36 @@ menu.sublevels = 0;
menu.persub = 0; } - menu.width = (menu.sublevels * (menu.item_w)); - if (! menu.width) menu.width = menu.item_w; - menu.frame_h = (menu.item_h * menu.persub); if (menu.frame_h < 0) menu.frame_h = 0; - menu.height = menu.frame_h; + + int new_width = (menu.sublevels * menu.item_w); + int new_height = menu.frame_h; + if (title_vis) - menu.height += menu.title_h + ((menu.frame_h>0)?menu.title.borderWidth():0); + new_height += menu.title_h + ((menu.frame_h>0)?menu.title.borderWidth():0); - if (menu.height < 1) - menu.height = 1; + + if (new_width < 1) + new_width = menu.item_w; + + if (new_height < 1) + new_height = 1; + + menu.window.resize(new_width, new_height); Pixmap tmp; if (title_vis) { tmp = menu.title_pixmap; const FbTk::Texture &tex = m_theme.titleTexture(); - if (tex.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!tex.usePixmap()) { menu.title_pixmap = None; menu.title.setBackgroundColor(tex.color()); } else { menu.title_pixmap = - m_image_ctrl.renderImage(menu.width, menu.title_h, tex); + m_image_ctrl.renderImage(width(), menu.title_h, tex); menu.title.setBackgroundPixmap(menu.title_pixmap); }@@ -455,11 +432,11 @@ }
tmp = menu.frame_pixmap; const FbTk::Texture &frame_tex = m_theme.frameTexture(); - if (frame_tex.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) { + if (!frame_tex.usePixmap()) { menu.frame_pixmap = None; } else { menu.frame_pixmap = - m_image_ctrl.renderImage(menu.width, menu.frame_h, frame_tex); + m_image_ctrl.renderImage(width(), menu.frame_h, frame_tex); } if (tmp)@@ -467,18 +444,18 @@ m_image_ctrl.removeImage(tmp);
tmp = menu.hilite_pixmap; const FbTk::Texture &hilite_tex = m_theme.hiliteTexture(); - if (hilite_tex.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) + if (!hilite_tex.usePixmap()) { menu.hilite_pixmap = None; - else + } else menu.hilite_pixmap = m_image_ctrl.renderImage(menu.item_w, menu.item_h, hilite_tex); if (tmp) m_image_ctrl.removeImage(tmp); tmp = menu.sel_pixmap; - if (hilite_tex.type() == (FbTk::Texture::FLAT | FbTk::Texture::SOLID)) + if (!hilite_tex.usePixmap()) { menu.sel_pixmap = None; - else { + } else { int hw = menu.item_h / 2; menu.sel_pixmap = m_image_ctrl.renderImage(hw, hw, hilite_tex);@@ -486,11 +463,11 @@ }
if (tmp) m_image_ctrl.removeImage(tmp); - menu.window.resize(menu.width, menu.height); + if (title_vis) { menu.title.moveResize(-menu.title.borderWidth(), -menu.title.borderWidth(), - menu.width + menu.title.borderWidth(), menu.title_h); + width() + menu.title.borderWidth(), menu.title_h); } menu.frame.moveResize(0, ((title_vis) ? menu.title.y() + menu.title.height() +@@ -637,11 +614,11 @@ unsigned int l = font.textWidth(text, len) + menu.bevel_w*2;
switch (m_theme.titleFontJustify()) { case FbTk::RIGHT: - dx += menu.width - l; + dx += width() - l; break; case FbTk::CENTER: - dx += (menu.width - l) / 2; + dx += (width() - l) / 2; break; default: break;@@ -695,10 +672,10 @@ item->submenu()->menu.title_h + menu.window.borderWidth() : 0));
} if (m_alignment == ALIGNBOTTOM && - (y + item->submenu()->menu.height) > ((shifted) ? menu.y_shift : - menu.y) + menu.height) { + (y + item->submenu()->height()) > ((shifted) ? menu.y_shift : + menu.y) + height()) { y = (((shifted) ? menu.y_shift : menu.y) + - menu.height - item->submenu()->menu.height); + height() - item->submenu()->height()); } if ((x + item->submenu()->width()) > m_screen_width) {@@ -1090,13 +1067,13 @@ drawSubmenu(which_sub);
update(); } - if (re.x >= 0 && re.x <= (signed) menu.width && + if (re.x >= 0 && re.x <= (signed) width() && re.y >= 0 && re.y <= (signed) menu.title_h && re.button == 3) hide(); } else if (re.window == menu.frame && - re.x >= 0 && re.x < (signed) menu.width && + re.x >= 0 && re.x < (signed) width() && re.y >= 0 && re.y < (signed) menu.frame_h) { int sbl = (re.x / menu.item_w), i = (re.y / menu.item_h),@@ -1147,7 +1124,7 @@ // drawSubmenu(which_sub);
} } } else if ((! (me.state & Button1Mask)) && me.window == menu.frame && - me.x >= 0 && me.x < (signed) menu.width && + me.x >= 0 && me.x < (signed) width() && me.y >= 0 && me.y < (signed) menu.frame_h) { int sbl = (me.x / menu.item_w), i = (me.y / menu.item_h), w = (sbl * menu.persub) + i;@@ -1230,16 +1207,16 @@ if (menu.frame != ce.window)
return; menu.x_shift = menu.x, menu.y_shift = menu.y; - if (menu.x + menu.width > m_screen_width) { - menu.x_shift = m_screen_width - menu.width - 2*m_border_width; + if (menu.x + width() > m_screen_width) { + menu.x_shift = m_screen_width - width() - 2*m_border_width; shifted = true; } else if (menu.x < 0) { menu.x_shift = 0; //-m_border_width; shifted = true; } - if (menu.y + menu.height + 2*m_border_width > m_screen_height) { - menu.y_shift = m_screen_height - menu.height - 2*m_border_width; + if (menu.y + height() + 2*m_border_width > m_screen_height) { + menu.y_shift = m_screen_height - height() - 2*m_border_width; shifted = true; } else if (menu.y + (signed) menu.title_h < 0) { menu.y_shift = 0; // -m_border_width;;
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Menu.hh,v 1.24 2003/12/08 16:39:44 fluxgen Exp $ +// $Id: Menu.hh,v 1.25 2003/12/10 23:08:06 fluxgen Exp $ #ifndef FBTK_MENU_HH #define FBTK_MENU_HH@@ -57,7 +57,7 @@ Bullet type
*/ enum { EMPTY = 0, SQUARE, TRIANGLE, DIAMOND }; - Menu(MenuTheme &tm, int screen_num, ImageControl &imgctrl); + Menu(MenuTheme &tm, ImageControl &imgctrl); virtual ~Menu(); /**@@ -132,7 +132,7 @@ */
//@{ inline bool isTorn() const { return torn; } inline bool isVisible() const { return visible; } - inline int screenNumber() const { return m_screen_num; } + inline int screenNumber() const { return menu.window.screenNumber(); } inline Window window() const { return menu.window.window(); } inline FbWindow &fbwindow() { return menu.window; } inline const FbWindow &fbwindow() const { return menu.window; }@@ -141,8 +141,8 @@ inline FbWindow &frameWindow() { return menu.frame; }
inline const std::string &label() const { return menu.label; } inline int x() const { return menu.x; } inline int y() const { return menu.y; } - inline unsigned int width() const { return menu.width; } - inline unsigned int height() const { return menu.height; } + inline unsigned int width() const { return menu.window.width(); } + inline unsigned int height() const { return menu.window.height(); } inline unsigned int numberOfItems() const { return menuitems.size(); } inline int currentSubmenu() const { return which_sub; } inline unsigned int titleHeight() const { return menu.title_h; }@@ -178,8 +178,6 @@ void renderTransFrame();
typedef std::vector<MenuItem *> Menuitems; const MenuTheme &m_theme; - Display *m_display; - const int m_screen_num; Menu *m_parent; ImageControl &m_image_ctrl; Menuitems menuitems;@@ -198,7 +196,7 @@
std::string label; int x, y, x_move, y_move, x_shift, y_shift, sublevels, persub, minsub, grab_x, grab_y; - unsigned int width, height, title_h, frame_h, item_w, item_h, bevel_w, + unsigned int title_h, frame_h, item_w, item_h, bevel_w, bevel_h; } menu;
@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: IconbarTool.cc,v 1.20 2003/12/07 17:51:02 fluxgen Exp $ +// $Id: IconbarTool.cc,v 1.21 2003/12/10 23:08:03 fluxgen Exp $ #include "IconbarTool.hh"@@ -186,7 +186,7 @@ m_rc_mode(screen.resourceManager(), WORKSPACE,
screen.name() + ".iconbar.mode", screen.altName() + ".Iconbar.Mode"), m_rc_use_pixmap(screen.resourceManager(), true, screen.name() + ".iconbar.usePixmap", screen.altName() + ".Iconbar.UsePixmap"), - m_menu(*screen.menuTheme(), menu.screenNumber(), screen.imageControl(), + m_menu(*screen.menuTheme(), screen.imageControl(), *screen.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())) { // setup mode menu
@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: LayerMenu.hh,v 1.6 2003/12/03 22:12:26 fluxgen Exp $ +// $Id: LayerMenu.hh,v 1.7 2003/12/10 23:08:03 fluxgen Exp $ #ifndef LAYERMENU_HH #define LAYERMENU_HH@@ -60,7 +60,7 @@ /// Create a layer menu inside from the given menu
template <typename ItemType> class LayerMenu : public FbMenu { public: - LayerMenu(MenuTheme &tm, int screen_num, FbTk::ImageControl &imgctrl, + LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, FbTk::XLayer &layer, ItemType *item, bool save_rc); private:@@ -69,9 +69,9 @@ };
template <typename ItemType> -LayerMenu<ItemType>::LayerMenu(MenuTheme &tm, int screen_num, FbTk::ImageControl &imgctrl, +LayerMenu<ItemType>::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, FbTk::XLayer &layer, ItemType *item, bool save_rc): - FbMenu(tm, screen_num, imgctrl, layer), + FbMenu(tm, imgctrl, layer), m_object(item) {@@ -93,18 +93,16 @@ {0, 0, "Desktop", fluxbox->getDesktopLayer()},
}; FbTk::RefCount<FbTk::Command> saverc_cmd(new FbTk::SimpleCommand<Fluxbox>( - *Fluxbox::instance(), - &Fluxbox::save_rc)); + *Fluxbox::instance(), + &Fluxbox::save_rc)); for (size_t i=0; i < 6; ++i) { // TODO: fetch nls string if (save_rc) { - insert(new LayerMenuItem<ItemType>( - layer_menuitems[i].default_str, + insert(new LayerMenuItem<ItemType>(layer_menuitems[i].default_str, m_object, layer_menuitems[i].layernum, saverc_cmd)); } else { - insert(new LayerMenuItem<ItemType>( - layer_menuitems[i].default_str, + insert(new LayerMenuItem<ItemType>(layer_menuitems[i].default_str, m_object, layer_menuitems[i].layernum)); } }
@@ -21,7 +21,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Remember.cc,v 1.30 2003/11/17 00:20:54 fluxgen Exp $ +// $Id: Remember.cc,v 1.31 2003/12/10 23:08:03 fluxgen Exp $ #include "Remember.hh" #include "ClientPattern.hh"@@ -109,11 +109,7 @@
FbTk::Menu *createRememberMenu(Remember &remember, FluxboxWindow &win, bool enabled) { // each fluxboxwindow has its own windowmenu // so we also create a remember menu just for it... - BScreen &screen = win.screen(); - FbTk::Menu *menu = new FbMenu(*screen.menuTheme(), - screen.screenNumber(), - screen.imageControl(), - *screen.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())); + FbTk::Menu *menu = win.screen().createMenu(""); // if enabled, then we want this to be a unavailable menu if (!enabled) {@@ -141,8 +137,6 @@ menu->insert(new RememberMenuItem("Shaded", remember, win,
Remember::REM_SHADEDSTATE)); menu->insert(new RememberMenuItem("Layer", remember, win, Remember::REM_LAYER)); - // menu->insert(new RememberMenuItem("Tab", remember, win, - // Remember::REM_TABSTATE)); menu->insert(new RememberMenuItem("Save on close", remember, win, Remember::REM_SAVEONCLOSE));
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.246 2003/12/10 22:28:07 fluxgen Exp $ +// $Id: Screen.cc,v 1.247 2003/12/10 23:08:03 fluxgen Exp $ #include "Screen.hh"@@ -131,17 +131,6 @@
running = false; return -1; -} - -FbTk::Menu *createMenuFromScreen(BScreen &screen, const char *label = 0) { - FbTk::Menu *menu = new FbMenu(*screen.menuTheme(), - screen.screenNumber(), - screen.imageControl(), - *screen.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())); - if (label) - menu->setLabel(label); - - return menu; } class FocusModelMenuItem : public FbTk::MenuItem {@@ -353,10 +342,10 @@ renderGeomWindow();
// setup workspaces and workspace menu - workspacemenu.reset(createMenuFromScreen(*this)); + workspacemenu.reset(createMenu("")); workspacemenu->setInternalMenu(); //!! TODO: NLS - m_iconmenu.reset(createMenuFromScreen(*this, "Icons")); + m_iconmenu.reset(createMenu("Icons")); m_iconmenu->setInternalMenu(); if (*resource.workspaces != 0) {@@ -392,7 +381,7 @@ // own resources we must do this.
fluxbox->load_rc(*this); // TODO: nls - m_configmenu.reset(createMenuFromScreen(*this, "Configuration")); + m_configmenu.reset(createMenu("Configuration")); setupConfigmenu(*m_configmenu.get()); m_configmenu->setInternalMenu();@@ -567,6 +556,16 @@ // for now we're only listening to the theme sig, so no object check
// if another signal is added later, will need to differentiate here renderGeomWindow(); +} + +FbTk::Menu *BScreen::createMenu(const std::string &label) { + FbTk::Menu *menu = new FbMenu(*menuTheme(), + imageControl(), + *layerManager().getLayer(Fluxbox::instance()->getMenuLayer())); + if (!label.empty()) + menu->setLabel(label.c_str()); + + return menu; } void BScreen::reconfigure() {@@ -1548,7 +1547,7 @@ m_rootmenu->remove(0);
m_rootmenu_list.clear(); } else - m_rootmenu.reset(createMenuFromScreen(*this)); + m_rootmenu.reset(createMenu("")); bool defaultMenu = true; Fluxbox * const fb = Fluxbox::instance();@@ -1759,7 +1758,7 @@ "BScreen::parseMenuFile: [submenu] error, "
"no menu label defined\n")); cerr<<"Row: "<<row<<endl; } else { - FbTk::Menu *submenu = createMenuFromScreen(*this); + FbTk::Menu *submenu = createMenu(""); if (str_cmd.size()) submenu->setLabel(str_cmd.c_str());@@ -1873,7 +1872,7 @@ // we don't set this to internal menu so will
// be deleted toghether with the parent const char *focusmenu_label = i18n->getMessage(ConfigmenuSet, ConfigmenuFocusModel, "Focus Model"); - FbTk::Menu *focus_menu = createMenuFromScreen(*this, focusmenu_label); + FbTk::Menu *focus_menu = createMenu(focusmenu_label ? focusmenu_label : ""); focus_menu->insert(new FocusModelMenuItem(i18n->getMessage(ConfigmenuSet, ConfigmenuClickToFocus,
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.hh,v 1.125 2003/09/29 12:53:58 rathnor Exp $ +// $Id: Screen.hh,v 1.126 2003/12/10 23:08:03 fluxgen Exp $ #ifndef SCREEN_HH #define SCREEN_HH@@ -112,6 +112,8 @@
const FbTk::Menu *getWorkspacemenu() const { return workspacemenu.get(); } FbTk::Menu *getWorkspacemenu() { return workspacemenu.get(); } + + unsigned int currentWorkspaceID() const; Pixmap rootPixmap() const; /*@@ -160,6 +162,8 @@ FbTk::Subject &resizeSig() { return m_resize_sig; }
//@} void update(FbTk::Subject *subj); + + FbTk::Menu *createMenu(const std::string &label); /// @return the resource value of number of workspace inline int getNumberOfWorkspaces() const { return *resource.workspaces; }
@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: SendToMenu.cc,v 1.4 2003/12/04 00:08:55 fluxgen Exp $ +// $Id: SendToMenu.cc,v 1.5 2003/12/10 23:08:03 fluxgen Exp $ #include "SendToMenu.hh"@@ -45,7 +45,7 @@ const int m_workspace;
}; SendToMenu::SendToMenu(FluxboxWindow &win): - FbMenu(*win.screen().menuTheme(), win.screen().screenNumber(), + FbMenu(*win.screen().menuTheme(), win.screen().imageControl(), *win.screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), m_win(win) {
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Slit.cc,v 1.82 2003/12/07 16:39:43 fluxgen Exp $ +// $Id: Slit.cc,v 1.83 2003/12/10 23:08:03 fluxgen Exp $ #include "Slit.hh"@@ -236,19 +236,15 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
: m_hidden(false), m_screen(scr), m_slitmenu(*scr.menuTheme(), - scr.screenNumber(), scr.imageControl(), *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), m_placement_menu(*scr.menuTheme(), - scr.screenNumber(), scr.imageControl(), *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), m_clientlist_menu(*scr.menuTheme(), - scr.screenNumber(), scr.imageControl(), *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), m_layermenu(new LayerMenu<Slit>(*scr.menuTheme(), - scr.screenNumber(), scr.imageControl(), *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), this,
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Toolbar.cc,v 1.130 2003/12/08 17:29:44 fluxgen Exp $ +// $Id: Toolbar.cc,v 1.131 2003/12/10 23:08:03 fluxgen Exp $ #include "Toolbar.hh"@@ -192,16 +192,15 @@ frame(*this, scrn.screenNumber()),
m_window_pm(0), m_screen(scrn), m_layermenu(*scrn.menuTheme(), - scrn.screenNumber(), scrn.imageControl(), *scrn.layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), this, true), m_placementmenu(*scrn.menuTheme(), - scrn.screenNumber(), scrn.imageControl(), + scrn.imageControl(), *scrn.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), m_toolbarmenu(*scrn.menuTheme(), - scrn.screenNumber(), scrn.imageControl(), + scrn.imageControl(), *scrn.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), m_theme(scrn.screenNumber()), m_layeritem(frame.window, layer),
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Window.cc,v 1.249 2003/12/10 22:28:07 fluxgen Exp $ +// $Id: Window.cc,v 1.250 2003/12/10 23:08:03 fluxgen Exp $ #include "Window.hh"@@ -264,7 +264,7 @@ stuck(false), m_managed(false),
maximized(MAX_NONE), m_screen(scr), display(FbTk::App::instance()->display()), - m_windowmenu(*scr.menuTheme(), scr.screenNumber(), scr.imageControl(), + m_windowmenu(*scr.menuTheme(), scr.imageControl(), *scr.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), m_old_decoration(DECOR_NORMAL), m_client(&client),@@ -541,7 +541,6 @@ setState(m_current_state);
addExtraMenu("Layer...", new LayerMenu<FluxboxWindow>(*screen().menuTheme(), - screen().screenNumber(), screen().imageControl(), *screen().layerManager().getLayer(Fluxbox::instance()->getMenuLayer()), this,
@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Workspace.cc,v 1.85 2003/12/07 17:49:07 fluxgen Exp $ +// $Id: Workspace.cc,v 1.86 2003/12/10 23:08:03 fluxgen Exp $ #include "Workspace.hh"@@ -119,7 +119,7 @@ Workspace::Workspace(BScreen &scrn, FbTk::MultLayers &layermanager,
const std::string &name, unsigned int i): m_screen(scrn), m_lastfocus(0), - m_clientmenu(*scrn.menuTheme(), scrn.screenNumber(), scrn.imageControl(), + m_clientmenu(*scrn.menuTheme(), scrn.imageControl(), *scrn.layerManager().getLayer(Fluxbox::instance()->getMenuLayer())), m_layermanager(layermanager), m_name(name),
@@ -20,7 +20,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Xinerama.hh,v 1.6 2003/12/03 22:12:26 fluxgen Exp $ +// $Id: Xinerama.hh,v 1.7 2003/12/10 23:08:03 fluxgen Exp $ #ifndef XINERAMA_HH #define XINERAMA_HH@@ -74,7 +74,7 @@
template <typename ItemType> XineramaHeadMenu<ItemType>::XineramaHeadMenu(MenuTheme &tm, BScreen &screen, FbTk::ImageControl &imgctrl, FbTk::XLayer &layer, ItemType &item, const char * title = 0): - FbMenu(tm, screen.screenNumber(), imgctrl, layer), + FbMenu(tm, imgctrl, layer), m_object(item) { if (title)