summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarkt <markt>2007-02-04 18:44:28 (GMT)
committermarkt <markt>2007-02-04 18:44:28 (GMT)
commitcf6e471fbf027a1ba08693d6562ae5d63aaa9e24 (patch)
tree04551a7cf762ad72858ea9937ddd48ffc760d6f4
parent07a3b3939bbdfa084f91c07984fdc60c2696a213 (diff)
downloadfluxbox_lack-cf6e471fbf027a1ba08693d6562ae5d63aaa9e24.zip
fluxbox_lack-cf6e471fbf027a1ba08693d6562ae5d63aaa9e24.tar.bz2
fix remembered layer and layer menu
-rw-r--r--ChangeLog4
-rw-r--r--src/LayerMenu.cc7
-rw-r--r--src/LayerMenu.hh9
-rw-r--r--src/Window.cc10
-rw-r--r--src/Window.hh2
5 files changed, 22 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index a5235b2..328f320 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
1 (Format: Year/Month/Day) 1 (Format: Year/Month/Day)
2Changes for 1.0rc3: 2Changes for 1.0rc3:
3*07/02/04: 3*07/02/04:
4 * Layer wasn't set properly on remembered windows, and the layer menu
5 wasn't getting updated properly, bugs #1535304, #1572683, #1646740
6 (Mark)
7 Window.cc/hh LayerMenu.cc/hh
4 * Clicking on the edge of a button didn't work, bugs #1060891, #1517747 8 * Clicking on the edge of a button didn't work, bugs #1060891, #1517747
5 (Mark) 9 (Mark)
6 FbTk/Button.cc 10 FbTk/Button.cc
diff --git a/src/LayerMenu.cc b/src/LayerMenu.cc
index 86e6dec..4a02214 100644
--- a/src/LayerMenu.cc
+++ b/src/LayerMenu.cc
@@ -65,3 +65,10 @@ LayerMenu::LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
65 } 65 }
66 updateMenu(); 66 updateMenu();
67} 67}
68
69// update which items appear disabled whenever we show the menu
70void LayerMenu::show() {
71 frameWindow().updateBackground(false);
72 clearWindow();
73 FbTk::Menu::show();
74}
diff --git a/src/LayerMenu.hh b/src/LayerMenu.hh
index 3f8330f..fcc4edb 100644
--- a/src/LayerMenu.hh
+++ b/src/LayerMenu.hh
@@ -41,11 +41,12 @@ public:
41/// this class holds the layermenu items 41/// this class holds the layermenu items
42class LayerMenuItem : public FbTk::MenuItem { 42class LayerMenuItem : public FbTk::MenuItem {
43public: 43public:
44 LayerMenuItem(const FbTk::FbString &label, LayerObject *object, int layernum, 44 LayerMenuItem(const FbTk::FbString &label, LayerObject *object,
45 FbTk::RefCount<FbTk::Command> &cmd): 45 int layernum, FbTk::RefCount<FbTk::Command> &cmd):
46 FbTk::MenuItem(label, cmd), m_object(object), m_layernum(layernum) {} 46 FbTk::MenuItem(label, cmd), m_object(object), m_layernum(layernum) {}
47 47
48 LayerMenuItem(const FbTk::FbString &label, LayerObject *object, int layernum): 48 LayerMenuItem(const FbTk::FbString &label, LayerObject *object,
49 int layernum):
49 FbTk::MenuItem(label), m_object(object), m_layernum(layernum) {} 50 FbTk::MenuItem(label), m_object(object), m_layernum(layernum) {}
50 51
51 bool isEnabled() const { return m_object->layerNumber() != m_layernum; } 52 bool isEnabled() const { return m_object->layerNumber() != m_layernum; }
@@ -65,7 +66,7 @@ class LayerMenu : public ToggleMenu {
65public: 66public:
66 LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, 67 LayerMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl,
67 FbTk::XLayer &layer, LayerObject *item, bool save_rc); 68 FbTk::XLayer &layer, LayerObject *item, bool save_rc);
68 69 void show();
69}; 70};
70 71
71#endif // LAYERMENU_HH 72#endif // LAYERMENU_HH
diff --git a/src/Window.cc b/src/Window.cc
index df08744..1b3ef2f 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -497,7 +497,7 @@ void FluxboxWindow::init() {
497 m_client->transientFor()->fbwindow() != this) 497 m_client->transientFor()->fbwindow() != this)
498 layerItem().setLayer(m_client->transientFor()->fbwindow()->layerItem().getLayer()); 498 layerItem().setLayer(m_client->transientFor()->fbwindow()->layerItem().getLayer());
499 else // if no parent then set default layer 499 else // if no parent then set default layer
500 moveToLayer(m_layernum); 500 moveToLayer(m_layernum, m_layernum != ::Layer::NORMAL);
501#ifdef DEBUG 501#ifdef DEBUG
502 cerr<<"FluxboxWindow::init("<<title()<<") transientFor: "<< 502 cerr<<"FluxboxWindow::init("<<title()<<") transientFor: "<<
503 m_client->transientFor()<<endl; 503 m_client->transientFor()<<endl;
@@ -1934,7 +1934,7 @@ void FluxboxWindow::lowerLayer() {
1934} 1934}
1935 1935
1936 1936
1937void FluxboxWindow::moveToLayer(int layernum) { 1937void FluxboxWindow::moveToLayer(int layernum, bool force) {
1938#ifdef DEBUG 1938#ifdef DEBUG
1939 cerr<<"FluxboxWindow("<<title()<<")::moveToLayer("<<layernum<<")"<<endl; 1939 cerr<<"FluxboxWindow("<<title()<<")::moveToLayer("<<layernum<<")"<<endl;
1940#endif // DEBUG 1940#endif // DEBUG
@@ -1948,7 +1948,7 @@ void FluxboxWindow::moveToLayer(int layernum) {
1948 if (!m_initialized) 1948 if (!m_initialized)
1949 m_layernum = layernum; 1949 m_layernum = layernum;
1950 1950
1951 if (m_layernum == layernum) 1951 if (m_layernum == layernum && !force)
1952 return; 1952 return;
1953 1953
1954 // get root window 1954 // get root window
@@ -1963,9 +1963,9 @@ void FluxboxWindow::moveToLayer(int layernum) {
1963 1963
1964 if (!win->isIconic()) { 1964 if (!win->isIconic()) {
1965 if (layernum > m_layernum) 1965 if (layernum > m_layernum)
1966 screen().updateNetizenWindowRaise(client->window());
1967 else
1968 screen().updateNetizenWindowLower(client->window()); 1966 screen().updateNetizenWindowLower(client->window());
1967 else
1968 screen().updateNetizenWindowRaise(client->window());
1969 } 1969 }
1970 win->layerItem().moveToLayer(layernum); 1970 win->layerItem().moveToLayer(layernum);
1971 // remember number just in case a transient happens to revisit this window 1971 // remember number just in case a transient happens to revisit this window
diff --git a/src/Window.hh b/src/Window.hh
index 50f756d..2cec115 100644
--- a/src/Window.hh
+++ b/src/Window.hh
@@ -245,7 +245,7 @@ public:
245 void tempRaise(); 245 void tempRaise();
246 void raiseLayer(); 246 void raiseLayer();
247 void lowerLayer(); 247 void lowerLayer();
248 void moveToLayer(int layernum); 248 void moveToLayer(int layernum, bool force = false);
249 void setFocusHidden(bool value); 249 void setFocusHidden(bool value);
250 void setIconHidden(bool value); 250 void setIconHidden(bool value);
251 void reconfigure(); 251 void reconfigure();