summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--src/SendToMenu.cc20
-rw-r--r--src/Workspace.cc12
3 files changed, 33 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index ec2e7ee..0cfd15f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,16 @@
1(Format: Year/Month/Day) 1(Format: Year/Month/Day)
2Changes for 0.9.13 2Changes for 0.9.13
3*05/04/23: 3*05/04/23:
4 * Close of #956325 (Mathias)
5 WorkspaceMenu -> left click on a item will jump TO that
6 workspace
7 -> middle click will fetch it to the current
8 workspac
9 SendToMenu -> left click send it quietly
10 -> middle click send it and follows to that
11 workspace
12 This should now match whats written in the manpage.
13 Workspace.cc SendToMenu.cc
4 * Fixed #960535 aka Deiconify with apps set 'sticky' (Mathias) 14 * Fixed #960535 aka Deiconify with apps set 'sticky' (Mathias)
5 FbCommands.cc 15 FbCommands.cc
6 * Fixed #1020399 aka broken ShowDesktop - command (Mathias) 16 * Fixed #1020399 aka broken ShowDesktop - command (Mathias)
diff --git a/src/SendToMenu.cc b/src/SendToMenu.cc
index fee4c4d..c039f16 100644
--- a/src/SendToMenu.cc
+++ b/src/SendToMenu.cc
@@ -29,19 +29,22 @@
29#include "fluxbox.hh" 29#include "fluxbox.hh"
30#include "Workspace.hh" 30#include "Workspace.hh"
31 31
32#include "FbTk/MultiButtonMenuItem.hh"
32#include "FbTk/Command.hh" 33#include "FbTk/Command.hh"
33 34
34class SendToCmd: public FbTk::Command { 35class SendToCmd: public FbTk::Command {
35public: 36public:
36 SendToCmd(FluxboxWindow &win, int workspace): 37 SendToCmd(FluxboxWindow &win, int workspace, bool follow):
37 m_win(win), 38 m_win(win),
38 m_workspace(workspace) { } 39 m_workspace(workspace),
40 m_follow(follow) { }
39 void execute() { 41 void execute() {
40 m_win.screen().sendToWorkspace(m_workspace, &m_win, false); 42 m_win.screen().sendToWorkspace(m_workspace, &m_win, m_follow);
41 } 43 }
42private: 44private:
43 FluxboxWindow &m_win; 45 FluxboxWindow &m_win;
44 const int m_workspace; 46 const int m_workspace;
47 const bool m_follow;
45}; 48};
46 49
47SendToMenu::SendToMenu(FluxboxWindow &win): 50SendToMenu::SendToMenu(FluxboxWindow &win):
@@ -91,9 +94,14 @@ void SendToMenu::update(FbTk::Subject *subj) {
91 94
92 const BScreen::Workspaces &wlist = m_win.screen().getWorkspacesList(); 95 const BScreen::Workspaces &wlist = m_win.screen().getWorkspacesList();
93 for (size_t i = 0; i < wlist.size(); ++i) { 96 for (size_t i = 0; i < wlist.size(); ++i) {
94 FbTk::RefCount<FbTk::Command> sendto_cmd(new SendToCmd(m_win, i)); 97 FbTk::RefCount<FbTk::Command> sendto_cmd(new SendToCmd(m_win, i, false));
95 insert(wlist[i]->name().c_str(), sendto_cmd); 98 FbTk::RefCount<FbTk::Command> sendto_follow_cmd(new SendToCmd(m_win, i, true));
96 99
100 FbTk::MultiButtonMenuItem* item = new FbTk::MultiButtonMenuItem(3, wlist[i]->name().c_str());
101 item->setCommand(1, sendto_cmd);
102 item->setCommand(2, sendto_follow_cmd);
103 item->setCommand(3, sendto_cmd);
104 insert(item);
97 } 105 }
98 106
99 setItemEnabled(m_win.workspaceNumber(), false); 107 setItemEnabled(m_win.workspaceNumber(), false);
diff --git a/src/Workspace.cc b/src/Workspace.cc
index bf914fc..4985c39 100644
--- a/src/Workspace.cc
+++ b/src/Workspace.cc
@@ -92,9 +92,15 @@ public:
92 return; 92 return;
93 FluxboxWindow &win = *m_client.fbwindow(); 93 FluxboxWindow &win = *m_client.fbwindow();
94 94
95 win.screen().changeWorkspaceID(win.workspaceNumber()); 95 // fetch the window to the current workspace
96 win.setCurrentClient(m_client); 96 if (button == 2 && win.screen().currentWorkspaceID() != win.workspaceNumber()) {
97 win.raiseAndFocus(); 97 win.menu().hide();
98 win.screen().sendToWorkspace(win.screen().currentWorkspaceID(), &win, true);
99 } else { // warp to the workspace of the window
100 win.screen().changeWorkspaceID(win.workspaceNumber());
101 win.setCurrentClient(m_client);
102 win.raiseAndFocus();
103 }
98 } 104 }
99 105
100 const std::string &label() const { return m_client.title(); } 106 const std::string &label() const { return m_client.title(); }