adds "kill" to the windowmenu

closes #1075142
This commit is contained in:
mathias 2004-11-30 01:26:00 +00:00
parent 839d5b6ad8
commit c8d71542dc
4 changed files with 257 additions and 246 deletions

View file

@ -284,7 +284,7 @@ FbTk::Command *FbCommandFactory::stringToCommand(const std::string &command,
return new SendToNextWorkspaceCmd(atoi(arguments.c_str()));
else if (command == "sendtoprevworkspace")
return new SendToPrevWorkspaceCmd(atoi(arguments.c_str()));
else if (command == "killwindow")
else if (command == "killwindow" || command == "kill")
return new KillWindowCmd();
else if (command == "nexttab")
return new CurrentWindowCmd(&FluxboxWindow::nextClient);

View file

@ -476,6 +476,9 @@ bool MenuCreator::createWindowMenuItem(const std::string &type,
} else if (type == "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);
} 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") {
RefCmd lower_cmd(new WindowCmd(win, &FluxboxWindow::lower));
menu.insert(label.empty()?_FBTEXT(Windowmenu, Lower, "Lower", "Lower the window"):label.c_str(), lower_cmd);

View file

@ -1396,11 +1396,6 @@ void FluxboxWindow::deiconify(bool reassoc, bool do_raise) {
(*client_it)->setEventMask(PropertyChangeMask | StructureNotifyMask | FocusChangeMask);
}
show();
if (was_iconic && screen().doFocusNew())
setInputFocus();
if (reassoc && !m_client->transients.empty()) {
// deiconify all transients
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;
if (do_raise)
@ -3500,6 +3501,11 @@ void FluxboxWindow::close() {
m_client->sendClose(false);
}
void FluxboxWindow::kill() {
if (m_client)
m_client->sendClose(true);
}
void FluxboxWindow::setupWindow() {
// sets up our window
// we allow both to be done at once to share the commands

View file

@ -191,6 +191,8 @@ public:
void deiconify(bool reassoc = true, bool do_raise = true);
/// close current client
void close();
/// kill current client
void kill();
/// set the window in withdrawn state
void withdraw(bool interrupt_moving);
/// toggle maximize