linux-capture: Remove unused code

This commit is contained in:
MaZderMind 2020-06-07 16:42:55 +02:00 committed by Kurt Kartaltepe
parent 6bb39ea3de
commit 9afd1c99bd
2 changed files with 0 additions and 53 deletions

View File

@ -32,22 +32,6 @@ void cleanupDisplay()
xdisplay = 0;
}
static void getAllWindows(Window parent, std::list<Window> &windows)
{
UNUSED_PARAMETER(parent);
UNUSED_PARAMETER(windows);
}
std::list<Window> getAllWindows()
{
std::list<Window> res;
for (int i = 0; i < ScreenCount(disp()); ++i)
getAllWindows(RootWindow(disp(), i), res);
return res;
}
// Specification for checking for ewmh support at
// http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472693600
@ -182,40 +166,6 @@ std::string getWindowAtom(Window win, const char *atom)
return res;
}
std::string getWindowCommand(Window win)
{
Atom xi = XInternAtom(disp(), "WM_COMMAND", false);
int n;
char **list = 0;
XTextProperty tp;
std::string res = "error";
XGetTextProperty(disp(), win, &tp, xi);
if (!tp.nitems)
return std::string();
if (tp.encoding == XA_STRING) {
res = (char *)tp.value;
} else {
int ret = XmbTextPropertyToTextList(disp(), &tp, &list, &n);
if (ret >= Success && n > 0 && *list) {
res = *list;
XFreeStringList(list);
}
}
XFree(tp.value);
return res;
}
int getWindowPid(Window win)
{
UNUSED_PARAMETER(win);
return 1234; //TODO
}
static std::map<XCompcapMain *, Window> windowForSource;
static std::unordered_set<XCompcapMain *> changedSources;
static pthread_mutex_t changeLock = PTHREAD_MUTEX_INITIALIZER;

View File

@ -76,13 +76,10 @@ namespace XCompcap {
Display *disp();
void cleanupDisplay();
std::string getWindowCommand(Window win);
int getRootWindowScreen(Window root);
std::string getWindowAtom(Window win, const char *atom);
int getWindowPid(Window win);
bool ewmhIsSupported();
std::list<Window> getTopLevelWindows();
std::list<Window> getAllWindows();
inline std::string getWindowName(Window win)
{