diff options
Diffstat (limited to 'src/Workspace.cc')
-rw-r--r-- | src/Workspace.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/Workspace.cc b/src/Workspace.cc index 8a6bdbb..28c2c34 100644 --- a/src/Workspace.cc +++ b/src/Workspace.cc | |||
@@ -31,6 +31,7 @@ | |||
31 | #include "Window.hh" | 31 | #include "Window.hh" |
32 | #include "WinClient.hh" | 32 | #include "WinClient.hh" |
33 | #include "FbWinFrame.hh" | 33 | #include "FbWinFrame.hh" |
34 | #include "WindowCmd.hh" | ||
34 | 35 | ||
35 | #include "FbTk/I18n.hh" | 36 | #include "FbTk/I18n.hh" |
36 | #include "FbTk/MenuItem.hh" | 37 | #include "FbTk/MenuItem.hh" |
@@ -83,10 +84,18 @@ int countTransients(const WinClient &client) { | |||
83 | class ClientMenuItem:public FbTk::MenuItem { | 84 | class ClientMenuItem:public FbTk::MenuItem { |
84 | public: | 85 | public: |
85 | ClientMenuItem(WinClient &client): | 86 | ClientMenuItem(WinClient &client): |
86 | FbTk::MenuItem(client.title().c_str(), client.fbwindow() ? &client.fbwindow()->menu() : 0), | 87 | FbTk::MenuItem(client.title().c_str(), &client.screen().windowMenu()), |
87 | m_client(client) { | 88 | m_client(client) { |
88 | 89 | ||
89 | } | 90 | } |
91 | FbTk::Menu *submenu() { return &m_client.screen().windowMenu(); } | ||
92 | const FbTk::Menu *submenu() const { return &m_client.screen().windowMenu(); } | ||
93 | |||
94 | void showSubmenu() { | ||
95 | WindowCmd<void>::setWindow(m_client.fbwindow()); | ||
96 | FbTk::MenuItem::showSubmenu(); | ||
97 | } | ||
98 | |||
90 | void click(int button, int time) { | 99 | void click(int button, int time) { |
91 | if (m_client.fbwindow() == 0) | 100 | if (m_client.fbwindow() == 0) |
92 | return; | 101 | return; |