diff --git a/killer/Makefile.am b/killer/Makefile.am new file mode 100644 index 0000000000..acbf5e77db --- /dev/null +++ b/killer/Makefile.am @@ -0,0 +1,9 @@ +INCLUDES = $(all_includes) + +bin_PROGRAMS = kwin_killer_helper + +kwin_killer_helper_SOURCES = killer.cpp +kwin_killer_helper_LDADD = $(LIB_KDEUI) +kwin_killer_helper_LDFLAGS = $(all_libraries) $(KDE_RPATH) + +METASOURCES = AUTO diff --git a/killer/killer.cpp b/killer/killer.cpp new file mode 100644 index 0000000000..134173c832 --- /dev/null +++ b/killer/killer.cpp @@ -0,0 +1,108 @@ +/**************************************************************************** + + Copyright (C) 2003 Lubos Lunak + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +static const KCmdLineOptions options[] = +{ + { "pid ", I18N_NOOP("PID of the application to terminate."), 0 }, + { "hostname ", I18N_NOOP("Hostname on which the application is running."), 0 }, + { "windowname ", I18N_NOOP("Caption of the window to be terminated."), 0 }, + { "applicationname ", I18N_NOOP("Name of the application to be terminated."), 0 }, + { "wid ", I18N_NOOP("ID of resource belonging to the application."), 0 }, + { "timestamp