Mercurial > minori
comparison dep/animone/src/win/x11.cc @ 280:9b6e12c14a1e
chore: merge
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Mon, 06 May 2024 17:23:30 -0400 |
| parents | c41c14ff8c67 |
| children | 969a3e8c79c5 |
comparison
equal
deleted
inserted
replaced
| 279:657fda1b9cac | 280:9b6e12c14a1e |
|---|---|
| 9 #include <climits> | 9 #include <climits> |
| 10 #include <cstdint> | 10 #include <cstdint> |
| 11 #include <cstring> | 11 #include <cstring> |
| 12 #include <set> | 12 #include <set> |
| 13 #include <string> | 13 #include <string> |
| 14 #include <memory> | |
| 14 | 15 |
| 15 #include <chrono> | 16 #include <chrono> |
| 16 | 17 |
| 17 #include <iostream> | 18 #include <iostream> |
| 18 | 19 |
| 154 bool EnumerateWindows(window_proc_t window_proc) { | 155 bool EnumerateWindows(window_proc_t window_proc) { |
| 155 if (!window_proc) | 156 if (!window_proc) |
| 156 return false; | 157 return false; |
| 157 | 158 |
| 158 xcb_connection_t* connection = ::xcb_connect(NULL, NULL); | 159 xcb_connection_t* connection = ::xcb_connect(NULL, NULL); |
| 159 if (!connection) | 160 if (xcb_connection_has_error(connection)) |
| 160 return false; | 161 return false; |
| 161 | 162 |
| 162 std::set<xcb_window_t> windows; | 163 std::set<xcb_window_t> windows; |
| 163 { | 164 { |
| 164 std::vector<xcb_window_t> roots; | 165 std::vector<xcb_window_t> roots; |
