Mercurial > minori
comparison dep/animia/src/animia.cc @ 191:0fc126d52de4
animia: multiple stylistic choices
win.class_name is now used to store bundle IDs on OS X,
add some little explanations here and there for dumb stuff
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Thu, 07 Dec 2023 01:48:04 -0500 |
parents | 2d5823df870f |
children | bc1ae1810855 |
comparison
equal
deleted
inserted
replaced
190:2d5823df870f | 191:0fc126d52de4 |
---|---|
6 #include "animia/win.h" | 6 #include "animia/win.h" |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | |
12 #include <iostream> | |
13 | 11 |
14 namespace animia { | 12 namespace animia { |
15 | 13 |
16 namespace internal { | 14 namespace internal { |
17 | 15 |
70 Note: X11 is stupid and there's no reliable way to get a PID from a given window. | 68 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. | 69 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 | 70 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. */ | 71 I can actually be arsed to implement the X11 backend. */ |
74 auto window_proc = [&](const Process& process, const Window& window) -> bool { | 72 auto window_proc = [&](const Process& process, const Window& window) -> bool { |
75 std::cout << process.name << std::endl; | |
76 for (const auto& player : players) { | 73 for (const auto& player : players) { |
77 if (!internal::PlayerHasStrategy(player, Strategy::WindowTitle)) | 74 if (!internal::PlayerHasStrategy(player, Strategy::WindowTitle)) |
78 continue; | 75 continue; |
79 | 76 |
80 if (!internal::IsWindowInList(player, window.class_name)) | 77 if (!internal::IsWindowInList(player, window.class_name)) |