compile fix: sunCC 5.11 (sunstudio 12) compiles and links again

biggest change: renaming of 'class Layer' to 'class ResourceLayer' in
Layer.hh to handle complaints about 'ambiguous Layer: Layer or FbTk::Layer'.
'ResourceLayer' sounds crappy, but that was the best I could come
up with right now.
This commit is contained in:
Mathias Gumz 2011-03-23 12:02:15 +01:00
parent 7ece90ad4f
commit e850b01919
25 changed files with 106 additions and 108 deletions

View file

@ -93,7 +93,7 @@ private:
ClientMenu::ClientMenu(BScreen &screen, Focusables &clients,
bool listen_for_iconlist_changes):
FbMenu(screen.menuTheme(), screen.imageControl(),
*screen.layerManager().getLayer(Layer::MENU)),
*screen.layerManager().getLayer(ResourceLayer::MENU)),
m_list(clients) {
if (listen_for_iconlist_changes) {

View file

@ -87,11 +87,13 @@ const Name2WinProperty name_2_winproperties[] = { // sorted for 'bsearch'
{ "workspacename", ClientPattern::WORKSPACENAME }
};
extern "C" {
int name_2_winproperty_cmp(const void* a, const void* b) {
return strcmp(
reinterpret_cast<const Name2WinProperty*>(a)->name,
reinterpret_cast<const Name2WinProperty*>(b)->name);
}
}
const Name2WinProperty* find_winproperty_by_name(const FbTk::FbString& name) {
@ -442,7 +444,7 @@ FbTk::FbString ClientPattern::getProperty(WinProperty prop, const Focusable &cli
break;
case LAYER:
if (fbwin) {
result = ::Layer::getString(fbwin->layerNum());
result = ::ResourceLayer::getString(fbwin->layerNum());
}
break;
case URGENT:

View file

@ -605,7 +605,7 @@ void FullscreenCmd::real_execute() {
FbTk::Command<void> *SetLayerCmd::parse(const string &command,
const string &args, bool trusted) {
int l = Layer::getNumFromString(args);
int l = ResourceLayer::getNumFromString(args);
return (l == -1) ? 0 : new SetLayerCmd(l);
}

View file

@ -992,9 +992,9 @@ void Ewmh::updateState(FluxboxWindow &win) {
state.push_back(m_net->wm_state_sticky);
if (win.isShaded())
state.push_back(m_net->wm_state_shaded);
if (win.layerNum() == Layer::BOTTOM)
if (win.layerNum() == ResourceLayer::BOTTOM)
state.push_back(m_net->wm_state_below);
if (win.layerNum() == Layer::ABOVE_DOCK)
if (win.layerNum() == ResourceLayer::ABOVE_DOCK)
state.push_back(m_net->wm_state_above);
if (win.isIconic())
state.push_back(m_net->wm_state_hidden);
@ -1346,14 +1346,14 @@ void Ewmh::setState(FluxboxWindow &win, Atom state, bool value,
win.setIconHidden(value);
} else if (state == m_net->wm_state_below) { // bottom layer
if (value)
win.moveToLayer(Layer::BOTTOM);
else if (win.layerNum() > Layer::NORMAL)
win.moveToLayer(Layer::NORMAL);
win.moveToLayer(ResourceLayer::BOTTOM);
else if (win.layerNum() > ResourceLayer::NORMAL)
win.moveToLayer(ResourceLayer::NORMAL);
} else if (state == m_net->wm_state_above) { // above layer
if (value)
win.moveToLayer(Layer::ABOVE_DOCK);
else if (win.layerNum() < Layer::NORMAL)
win.moveToLayer(Layer::NORMAL);
win.moveToLayer(ResourceLayer::ABOVE_DOCK);
else if (win.layerNum() < ResourceLayer::NORMAL)
win.moveToLayer(ResourceLayer::NORMAL);
} else if (state == m_net->wm_state_demands_attention) {
if (value) { // if add attention
Fluxbox::instance()->attentionHandler().addAttention(client);
@ -1386,16 +1386,16 @@ void Ewmh::toggleState(FluxboxWindow &win, Atom state, WinClient &client) {
} else if (state == m_net->wm_state_skip_taskbar) { // taskbar
win.setIconHidden(!win.isIconHidden());
} else if (state == m_net->wm_state_below) { // bottom layer
if (win.layerNum() == Layer::BOTTOM)
win.moveToLayer(Layer::NORMAL);
if (win.layerNum() == ResourceLayer::BOTTOM)
win.moveToLayer(ResourceLayer::NORMAL);
else
win.moveToLayer(Layer::BOTTOM);
win.moveToLayer(ResourceLayer::BOTTOM);
} else if (state == m_net->wm_state_above) { // top layer
if (win.layerNum() == Layer::ABOVE_DOCK)
win.moveToLayer(Layer::NORMAL);
if (win.layerNum() == ResourceLayer::ABOVE_DOCK)
win.moveToLayer(ResourceLayer::NORMAL);
else
win.moveToLayer(Layer::ABOVE_DOCK);
win.moveToLayer(ResourceLayer::ABOVE_DOCK);
} else if (state == m_net->wm_state_modal) { // modal
client.setStateModal(!client.isStateModal());
}

View file

@ -55,7 +55,7 @@ FbWinFrame::FbWinFrame(BScreen &screen, WindowState &state,
ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | EnterWindowMask |
LeaveWindowMask, true),
m_layeritem(window(), *screen.layerManager().getLayer(Layer::NORMAL)),
m_layeritem(window(), *screen.layerManager().getLayer(ResourceLayer::NORMAL)),
m_titlebar(m_window, 0, 0, 100, 16,
ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | ExposureMask |

View file

@ -22,6 +22,8 @@
#ifndef FBWINFRAME_HH
#define FBWINFRAME_HH
#include "WindowState.hh"
#include "FbTk/FbWindow.hh"
#include "FbTk/EventHandler.hh"
#include "FbTk/RefCount.hh"
@ -33,10 +35,6 @@
#include "FbTk/Container.hh"
#include "FbTk/Shape.hh"
#include "WindowState.hh"
#include <X11/Xutil.h>
#include <vector>
#include <memory>
@ -50,7 +48,6 @@ namespace FbTk {
class ImageControl;
template <class T> class Command;
class Texture;
class Layer;
}
/// holds a window frame with a client window

View file

@ -296,7 +296,7 @@ void Gnome::updateState(FluxboxWindow &win) {
void Gnome::updateLayer(FluxboxWindow &win) {
//TODO - map from flux layers to gnome ones
// our layers are in the opposite direction to GNOME
long layernum = Layer::DESKTOP - win.layerNum();
long layernum = ResourceLayer::DESKTOP - win.layerNum();
FluxboxWindow::ClientList::iterator client_it = win.clientList().begin();
FluxboxWindow::ClientList::iterator client_it_end = win.clientList().end();
@ -421,35 +421,35 @@ void Gnome::setLayer(FluxboxWindow *win, int layer) {
switch (layer) {
case WIN_LAYER_DESKTOP:
fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_DESKTOP)"<<endl;
layer = Layer::DESKTOP;
layer = ResourceLayer::DESKTOP;
break;
case WIN_LAYER_BELOW:
fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_BELOW)"<<endl;
layer = Layer::BOTTOM;
layer = ResourceLayer::BOTTOM;
break;
case WIN_LAYER_NORMAL:
fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_NORMAL)"<<endl;
layer = Layer::NORMAL;
layer = ResourceLayer::NORMAL;
break;
case WIN_LAYER_ONTOP:
fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_ONTOP)"<<endl;
layer = Layer::TOP;
layer = ResourceLayer::TOP;
break;
case WIN_LAYER_DOCK:
fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_DOCK)"<<endl;
layer = Layer::DOCK;
layer = ResourceLayer::DOCK;
break;
case WIN_LAYER_ABOVE_DOCK:
fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_ABOVE_DOCK)"<<endl;
layer = Layer::ABOVE_DOCK;
layer = ResourceLayer::ABOVE_DOCK;
break;
case WIN_LAYER_MENU:
fbdbg<<"Gnome::setLayer("<<title<<", WIN_LAYER_MENU)"<<endl;
layer = Layer::MENU;
layer = ResourceLayer::MENU;
break;
default:
// our windows are in the opposite direction to gnome
layer = Layer::DESKTOP - layer;
layer = ResourceLayer::DESKTOP - layer;
fbdbg<<"Gnome::setLayer("<<win->title().logical()<<", "<<layer<<")"<<endl;
break;

View file

@ -266,7 +266,7 @@ IconbarTool::IconbarTool(const FbTk::FbWindow &parent, IconbarTheme &theme,
m_rc_use_pixmap(screen.resourceManager(), true,
screen.name() + ".iconbar.usePixmap", screen.altName() + ".Iconbar.UsePixmap"),
m_menu(screen.menuTheme(), screen.imageControl(),
*screen.layerManager().getLayer(Layer::MENU)),
*screen.layerManager().getLayer(ResourceLayer::MENU)),
m_alpha(255) {
// setup mode menu

View file

@ -19,8 +19,8 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
#ifndef LAYER_HH
#define LAYER_HH
#ifndef RESOURCE_LAYER_HH
#define RESOURCE_LAYER_HH
#include "FbTk/StringUtil.hh"
@ -30,7 +30,7 @@
* we have a special resource type because we need to be able to name certain layers
* a Resource<int> wouldn't allow this
*/
class Layer {
class ResourceLayer {
public:
enum {
MENU = 0,
@ -43,7 +43,7 @@ public:
NUM_LAYERS = 13
};
explicit Layer(int i) : m_num(i) {};
explicit ResourceLayer(int i) : m_num(i) {};
static int getNumFromString(const std::string &str) {
int tempnum = 0;
@ -51,37 +51,37 @@ public:
if (FbTk::StringUtil::extractNumber(str, tempnum))
return tempnum;
if (v == "menu")
return ::Layer::MENU;
return ::ResourceLayer::MENU;
if (v == "abovedock")
return ::Layer::ABOVE_DOCK;
return ::ResourceLayer::ABOVE_DOCK;
if (v == "dock")
return ::Layer::DOCK;
return ::ResourceLayer::DOCK;
if (v == "top")
return ::Layer::TOP;
return ::ResourceLayer::TOP;
if (v == "normal")
return ::Layer::NORMAL;
return ::ResourceLayer::NORMAL;
if (v == "bottom")
return ::Layer::BOTTOM;
return ::ResourceLayer::BOTTOM;
if (v == "desktop")
return ::Layer::DESKTOP;
return ::ResourceLayer::DESKTOP;
return -1;
}
static std::string getString(int num) {
switch (num) {
case ::Layer::MENU:
case ::ResourceLayer::MENU:
return std::string("Menu");
case ::Layer::ABOVE_DOCK:
case ::ResourceLayer::ABOVE_DOCK:
return std::string("AboveDock");
case ::Layer::DOCK:
case ::ResourceLayer::DOCK:
return std::string("Dock");
case ::Layer::TOP:
case ::ResourceLayer::TOP:
return std::string("Top");
case ::Layer::NORMAL:
case ::ResourceLayer::NORMAL:
return std::string("Normal");
case ::Layer::BOTTOM:
case ::ResourceLayer::BOTTOM:
return std::string("Bottom");
case ::Layer::DESKTOP:
case ::ResourceLayer::DESKTOP:
return std::string("Desktop");
default:
return FbTk::StringUtil::number2String(num);
@ -91,10 +91,10 @@ public:
int getNum() const { return m_num; }
std::string getString() const { return getString(m_num); }
Layer &operator=(int num) { m_num = num; return *this; }
ResourceLayer &operator=(int num) { m_num = num; return *this; }
private:
int m_num;
};
#endif // LAYER_HH
#endif // RESOURCE_LAYER_HH

View file

@ -42,12 +42,12 @@ LayerMenu::LayerMenu(FbTk::ThemeProxy<FbTk::MenuTheme> &tm,
int layernum;
} layer_menuitems[] = {
//TODO: nls
{0, 0, _FB_XTEXT(Layer, AboveDock, "Above Dock", "Layer above dock"), Layer::ABOVE_DOCK},
{0, 0, _FB_XTEXT(Layer, Dock, "Dock", "Layer dock"), Layer::DOCK},
{0, 0, _FB_XTEXT(Layer, Top, "Top", "Layer top"), Layer::TOP},
{0, 0, _FB_XTEXT(Layer, Normal, "Normal", "Layer normal"), Layer::NORMAL},
{0, 0, _FB_XTEXT(Layer, Bottom, "Bottom", "Layer bottom"), Layer::BOTTOM},
{0, 0, _FB_XTEXT(Layer, Desktop, "Desktop", "Layer desktop"), Layer::DESKTOP},
{0, 0, _FB_XTEXT(Layer, AboveDock, "Above Dock", "Layer above dock"), ResourceLayer::ABOVE_DOCK},
{0, 0, _FB_XTEXT(Layer, Dock, "Dock", "Layer dock"), ResourceLayer::DOCK},
{0, 0, _FB_XTEXT(Layer, Top, "Top", "Layer top"), ResourceLayer::TOP},
{0, 0, _FB_XTEXT(Layer, Normal, "Normal", "Layer normal"), ResourceLayer::NORMAL},
{0, 0, _FB_XTEXT(Layer, Bottom, "Bottom", "Layer bottom"), ResourceLayer::BOTTOM},
{0, 0, _FB_XTEXT(Layer, Desktop, "Desktop", "Layer desktop"), ResourceLayer::DESKTOP},
};
FbTk::RefCount<FbTk::Command<void> > saverc_cmd(new FbCommands::SaveResources());

View file

@ -374,7 +374,7 @@ FbMenu *MenuCreator::createMenu(const string &label, int screen_number) {
FbMenu *menu = new FbMenu(screen->menuTheme(),
screen->imageControl(),
*screen->layerManager().getLayer(Layer::MENU));
*screen->layerManager().getLayer(ResourceLayer::MENU));
if (!label.empty())
menu->setLabel(label);
@ -511,7 +511,7 @@ bool MenuCreator::createWindowMenuItem(const string &type,
FbTk::Menu *submenu =
new AlphaMenu(screen->menuTheme(),
screen->imageControl(),
*screen->layerManager().getLayer(Layer::MENU));
*screen->layerManager().getLayer(ResourceLayer::MENU));
submenu->disableTitle();
menu.insert(label.empty() ? _FB_XTEXT(Configmenu, Transparency, "Transparency",
"Menu containing various transparency options"): label,
@ -537,7 +537,7 @@ bool MenuCreator::createWindowMenuItem(const string &type,
FbTk::Menu *submenu = new LayerMenu(screen->menuTheme(),
screen->imageControl(),
*screen->layerManager().getLayer(Layer::MENU),
*screen->layerManager().getLayer(ResourceLayer::MENU),
&context,
false);
submenu->disableTitle();

View file

@ -477,7 +477,7 @@ int parseApp(ifstream &file, Application &app, string *first_line = 0) {
else
had_error = true;
} else if (str_key == "layer") {
int l = Layer::getNumFromString(str_label);
int l = ResourceLayer::getNumFromString(str_label);
had_error = (l == -1);
if (!had_error)
app.rememberLayer(l);

View file

@ -192,17 +192,17 @@ setFromString(const char *strval) {
template<>
string FbTk::Resource<Layer>::
string FbTk::Resource<ResourceLayer>::
getString() const {
return ::Layer::getString(m_value.getNum());
return ::ResourceLayer::getString(m_value.getNum());
}
template<>
void FbTk::Resource<Layer>::
void FbTk::Resource<ResourceLayer>::
setFromString(const char *strval) {
string str(strval);
int tempnum = ::Layer::getNumFromString(str);
if (tempnum >= 0 && tempnum < ::Layer::NUM_LAYERS)
int tempnum = ::ResourceLayer::getNumFromString(str);
if (tempnum >= 0 && tempnum < ::ResourceLayer::NUM_LAYERS)
m_value = tempnum;
else
setDefaultValue();

View file

@ -489,7 +489,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
changeWorkspaceID(first_desktop);
#ifdef SLIT
m_slit.reset(new Slit(*this, *layerManager().getLayer(Layer::DESKTOP),
m_slit.reset(new Slit(*this, *layerManager().getLayer(ResourceLayer::DESKTOP),
fluxbox->getSlitlistFilename().c_str()));
#endif // SLIT
@ -598,7 +598,7 @@ void BScreen::initWindows() {
#ifdef USE_TOOLBAR
m_toolbar.reset(new Toolbar(*this,
*layerManager().getLayer(::Layer::NORMAL)));
*layerManager().getLayer(::ResourceLayer::NORMAL)));
#endif // USE_TOOLBAR
unsigned int nchild;
@ -858,7 +858,7 @@ void BScreen::cycleFocus(int options, const ClientPattern *pat, bool reverse) {
FbMenu *BScreen::createMenu(const string &label) {
FbMenu *menu = new FbMenu(menuTheme(),
imageControl(),
*layerManager().getLayer(Layer::MENU));
*layerManager().getLayer(ResourceLayer::MENU));
if (!label.empty())
menu->setLabel(label);
@ -868,7 +868,7 @@ FbMenu *BScreen::createMenu(const string &label) {
FbMenu *BScreen::createToggleMenu(const string &label) {
FbMenu *menu = new ToggleMenu(menuTheme(),
imageControl(),
*layerManager().getLayer(Layer::MENU));
*layerManager().getLayer(ResourceLayer::MENU));
if (!label.empty())
menu->setLabel(label);

View file

@ -50,7 +50,7 @@ private:
SendToMenu::SendToMenu(BScreen &screen):
FbMenu(screen.menuTheme(),
screen.imageControl(),
*screen.layerManager().getLayer(Layer::MENU)) {
*screen.layerManager().getLayer(ResourceLayer::MENU)) {
// listen to:
// workspace count signal
// workspace names signal

View file

@ -224,10 +224,10 @@ Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename)
m_screen(scr),
m_clientlist_menu(scr.menuTheme(),
scr.imageControl(),
*scr.layerManager().getLayer(Layer::MENU)),
*scr.layerManager().getLayer(ResourceLayer::MENU)),
m_slitmenu(scr.menuTheme(),
scr.imageControl(),
*scr.layerManager().getLayer(Layer::MENU)),
*scr.layerManager().getLayer(ResourceLayer::MENU)),
#ifdef XINERAMA
m_xineramaheadmenu(0),
#endif // XINERAMA
@ -257,7 +257,7 @@ Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename)
scr.name() + ".slit.alpha", scr.altName() + ".Slit.Alpha"),
m_rc_on_head(scr.resourceManager(), 0,
scr.name() + ".slit.onhead", scr.altName() + ".Slit.onHead"),
m_rc_layernum(scr.resourceManager(), Layer(Layer::DOCK),
m_rc_layernum(scr.resourceManager(), ResourceLayer(ResourceLayer::DOCK),
scr.name() + ".slit.layer", scr.altName() + ".Slit.Layer") {
_FB_USES_NLS;
@ -298,7 +298,7 @@ Slit::Slit(BScreen &scr, FbTk::Layer &layer, const char *filename)
m_layermenu.reset(new LayerMenu(scr.menuTheme(),
scr.imageControl(),
*scr.layerManager().
getLayer(Layer::MENU),
getLayer(ResourceLayer::MENU),
this,
true));
m_layermenu->setLabel(_FB_XTEXT(Slit, Layer, "Slit Layer", "Title of Slit Layer Menu"));
@ -1176,7 +1176,7 @@ void Slit::setupMenu() {
// it'll be freed by the slitmenu (since not marked internal)
FbMenu *placement_menu = new FbMenu(m_screen.menuTheme(),
m_screen.imageControl(),
*m_screen.layerManager().getLayer(::Layer::MENU));
*m_screen.layerManager().getLayer(::ResourceLayer::MENU));
// setup base menu
@ -1194,7 +1194,7 @@ void Slit::setupMenu() {
screen().menuTheme(),
screen(),
screen().imageControl(),
*screen().layerManager().getLayer(::Layer::MENU),
*screen().layerManager().getLayer(::ResourceLayer::MENU),
*this,
_FB_XTEXT(Slit, OnHead, "Slit on Head", "Title of Slits On Head menu")
));

View file

@ -186,7 +186,7 @@ private:
FbTk::Resource<bool> m_rc_kde_dockapp, m_rc_auto_hide, m_rc_maximize_over;
FbTk::Resource<Slit::Placement> m_rc_placement;
FbTk::Resource<int> m_rc_alpha, m_rc_on_head;
FbTk::Resource<class Layer> m_rc_layernum;
FbTk::Resource<class ResourceLayer> m_rc_layernum;
};

View file

@ -190,15 +190,15 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::Layer &layer, size_t width):
m_layeritem(frame.window, layer),
m_layermenu(scrn.menuTheme(),
scrn.imageControl(),
*scrn.layerManager().getLayer(Layer::MENU),
*scrn.layerManager().getLayer(ResourceLayer::MENU),
this,
true),
m_placementmenu(scrn.menuTheme(),
scrn.imageControl(),
*scrn.layerManager().getLayer(Layer::MENU)),
*scrn.layerManager().getLayer(ResourceLayer::MENU)),
m_toolbarmenu(scrn.menuTheme(),
scrn.imageControl(),
*scrn.layerManager().getLayer(Layer::MENU)),
*scrn.layerManager().getLayer(ResourceLayer::MENU)),
#ifdef XINERAMA
m_xineramaheadmenu(0),
#endif // XINERAMA
@ -215,7 +215,7 @@ Toolbar::Toolbar(BScreen &scrn, FbTk::Layer &layer, size_t width):
scrn.name() + ".toolbar.widthPercent", scrn.altName() + ".Toolbar.WidthPercent"),
m_rc_alpha(scrn.resourceManager(), 255,
scrn.name() + ".toolbar.alpha", scrn.altName() + ".Toolbar.Alpha"),
m_rc_layernum(scrn.resourceManager(), Layer(Layer::DOCK),
m_rc_layernum(scrn.resourceManager(), ResourceLayer(ResourceLayer::DOCK),
scrn.name() + ".toolbar.layer", scrn.altName() + ".Toolbar.Layer"),
m_rc_on_head(scrn.resourceManager(), 1,
scrn.name() + ".toolbar.onhead", scrn.altName() + ".Toolbar.onHead"),
@ -829,7 +829,7 @@ void Toolbar::setupMenus(bool skip_new_placement) {
new XineramaHeadMenu<Toolbar>(screen().menuTheme(),
screen(),
screen().imageControl(),
*screen().layerManager().getLayer(::Layer::MENU),
*screen().layerManager().getLayer(::ResourceLayer::MENU),
*this,
_FB_XTEXT(Toolbar, OnHead, "Toolbar on Head",
"Title of toolbar on head menu")));

View file

@ -187,7 +187,7 @@ private:
FbTk::Resource<bool> m_rc_auto_hide, m_rc_maximize_over, m_rc_visible;
FbTk::Resource<int> m_rc_width_percent;
FbTk::Resource<int> m_rc_alpha;
FbTk::Resource<class Layer> m_rc_layernum;
FbTk::Resource<class ResourceLayer> m_rc_layernum;
FbTk::Resource<int> m_rc_on_head;
FbTk::Resource<Placement> m_rc_placement;
FbTk::Resource<int> m_rc_height;

View file

@ -479,7 +479,7 @@ void FluxboxWindow::init() {
m_workspace_number =
m_client->transientFor()->fbwindow()->workspaceNumber();
} else // if no parent then set default layer
moveToLayer(m_state.layernum, m_state.layernum != ::Layer::NORMAL);
moveToLayer(m_state.layernum, m_state.layernum != ::ResourceLayer::NORMAL);
fbdbg<<"FluxboxWindow::init("<<title().logical()<<") transientFor: "<<
m_client->transientFor()<<endl;
@ -1445,9 +1445,9 @@ void FluxboxWindow::setFullscreenLayer() {
getOnHead() != foc->getOnHead() ||
(foc->winClient().isTransient() &&
foc->winClient().transientFor()->fbwindow() == this)) {
moveToLayer(::Layer::ABOVE_DOCK);
moveToLayer(::ResourceLayer::ABOVE_DOCK);
} else {
moveToLayer(::Layer::DESKTOP);
moveToLayer(::ResourceLayer::DESKTOP);
}
stateSig().notify();
@ -1683,10 +1683,10 @@ void FluxboxWindow::moveToLayer(int layernum, bool force) {
fbdbg<<"FluxboxWindow("<<title().logical()<<")::moveToLayer("<<layernum<<")"<<endl;
// don't let it set its layer into menu area
if (layernum <= ::Layer::MENU)
layernum = ::Layer::MENU + 1;
else if (layernum >= ::Layer::NUM_LAYERS)
layernum = ::Layer::NUM_LAYERS - 1;
if (layernum <= ::ResourceLayer::MENU)
layernum = ::ResourceLayer::MENU + 1;
else if (layernum >= ::ResourceLayer::NUM_LAYERS)
layernum = ::ResourceLayer::NUM_LAYERS - 1;
if (!m_initialized)
m_state.layernum = layernum;
@ -1758,7 +1758,7 @@ void FluxboxWindow::setFocusFlag(bool focus) {
}
if (m_state.fullscreen && focus) {
moveToLayer(::Layer::ABOVE_DOCK);
moveToLayer(::ResourceLayer::ABOVE_DOCK);
leave(screen().focusedWindowSig());
}
@ -3774,7 +3774,7 @@ void FluxboxWindow::setWindowType(WindowState::WindowType type) {
setMouseFocus(false);
setClickFocus(false);
setDecorationMask(WindowState::DECOR_NONE);
moveToLayer(::Layer::DOCK);
moveToLayer(::ResourceLayer::DOCK);
break;
case WindowState::TYPE_DESKTOP:
/*
@ -3787,7 +3787,7 @@ void FluxboxWindow::setWindowType(WindowState::WindowType type) {
setIconHidden(true);
setFocusNew(false);
setMouseFocus(false);
moveToLayer(::Layer::DESKTOP);
moveToLayer(::ResourceLayer::DESKTOP);
setDecorationMask(WindowState::DECOR_NONE);
setTabable(false);
setMovable(false);
@ -3822,7 +3822,7 @@ void FluxboxWindow::setWindowType(WindowState::WindowType type) {
*/
setDecorationMask(WindowState::DECOR_TOOL);
setIconHidden(true);
moveToLayer(::Layer::ABOVE_DOCK);
moveToLayer(::ResourceLayer::ABOVE_DOCK);
break;
case WindowState::TYPE_NORMAL:
default:

View file

@ -25,6 +25,12 @@
#ifndef WINDOW_HH
#define WINDOW_HH
#include "FbWinFrame.hh"
#include "Focusable.hh"
#include "FocusableTheme.hh"
#include "FocusControl.hh"
#include "WinButton.hh"
#include "FbTk/DefaultValue.hh"
#include "FbTk/Timer.hh"
#include "FbTk/Subject.hh"
@ -33,13 +39,6 @@
#include "FbTk/LayerItem.hh"
#include "FbTk/Signal.hh"
#include "FbWinFrame.hh"
#include "Focusable.hh"
#include "FocusableTheme.hh"
#include "FocusControl.hh"
#include "WinButton.hh"
#include <sys/time.h>
#include <vector>
#include <string>

View file

@ -113,7 +113,7 @@ public:
focused(false),
shaded(false), fullscreen(false), stuck(false), iconic(false),
focus_hidden(false), icon_hidden(false),
maximized(0), layernum(Layer::NORMAL),
maximized(0), layernum(ResourceLayer::NORMAL),
x(0), y(0), width(1), height(1) { }
void saveGeometry(int x, int y, unsigned int width, unsigned int height,

View file

@ -509,7 +509,7 @@ void ShowDesktopCmd::execute() {
for (; it != it_end; ++it) {
if (!(*it)->fbwindow()->isIconic() && ((*it)->fbwindow()->isStuck() ||
(*it)->fbwindow()->workspaceNumber() == space) &&
(*it)->fbwindow()->layerNum() < Layer::DESKTOP) {
(*it)->fbwindow()->layerNum() < ResourceLayer::DESKTOP) {
(*it)->fbwindow()->iconify();
count++;
}

View file

@ -69,7 +69,7 @@ void add_workspaces(WorkspaceMenu& menu, BScreen& screen) {
WorkspaceMenu::WorkspaceMenu(BScreen &screen):
FbMenu(screen.menuTheme(),
screen.imageControl(),
*screen.layerManager().getLayer(Layer::MENU)) {
*screen.layerManager().getLayer(ResourceLayer::MENU)) {
init(screen);
}

View file

@ -401,7 +401,7 @@ Fluxbox::Fluxbox(int argc, char **argv,
BScreen *screen = new BScreen(m_screen_rm.lock(),
std::string("session.screen") + sc_nr,
std::string("session.Screen") + sc_nr,
screens[s], ::Layer::NUM_LAYERS);
screens[s], ::ResourceLayer::NUM_LAYERS);
// already handled
if (! screen->isScreenManaged()) {