close #956325
This commit is contained in:
parent
efe4ead214
commit
9288ae8eb0
3 changed files with 33 additions and 9 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,6 +1,16 @@
|
|||
(Format: Year/Month/Day)
|
||||
Changes for 0.9.13
|
||||
*05/04/23:
|
||||
* Close of #956325 (Mathias)
|
||||
WorkspaceMenu -> left click on a item will jump TO that
|
||||
workspace
|
||||
-> middle click will fetch it to the current
|
||||
workspac
|
||||
SendToMenu -> left click send it quietly
|
||||
-> middle click send it and follows to that
|
||||
workspace
|
||||
This should now match whats written in the manpage.
|
||||
Workspace.cc SendToMenu.cc
|
||||
* Fixed #960535 aka Deiconify with apps set 'sticky' (Mathias)
|
||||
FbCommands.cc
|
||||
* Fixed #1020399 aka broken ShowDesktop - command (Mathias)
|
||||
|
|
|
@ -29,19 +29,22 @@
|
|||
#include "fluxbox.hh"
|
||||
#include "Workspace.hh"
|
||||
|
||||
#include "FbTk/MultiButtonMenuItem.hh"
|
||||
#include "FbTk/Command.hh"
|
||||
|
||||
class SendToCmd: public FbTk::Command {
|
||||
public:
|
||||
SendToCmd(FluxboxWindow &win, int workspace):
|
||||
SendToCmd(FluxboxWindow &win, int workspace, bool follow):
|
||||
m_win(win),
|
||||
m_workspace(workspace) { }
|
||||
m_workspace(workspace),
|
||||
m_follow(follow) { }
|
||||
void execute() {
|
||||
m_win.screen().sendToWorkspace(m_workspace, &m_win, false);
|
||||
m_win.screen().sendToWorkspace(m_workspace, &m_win, m_follow);
|
||||
}
|
||||
private:
|
||||
FluxboxWindow &m_win;
|
||||
const int m_workspace;
|
||||
const bool m_follow;
|
||||
};
|
||||
|
||||
SendToMenu::SendToMenu(FluxboxWindow &win):
|
||||
|
@ -91,9 +94,14 @@ void SendToMenu::update(FbTk::Subject *subj) {
|
|||
|
||||
const BScreen::Workspaces &wlist = m_win.screen().getWorkspacesList();
|
||||
for (size_t i = 0; i < wlist.size(); ++i) {
|
||||
FbTk::RefCount<FbTk::Command> sendto_cmd(new SendToCmd(m_win, i));
|
||||
insert(wlist[i]->name().c_str(), sendto_cmd);
|
||||
|
||||
FbTk::RefCount<FbTk::Command> sendto_cmd(new SendToCmd(m_win, i, false));
|
||||
FbTk::RefCount<FbTk::Command> sendto_follow_cmd(new SendToCmd(m_win, i, true));
|
||||
|
||||
FbTk::MultiButtonMenuItem* item = new FbTk::MultiButtonMenuItem(3, wlist[i]->name().c_str());
|
||||
item->setCommand(1, sendto_cmd);
|
||||
item->setCommand(2, sendto_follow_cmd);
|
||||
item->setCommand(3, sendto_cmd);
|
||||
insert(item);
|
||||
}
|
||||
|
||||
setItemEnabled(m_win.workspaceNumber(), false);
|
||||
|
|
|
@ -92,9 +92,15 @@ public:
|
|||
return;
|
||||
FluxboxWindow &win = *m_client.fbwindow();
|
||||
|
||||
win.screen().changeWorkspaceID(win.workspaceNumber());
|
||||
win.setCurrentClient(m_client);
|
||||
win.raiseAndFocus();
|
||||
// fetch the window to the current workspace
|
||||
if (button == 2 && win.screen().currentWorkspaceID() != win.workspaceNumber()) {
|
||||
win.menu().hide();
|
||||
win.screen().sendToWorkspace(win.screen().currentWorkspaceID(), &win, true);
|
||||
} else { // warp to the workspace of the window
|
||||
win.screen().changeWorkspaceID(win.workspaceNumber());
|
||||
win.setCurrentClient(m_client);
|
||||
win.raiseAndFocus();
|
||||
}
|
||||
}
|
||||
|
||||
const std::string &label() const { return m_client.title(); }
|
||||
|
|
Loading…
Reference in a new issue