Mercurial > minori
comparison dep/animia/src/fd/xnu.cc @ 166:54c5d80a737e
dep/animia: add libutil method
I changed the "linux" method to be "proc", because it isn't exactly Linux specific
this commit also has some changes to the x11 stuff:
instead of enumerating over only top-level windows, we iterate over ALL of them
this is because many X11 apps actually use multiple windows
for some reason, I still can't get it to work with VLC, but it picks up Firefox...
| author | paper@DavesDouble.local |
|---|---|
| date | Sun, 19 Nov 2023 04:21:56 -0500 |
| parents | 44c5e6dd9488 |
| children | e44b7c428d7c |
comparison
equal
deleted
inserted
replaced
| 165:8937fb7f2d66 | 166:54c5d80a737e |
|---|---|
| 17 #include <fcntl.h> | 17 #include <fcntl.h> |
| 18 #include <libproc.h> | 18 #include <libproc.h> |
| 19 #include <sys/sysctl.h> | 19 #include <sys/sysctl.h> |
| 20 #include <sys/types.h> | 20 #include <sys/types.h> |
| 21 #include <sys/user.h> | 21 #include <sys/user.h> |
| 22 | |
| 23 #include <iostream> | |
| 24 | 22 |
| 25 namespace animia::internal::xnu { | 23 namespace animia::internal::xnu { |
| 26 | 24 |
| 27 bool XnuFdTools::EnumerateOpenProcesses(process_proc_t process_proc) { | 25 bool XnuFdTools::EnumerateOpenProcesses(process_proc_t process_proc) { |
| 28 size_t pids_size = 512; | 26 size_t pids_size = 512; |
