@@ -915,6 +915,7 @@ bool gfx_ctx_wl_init_common(
915915 wl_display_roundtrip (wl -> input .dpy );
916916 xdg_wm_base_add_listener (wl -> xdg_shell , & xdg_shell_listener , NULL );
917917
918+ #ifndef HAVE_LIBDECOR_H
918919 /* Bind SHM based wl_buffer to wl_surface until the vulkan surface is ready.
919920 * This shows the window which assigns us a display (wl_output)
920921 * which is useful for HiDPI and auto selecting a display for fullscreen. */
@@ -924,23 +925,12 @@ bool gfx_ctx_wl_init_common(
924925 RARCH_ERR ("[Wayland] Failed to draw splash screen.\n" );
925926
926927 /* Make sure splash screen is on screen and sized */
927- #ifdef HAVE_LIBDECOR_H
928- if (wl -> libdecor )
929- {
930- wl -> configured = true;
931- while (wl -> configured )
932- if (wl -> libdecor_dispatch (wl -> libdecor_context , 0 ) < 0 )
933- RARCH_ERR ("[Wayland] libdecor failed to dispatch.\n" );
934- }
935- else
936- #endif
937- {
938- wl -> configured = true;
939-
940- while (wl -> configured )
941- wl_display_dispatch (wl -> input .dpy );
942- }
928+ wl -> configured = true;
929+
930+ while (wl -> configured )
931+ wl_display_dispatch (wl -> input .dpy );
943932 }
933+ #endif
944934
945935 // Ignore configure events until splash screen has been replaced
946936 wl -> ignore_configuration = true;
@@ -1021,12 +1011,19 @@ bool gfx_ctx_wl_set_video_mode_common_fullscreen(gfx_ctx_wayland_data_t *wl,
10211011 struct wl_output * output = NULL ;
10221012 int output_i = 0 ;
10231013
1014+ #ifdef HAVE_LIBDECOR_H
1015+ if (video_monitor_index <= 0 )
1016+ {
1017+ RARCH_LOG ("[Wayland] Auto fullscreen monitor index, letting compositor decide.\n" );
1018+ }
1019+ #else
10241020 if (video_monitor_index <= 0 && wl -> current_output != NULL )
10251021 {
10261022 oi = wl -> current_output ;
10271023 output = oi -> output ;
10281024 RARCH_LOG ("[Wayland] Auto fullscreen on display \"%s\" \"%s\".\n" , oi -> make , oi -> model );
10291025 }
1026+ #endif
10301027 else
10311028 {
10321029 wl_list_for_each (od , & wl -> all_outputs , link )
@@ -1039,10 +1036,10 @@ bool gfx_ctx_wl_set_video_mode_common_fullscreen(gfx_ctx_wayland_data_t *wl,
10391036 break ;
10401037 }
10411038 };
1042- }
10431039
1044- if (!output )
1045- RARCH_LOG ("[Wayland] Failed to specify monitor for fullscreen, letting compositor decide.\n" );
1040+ if (!output )
1041+ RARCH_LOG ("[Wayland] Failed to specify monitor for fullscreen, letting compositor decide.\n" );
1042+ }
10461043
10471044#ifdef HAVE_LIBDECOR_H
10481045 if (wl -> libdecor )
0 commit comments