File tree Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Expand file tree Collapse file tree 1 file changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -71,9 +71,8 @@ export const appRoute = {
71
71
// FIXME: this is a electron bug, see https://github.com/RSSNext/Follow/issues/231
72
72
// So in this way we use a workaround to fix it, that is manually resize the window
73
73
if ( isWindows11 ) {
74
- const size = screen . getDisplayMatching (
75
- window . getBounds ( ) ,
76
- ) . workAreaSize
74
+ const display = screen . getDisplayMatching ( window . getBounds ( ) )
75
+ const size = display . workAreaSize
77
76
78
77
const isMaximized = size . height === window . getSize ( ) [ 1 ]
79
78
@@ -85,8 +84,12 @@ export const appRoute = {
85
84
window . setResizable ( true )
86
85
window . setMovable ( true )
87
86
88
- window . setSize ( stored . size [ 0 ] , stored . size [ 1 ] )
89
- window . setPosition ( stored . position [ 0 ] , stored . position [ 1 ] )
87
+ window . setBounds ( {
88
+ width : stored . size [ 0 ] ,
89
+ height : stored . size [ 1 ] ,
90
+ x : stored . position [ 0 ] ,
91
+ y : stored . position [ 1 ] ,
92
+ } , true )
90
93
91
94
delete window [ storeKey ]
92
95
} else {
@@ -98,8 +101,14 @@ export const appRoute = {
98
101
}
99
102
100
103
// Maually Resize
101
- window . setSize ( size . width , size . height )
102
- window . setPosition ( 0 , 0 )
104
+ const { workArea } = display
105
+
106
+ window . setBounds ( {
107
+ x : workArea . x ,
108
+ y : workArea . y ,
109
+ width : workArea . width ,
110
+ height : workArea . height ,
111
+ } , true )
103
112
104
113
window . setResizable ( false )
105
114
window . setMovable ( false )
You can’t perform that action at this time.
0 commit comments