@@ -779,6 +779,7 @@ func getScreenByIndex(display *C.struct__GdkDisplay, index int) *Screen {
779
779
Height : int (geometry .height ),
780
780
Width : int (geometry .width ),
781
781
},
782
+ Rotation : 0.0 ,
782
783
}
783
784
}
784
785
@@ -852,16 +853,29 @@ func getMousePosition() (int, int, *Screen) {
852
853
C .gdk_monitor_get_geometry (monitor , & geometry )
853
854
scaleFactor := int (C .gdk_monitor_get_scale_factor (monitor ))
854
855
return int (x ), int (y ), & Screen {
855
- ID : fmt .Sprintf ("%d" , 0 ), // A unique identifier for the display
856
- Name : C .GoString (C .gdk_monitor_get_model (monitor )), // The name of the display
857
- ScaleFactor : float32 (scaleFactor ), // The scale factor of the display
858
- X : int (geometry .x ), // The x-coordinate of the top-left corner of the rectangle
859
- Y : int (geometry .y ), // The y-coordinate of the top-left corner of the rectangle
860
- Size : Size {Width : int (geometry .width ), Height : int (geometry .height )}, // The size of the display
861
- Bounds : Rect {}, // The bounds of the display
862
- WorkArea : Rect {}, // The work area of the display
863
- IsPrimary : false , // Whether this is the primary display
864
- Rotation : 0.0 , // The rotation of the display
856
+ ID : fmt .Sprintf ("%d" , 0 ), // A unique identifier for the display
857
+ Name : C .GoString (C .gdk_monitor_get_model (monitor )), // The name of the display
858
+ ScaleFactor : float32 (scaleFactor ), // The scale factor of the display
859
+ X : int (geometry .x ), // The x-coordinate of the top-left corner of the rectangle
860
+ Y : int (geometry .y ), // The y-coordinate of the top-left corner of the rectangle
861
+ Size : Size {
862
+ Height : int (geometry .height ),
863
+ Width : int (geometry .width ),
864
+ },
865
+ Bounds : Rect {
866
+ X : int (geometry .x ),
867
+ Y : int (geometry .y ),
868
+ Height : int (geometry .height ),
869
+ Width : int (geometry .width ),
870
+ },
871
+ WorkArea : Rect {
872
+ X : int (geometry .x ),
873
+ Y : int (geometry .y ),
874
+ Height : int (geometry .height ),
875
+ Width : int (geometry .width ),
876
+ },
877
+ IsPrimary : false ,
878
+ Rotation : 0.0 ,
865
879
}
866
880
}
867
881
@@ -905,16 +919,41 @@ func (w *linuxWebviewWindow) getScreen() (*Screen, error) {
905
919
name := C .gdk_monitor_get_model (monitor )
906
920
mx , my , width , height , scaleFactor := w .getCurrentMonitorGeometry ()
907
921
return & Screen {
908
- ID : fmt .Sprintf ("%d" , w .id ), // A unique identifier for the display
909
- Name : C .GoString (name ), // The name of the display
910
- ScaleFactor : float32 (scaleFactor ), // The scale factor of the display
911
- X : mx , // The x-coordinate of the top-left corner of the rectangle
912
- Y : my , // The y-coordinate of the top-left corner of the rectangle
913
- Size : Size {Width : width , Height : height }, // The size of the display
914
- Bounds : Rect {}, // The bounds of the display
915
- WorkArea : Rect {}, // The work area of the display
916
- IsPrimary : false , // Whether this is the primary display
917
- Rotation : 0.0 , // The rotation of the display
922
+ ID : fmt .Sprintf ("%d" , w .id ), // A unique identifier for the display
923
+ Name : C .GoString (name ), // The name of the display
924
+ ScaleFactor : float32 (scaleFactor ), // The scale factor of the display
925
+ X : mx , // The x-coordinate of the top-left corner of the rectangle
926
+ Y : my , // The y-coordinate of the top-left corner of the rectangle
927
+ Size : Size {
928
+ Height : int (height ),
929
+ Width : int (width ),
930
+ },
931
+ Bounds : Rect {
932
+ X : int (mx ),
933
+ Y : int (my ),
934
+ Height : int (height ),
935
+ Width : int (width ),
936
+ },
937
+ WorkArea : Rect {
938
+ X : int (mx ),
939
+ Y : int (my ),
940
+ Height : int (height ),
941
+ Width : int (width ),
942
+ },
943
+ PhysicalBounds : Rect {
944
+ X : int (mx ),
945
+ Y : int (my ),
946
+ Height : int (height ),
947
+ Width : int (width ),
948
+ },
949
+ PhysicalWorkArea : Rect {
950
+ X : int (mx ),
951
+ Y : int (my ),
952
+ Height : int (height ),
953
+ Width : int (width ),
954
+ },
955
+ IsPrimary : false ,
956
+ Rotation : 0.0 ,
918
957
}, nil
919
958
}
920
959
0 commit comments