### 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
0, 0, 
				0, 
				AnyPropertyType, 
				&type, 
				&format, 
				&len, &bytes_left, 
				&data);
		if (data) {
			XFree(data);
		}
		if (type == XInternAtom(x11_display, "INCR", 0)) {
			
			DEBUG_LOG_X11("INCR selection started.\n");
			LocalVector<uint8_t> incr_data;
			uint32_t data_size = 0;
			bool success = false;
			
			XDeleteProperty(x11_display, x11_window, type);
			
			bool done = false;
			while (!done) {
				if (!_wait_for_events()) {
					
					break;
				}
				
				XEvent ev;
				while (XCheckIfEvent(x11_display, &ev, _predicate_clipboard_incr, nullptr)) {
					result = XGetWindowProperty(x11_display, x11_window,
							selection,