diff options
author | markt <markt> | 2007-02-06 19:04:32 (GMT) |
---|---|---|
committer | markt <markt> | 2007-02-06 19:04:32 (GMT) |
commit | 07ea9ec4b4a2c1252c64dc34438c4bdeb5e3331b (patch) | |
tree | 70a13ec7275abf62999528295623ab2ddaee4d71 /src/WindowCmd.hh | |
parent | ebd2fa9a99846381f3ef61f8b186f2c7373c419b (diff) | |
download | fluxbox_pavel-07ea9ec4b4a2c1252c64dc34438c4bdeb5e3331b.zip fluxbox_pavel-07ea9ec4b4a2c1252c64dc34438c4bdeb5e3331b.tar.bz2 |
closing a window from the workspace menu should close the chosen client,
rather than the active tab in the same window
Diffstat (limited to 'src/WindowCmd.hh')
-rw-r--r-- | src/WindowCmd.hh | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/WindowCmd.hh b/src/WindowCmd.hh index 5eca723..17a4e86 100644 --- a/src/WindowCmd.hh +++ b/src/WindowCmd.hh | |||
@@ -26,14 +26,27 @@ | |||
26 | 26 | ||
27 | #include "FbTk/Command.hh" | 27 | #include "FbTk/Command.hh" |
28 | #include "Window.hh" | 28 | #include "Window.hh" |
29 | #include "WinClient.hh" | ||
29 | 30 | ||
30 | /// holds context for WindowCmd | 31 | /// holds context for WindowCmd |
31 | class WindowCmd_base { | 32 | class WindowCmd_base { |
32 | public: | 33 | public: |
33 | static void setWindow(FluxboxWindow *win) { s_win = win; } | 34 | // some window commands (e.g. close, kill, detach) need to know which client |
35 | // the command refers to, so we store it here as well, in case it is not the | ||
36 | // current client (selected from workspace menu, for example) | ||
37 | static void setWindow(FluxboxWindow *win) { | ||
38 | s_win = win; | ||
39 | s_client = (win ? &win->winClient() : 0); | ||
40 | } | ||
41 | static void setClient(WinClient *client) { | ||
42 | s_client = client; | ||
43 | s_win = (client ? client->fbwindow() : 0); | ||
44 | } | ||
34 | static FluxboxWindow *window() { return s_win; } | 45 | static FluxboxWindow *window() { return s_win; } |
46 | static WinClient *client() { return s_client; } | ||
35 | protected: | 47 | protected: |
36 | static FluxboxWindow *s_win; | 48 | static FluxboxWindow *s_win; |
49 | static WinClient *s_client; | ||
37 | }; | 50 | }; |
38 | 51 | ||
39 | 52 | ||