### 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
case Expose: {
				DEBUG_LOG_X11("[%u] Expose window=%lu (%u), count='%u' \n", frame, event.xexpose.window, window_id, event.xexpose.count);
				if (ime_window_event) {
					break;
				}
				windows[window_id].fullscreen = _window_fullscreen_check(window_id);
				Main::force_redraw();
			} break;
			case NoExpose: {
				DEBUG_LOG_X11("[%u] NoExpose drawable=%lu (%u) \n", frame, event.xnoexpose.drawable, window_id);
				if (ime_window_event) {
					break;
				}
				windows[window_id].minimized = true;
			} break;
			case VisibilityNotify: {
				DEBUG_LOG_X11("[%u] VisibilityNotify window=%lu (%u), state=%u \n", frame, event.xvisibility.window, window_id, event.xvisibility.state);
				if (ime_window_event) {
					break;
				}
				windows[window_id].minimized = _window_minimize_check(window_id);
			} break;
			case LeaveNotify: {
				DEBUG_LOG_X11("[%u] LeaveNotify window=%lu (%u), mode='%u' \n", frame, event.xcrossing.window, window_id, event.xcrossing.mode);
				if (ime_window_event) {
					break;
				}
				if (!mouse_mode_grab) {
					_send_window_event(windows[window_id], WINDOW_EVENT_MOUSE_EXIT);
				}