From e18d598c7eeb7da6a7b727f23b810693fd89ab24 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sun, 2 Mar 2025 22:56:57 +0100 Subject: [PATCH] Remove function to get X11 screen size This is no longer used. --- src/wine-host/editor.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/wine-host/editor.cpp b/src/wine-host/editor.cpp index 7666e51c..42597911 100644 --- a/src/wine-host/editor.cpp +++ b/src/wine-host/editor.cpp @@ -167,11 +167,6 @@ std::optional 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;