### 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
}
						}
						
						XSetErrorHandler(oldHandler);
					}
				}
			}
			if (clients_data) {
				XFree(clients_data);
			}
		}
	}
	
	if (use_simple_method) {
		
		Atom workarea_prop = XInternAtom(x11_display, "_NET_WORKAREA", True);
		if (workarea_prop != None) {
			unsigned long workarea_len = 0;
			unsigned char *workarea_data = nullptr;
			if (XGetWindowProperty(x11_display, x11_window, workarea_prop, 0, LONG_MAX, False, XA_CARDINAL, &type, &format, &workarea_len, &remaining, &workarea_data) == Success) {
				if ((format == 32) && (workarea_len >= ((desktop_index + 1) * 4)) && workarea_data) {
					long *rect_data = (long *)workarea_data;
					int data_offset = desktop_index * 4;
					Rect2i workarea_rect;
					workarea_rect.position.x = rect_data[data_offset];
					workarea_rect.position.y = rect_data[data_offset + 1];
					workarea_rect.size.x = rect_data[data_offset + 2];
					workarea_rect.size.y = rect_data[data_offset + 3];
					
					if (!is_multiscreen) {