File tree 1 file changed +36
-4
lines changed
1 file changed +36
-4
lines changed Original file line number Diff line number Diff line change @@ -594,9 +594,25 @@ pub struct WindowDescriptor {
594
594
pub resize_constraints : WindowResizeConstraints ,
595
595
pub scale_factor_override : Option < f64 > ,
596
596
pub title : String ,
597
- #[ cfg( any( feature = "x11" , feature = "wayland" ) ) ]
597
+ #[ cfg( all(
598
+ any(
599
+ target_os = "linux" ,
600
+ target_os = "freebsd" ,
601
+ target_os = "netbsd" ,
602
+ target_os = "openbsd"
603
+ ) ,
604
+ any( feature = "x11" , feature = "wayland" )
605
+ ) ) ]
598
606
pub desktop_id : String ,
599
- #[ cfg( feature = "x11" ) ]
607
+ #[ cfg( all(
608
+ any(
609
+ target_os = "linux" ,
610
+ target_os = "freebsd" ,
611
+ target_os = "netbsd" ,
612
+ target_os = "openbsd"
613
+ ) ,
614
+ feature = "x11"
615
+ ) ) ]
600
616
pub desktop_instance : String ,
601
617
#[ doc( alias = "vsync" ) ]
602
618
pub present_mode : PresentMode ,
@@ -621,9 +637,25 @@ impl Default for WindowDescriptor {
621
637
fn default ( ) -> Self {
622
638
WindowDescriptor {
623
639
title : "app" . to_string ( ) ,
624
- #[ cfg( any( feature = "x11" , feature = "wayland" ) ) ]
640
+ #[ cfg( all(
641
+ any(
642
+ target_os = "linux" ,
643
+ target_os = "freebsd" ,
644
+ target_os = "netbsd" ,
645
+ target_os = "openbsd"
646
+ ) ,
647
+ any( feature = "x11" , feature = "wayland" )
648
+ ) ) ]
625
649
desktop_id : "app" . to_string ( ) ,
626
- #[ cfg( feature = "x11" ) ]
650
+ #[ cfg( all(
651
+ any(
652
+ target_os = "linux" ,
653
+ target_os = "freebsd" ,
654
+ target_os = "netbsd" ,
655
+ target_os = "openbsd"
656
+ ) ,
657
+ feature = "x11"
658
+ ) ) ]
627
659
desktop_instance : "Main" . to_string ( ) ,
628
660
width : 1280. ,
629
661
height : 720. ,
You can’t perform that action at this time.
0 commit comments