소스 검색

Wayland: Fix error condition in window_get_current_screen

Leftover from when the Wayland backend was single-window only.
Dery Almas 2 달 전
부모
커밋
98537b2e0c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      platform/linuxbsd/wayland/display_server_wayland.cpp

+ 1 - 1
platform/linuxbsd/wayland/display_server_wayland.cpp

@@ -1049,7 +1049,7 @@ void DisplayServerWayland::window_set_drop_files_callback(const Callable &p_call
 }
 }
 
 
 int DisplayServerWayland::window_get_current_screen(DisplayServer::WindowID p_window_id) const {
 int DisplayServerWayland::window_get_current_screen(DisplayServer::WindowID p_window_id) const {
-	ERR_FAIL_COND_V(p_window_id != MAIN_WINDOW_ID, INVALID_SCREEN);
+	ERR_FAIL_COND_V(!windows.has(p_window_id), INVALID_SCREEN);
 	// Standard Wayland APIs don't support getting the screen of a window.
 	// Standard Wayland APIs don't support getting the screen of a window.
 	return 0;
 	return 0;
 }
 }