### Godot version

Latest 4.0.dev (a3a42159e31db27f8ae7c1ecad6a9ed417cb05de)

### System information

Ubuntu 22.04.1 LTS

### Issue description

Ctrl+Shift+F (Find in Files) in the text editor, for example, causes my laptop to freeze consistently. I also reproduced it with F1 and Ctrl+Shift+R, as well as by using the dropdown instead of shortcuts.

### Steps to reproduce

Trivial

### Minimal reproduction project

N/A
if (rect.grow(-1).intersects(workarea_rect)) {
								rect = rect.intersection(workarea_rect);
								XFree(workarea_data);
								return rect;
							}
						}
					}
				}
				if (workarea_data) {
					XFree(workarea_data);
				}
			}
		}
		
		Atom client_list_prop = XInternAtom(x11_display, "_NET_CLIENT_LIST", True);
		if (client_list_prop != None) {
			unsigned long clients_len = 0;
			unsigned char *clients_data = nullptr;
			if (XGetWindowProperty(x11_display, x11_window, client_list_prop, 0, LONG_MAX, False, XA_WINDOW, &type, &format, &clients_len, &remaining, &clients_data) == Success) {
				if ((format == 32) && (clients_len > 0) && clients_data) {
					Window *windows_data = (Window *)clients_data;
					Rect2i desktop_rect;
					bool desktop_valid = false;
					
					{
						Atom desktop_geometry_prop = XInternAtom(x11_display, "_NET_DESKTOP_GEOMETRY", True);
						if (desktop_geometry_prop != None) {
							unsigned long geom_len = 0;
							unsigned char *geom_data = nullptr;