parent
839d5b6ad8
commit
c8d71542dc
4 changed files with 257 additions and 246 deletions
|
@ -284,7 +284,7 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
|
||||||
return new SendToNextWorkspaceCmd(atoi(arguments.c_str()));
|
return new SendToNextWorkspaceCmd(atoi(arguments.c_str()));
|
||||||
else if (command == "sendtoprevworkspace")
|
else if (command == "sendtoprevworkspace")
|
||||||
return new SendToPrevWorkspaceCmd(atoi(arguments.c_str()));
|
return new SendToPrevWorkspaceCmd(atoi(arguments.c_str()));
|
||||||
else if (command == "killwindow")
|
else if (command == "killwindow" || command == "kill")
|
||||||
return new KillWindowCmd();
|
return new KillWindowCmd();
|
||||||
else if (command == "nexttab")
|
else if (command == "nexttab")
|
||||||
return new CurrentWindowCmd(&FluxboxWindow::nextClient);
|
return new CurrentWindowCmd(&FluxboxWindow::nextClient);
|
||||||
|
|
|
@ -476,6 +476,9 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
|
||||||
} else if (type == "close") {
|
} else if (type == "close") {
|
||||||
RefCmd close_cmd(new WindowCmd(win, &FluxboxWindow::close));
|
RefCmd close_cmd(new WindowCmd(win, &FluxboxWindow::close));
|
||||||
menu.insert(label.empty()?_FBTEXT(Windowmenu, Close, "Close", "Close the window"):label.c_str(), close_cmd);
|
menu.insert(label.empty()?_FBTEXT(Windowmenu, Close, "Close", "Close the window"):label.c_str(), close_cmd);
|
||||||
|
} else if (type == "kill" || type == "killwindow") {
|
||||||
|
RefCmd kill_cmd(new WindowCmd(win, &FluxboxWindow::kill));
|
||||||
|
menu.insert(label.empty()?_FBTEXT(Windowmenu, Kill, "Kill", "Kill the window"):label.c_str(), kill_cmd);
|
||||||
} else if (type == "lower") {
|
} else if (type == "lower") {
|
||||||
RefCmd lower_cmd(new WindowCmd(win, &FluxboxWindow::lower));
|
RefCmd lower_cmd(new WindowCmd(win, &FluxboxWindow::lower));
|
||||||
menu.insert(label.empty()?_FBTEXT(Windowmenu, Lower, "Lower", "Lower the window"):label.c_str(), lower_cmd);
|
menu.insert(label.empty()?_FBTEXT(Windowmenu, Lower, "Lower", "Lower the window"):label.c_str(), lower_cmd);
|
||||||
|
|
|
@ -1396,11 +1396,6 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) {
|
||||||
(*client_it)->setEventMask(PropertyChangeMask | StructureNotifyMask | FocusChangeMask);
|
(*client_it)->setEventMask(PropertyChangeMask | StructureNotifyMask | FocusChangeMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
show();
|
|
||||||
|
|
||||||
if (was_iconic && screen().doFocusNew())
|
|
||||||
setInputFocus();
|
|
||||||
|
|
||||||
if (reassoc && !m_client->transients.empty()) {
|
if (reassoc && !m_client->transients.empty()) {
|
||||||
// deiconify all transients
|
// deiconify all transients
|
||||||
client_it = clientList().begin();
|
client_it = clientList().begin();
|
||||||
|
@ -1417,6 +1412,12 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
show();
|
||||||
|
|
||||||
|
if (was_iconic && screen().doFocusNew())
|
||||||
|
setInputFocus();
|
||||||
|
|
||||||
|
|
||||||
oplock = false;
|
oplock = false;
|
||||||
|
|
||||||
if (do_raise)
|
if (do_raise)
|
||||||
|
@ -3500,6 +3501,11 @@ void FluxboxWindow::close() {
|
||||||
m_client->sendClose(false);
|
m_client->sendClose(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FluxboxWindow::kill() {
|
||||||
|
if (m_client)
|
||||||
|
m_client->sendClose(true);
|
||||||
|
}
|
||||||
|
|
||||||
void FluxboxWindow::setupWindow() {
|
void FluxboxWindow::setupWindow() {
|
||||||
// sets up our window
|
// sets up our window
|
||||||
// we allow both to be done at once to share the commands
|
// we allow both to be done at once to share the commands
|
||||||
|
|
|
@ -191,6 +191,8 @@ public:
|
||||||
void deiconify(bool reassoc = true, bool do_raise = true);
|
void deiconify(bool reassoc = true, bool do_raise = true);
|
||||||
/// close current client
|
/// close current client
|
||||||
void close();
|
void close();
|
||||||
|
/// kill current client
|
||||||
|
void kill();
|
||||||
/// set the window in withdrawn state
|
/// set the window in withdrawn state
|
||||||
void withdraw(bool interrupt_moving);
|
void withdraw(bool interrupt_moving);
|
||||||
/// toggle maximize
|
/// toggle maximize
|
||||||
|
|
Loading…
Reference in a new issue