### 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
static const char *target_type = "text/uri-list";
	for (int i = 0; i < p_count; i++) {
		Atom atom = p_list[i];
		if (atom != None && get_atom_name(p_display, atom) == target_type) {
			return atom;
		}
	}
	return None;
}
static Atom pick_target_from_atoms(Display *p_disp, Atom p_t1, Atom p_t2, Atom p_t3) {
	static const char *target_type = "text/uri-list";
	if (p_t1 != None && get_atom_name(p_disp, p_t1) == target_type) {
		return p_t1;
	}
	if (p_t2 != None && get_atom_name(p_disp, p_t2) == target_type) {
		return p_t2;
	}
	if (p_t3 != None && get_atom_name(p_disp, p_t3) == target_type) {
		return p_t3;
	}
	return None;
}
void DisplayServerX11::_get_key_modifier_state(unsigned int p_x11_state, Ref<InputEventWithModifiers> state) {
	state->set_shift_pressed((p_x11_state & ShiftMask));
	state->set_ctrl_pressed((p_x11_state & ControlMask));
	state->set_alt_pressed((p_x11_state & Mod1Mask )); 
	state->set_meta_pressed((p_x11_state & Mod4Mask));
}
BitField<MouseButtonMask> DisplayServerX11::_get_mouse_button_state(MouseButton p_x11_button, int p_x11_type) {