aboutsummaryrefslogtreecommitdiff
path: root/src/Remember.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Remember.cc')
-rw-r--r--src/Remember.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Remember.cc b/src/Remember.cc
index 47528af..05690d4 100644
--- a/src/Remember.cc
+++ b/src/Remember.cc
@@ -21,7 +21,7 @@
21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22// DEALINGS IN THE SOFTWARE. 22// DEALINGS IN THE SOFTWARE.
23 23
24// $Id: Remember.cc,v 1.40 2004/09/02 08:58:06 akir Exp $ 24// $Id: Remember.cc,v 1.41 2004/09/02 09:52:26 akir Exp $
25 25
26#include "Remember.hh" 26#include "Remember.hh"
27#include "ClientPattern.hh" 27#include "ClientPattern.hh"
@@ -79,14 +79,19 @@ public:
79 m_win(fbwin), m_attrib(attrib) {} 79 m_win(fbwin), m_attrib(attrib) {}
80 80
81 bool isSelected() const { 81 bool isSelected() const {
82 return m_remember.isRemembered(m_win.winClient(), m_attrib); 82 if (m_win.numClients()) // ensure it HAS clients
83 return m_remember.isRemembered(m_win.winClient(), m_attrib);
84 else
85 return false;
83 } 86 }
84 87
85 bool isEnabled() const { 88 bool isEnabled() const {
86 if (m_attrib != Remember::REM_JUMPWORKSPACE) 89 if (m_attrib != Remember::REM_JUMPWORKSPACE)
87 return true; 90 return true;
88 else 91 else if (m_win.numClients())
89 return (m_remember.isRemembered(m_win.winClient(), Remember::REM_WORKSPACE)); 92 return (m_remember.isRemembered(m_win.winClient(), Remember::REM_WORKSPACE));
93 else
94 return false;
90 } 95 }
91 96
92 void click(int button, int time) { 97 void click(int button, int time) {