mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-06 19:40:10 +02:00
Remove function to get X11 screen size
This is no longer used.
This commit is contained in:
@@ -167,11 +167,6 @@ std::optional<xcb_window_t> find_host_window(xcb_connection_t& x11_connection,
|
||||
bool is_child_window_or_same(xcb_connection_t& x11_connection,
|
||||
xcb_window_t child,
|
||||
xcb_window_t parent);
|
||||
/**
|
||||
* Compute the size a window would have to be to be allowed to fullscreened on
|
||||
* any of the connected screens.
|
||||
*/
|
||||
Size get_maximum_screen_dimensions(xcb_connection_t& x11_connection) noexcept;
|
||||
/**
|
||||
* Get the root window for the specified window. The returned root window will
|
||||
* depend on the screen the window is on.
|
||||
@@ -1231,27 +1226,6 @@ xcb_atom_t get_atom_by_name(xcb_connection_t& x11_connection,
|
||||
return atom_reply->atom;
|
||||
}
|
||||
|
||||
Size get_maximum_screen_dimensions(xcb_connection_t& x11_connection) noexcept {
|
||||
xcb_screen_iterator_t iter =
|
||||
xcb_setup_roots_iterator(xcb_get_setup(&x11_connection));
|
||||
|
||||
// Find the maximum dimensions the window would have to be to be able to be
|
||||
// fullscreened on any screen, disregarding the possibility that someone
|
||||
// would try to stretch the window accross all displays (because who would
|
||||
// do such a thing?)
|
||||
Size maximum_screen_size{};
|
||||
while (iter.rem > 0) {
|
||||
maximum_screen_size.width =
|
||||
std::max(maximum_screen_size.width, iter.data->width_in_pixels);
|
||||
maximum_screen_size.height =
|
||||
std::max(maximum_screen_size.height, iter.data->height_in_pixels);
|
||||
|
||||
xcb_screen_next(&iter);
|
||||
}
|
||||
|
||||
return maximum_screen_size;
|
||||
}
|
||||
|
||||
xcb_window_t get_root_window(xcb_connection_t& x11_connection,
|
||||
xcb_window_t window) {
|
||||
xcb_generic_error_t* error = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user