comparison dep/animia/src/animia.cc @ 162:61b76c7b656a

dep/animia: add os x launchservices method
author Paper <mrpapersonic@gmail.com>
date Fri, 17 Nov 2023 16:49:57 -0500
parents 80d6b28eb29f
children 54c5d80a737e
comparison
equal deleted inserted replaced
161:71752dcbb49f 162:61b76c7b656a
70 Note: X11 is stupid and there's no reliable way to get a PID from a given window. 70 Note: X11 is stupid and there's no reliable way to get a PID from a given window.
71 This is because some windows might not even have a process attached to them. 71 This is because some windows might not even have a process attached to them.
72 We should set the PID of the process if we can get it, but that'll be for when 72 We should set the PID of the process if we can get it, but that'll be for when
73 I can actually be arsed to implement the X11 backend. */ 73 I can actually be arsed to implement the X11 backend. */
74 auto window_proc = [&](const Process& process, const Window& window) -> bool { 74 auto window_proc = [&](const Process& process, const Window& window) -> bool {
75 std::cout << "Window ID: " << window.id << "\n"
76 << "\tClass name: " << window.class_name << "\n"
77 << "\tTitle text: " << window.text << "\n"
78 << "\tProcess info: " << "\n"
79 << "\t\tPID: " << process.pid << "\n";
80 for (const auto& player : players) { 75 for (const auto& player : players) {
81 if (!internal::PlayerHasStrategy(player, Strategy::WindowTitle)) 76 if (!internal::PlayerHasStrategy(player, Strategy::WindowTitle))
82 continue; 77 continue;
83 78
84 if (!internal::IsWindowInList(player, window.class_name)) 79 if (!internal::IsWindowInList(player, window.class_name))