### 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 (XGetICValues(wd.xic, XNFilterEvents, &im_event_mask, nullptr) != nullptr) {
				WARN_PRINT("XGetICValues couldn't obtain XNFilterEvents value");
				XDestroyIC(wd.xic);
				wd.xic = nullptr;
			}
			if (wd.xic) {
				XUnsetICFocus(wd.xic);
			} else {
				WARN_PRINT("XCreateIC couldn't create wd.xic");
			}
		} else {
			wd.xic = nullptr;
			WARN_PRINT("XCreateIC couldn't create wd.xic");
		}
		_update_context(wd);
		if (p_flags & WINDOW_FLAG_BORDERLESS_BIT) {
			Hints hints;
			Atom property;
			hints.flags = 2;
			hints.decorations = 0;
			property = XInternAtom(x11_display, "_MOTIF_WM_HINTS", True);
			if (property != None) {
				XChangeProperty(x11_display, wd.x11_window, property, property, 32, PropModeReplace, (unsigned char *)&hints, 5);
			}
		}
		if (wd.is_popup || wd.no_focus) {
			
			Atom type_atom = XInternAtom(x11_display, "_NET_WM_WINDOW_TYPE_UTILITY", False);
			Atom wt_atom = XInternAtom(x11_display, "_NET_WM_WINDOW_TYPE", False);