diff options
Diffstat (limited to 'src/app.c')
-rw-r--r-- | src/app.c | 18 |
1 files changed, 4 insertions, 14 deletions
@@ -142,25 +142,15 @@ static iString *serializePrefs_App_(const iApp *d) { | |||
142 | y = d->window->lastRect.pos.y; | 142 | y = d->window->lastRect.pos.y; |
143 | w = d->window->lastRect.size.x; | 143 | w = d->window->lastRect.size.x; |
144 | h = d->window->lastRect.size.y; | 144 | h = d->window->lastRect.size.y; |
145 | #if 0 | ||
146 | SDL_GetWindowSize(d->window->win, &w, &h); | ||
147 | SDL_GetWindowPosition(d->window->win, &x, &y); | ||
148 | #i f defined (iPlatformLinux) | ||
149 | /* Workaround for window position being unaffected by decorations on creation. */ { | ||
150 | int bl, bt; | ||
151 | SDL_GetWindowBordersSize(d->window->win, &bt, &bl, NULL, NULL); | ||
152 | x -= bl; | ||
153 | y -= bt; | ||
154 | x = iMax(0, x); | ||
155 | y = iMax(0, y); | ||
156 | } | ||
157 | } | ||
158 | #endif | ||
159 | appendFormat_String(str, "window.setrect width:%d height:%d coord:%d %d\n", w, h, x, y); | 145 | appendFormat_String(str, "window.setrect width:%d height:%d coord:%d %d\n", w, h, x, y); |
160 | appendFormat_String(str, "sidebar.width arg:%d\n", width_SidebarWidget(sidebar)); | 146 | appendFormat_String(str, "sidebar.width arg:%d\n", width_SidebarWidget(sidebar)); |
147 | /* On macOS, maximization should be applied at creation time or the window will take | ||
148 | a moment to animate to its maximized size. */ | ||
149 | #if !defined (iPlatformApple) | ||
161 | if (isMaximized) { | 150 | if (isMaximized) { |
162 | appendFormat_String(str, "~window.maximize\n"); | 151 | appendFormat_String(str, "~window.maximize\n"); |
163 | } | 152 | } |
153 | #endif | ||
164 | } | 154 | } |
165 | if (isVisible_Widget(sidebar)) { | 155 | if (isVisible_Widget(sidebar)) { |
166 | appendCStr_String(str, "sidebar.toggle\n"); | 156 | appendCStr_String(str, "sidebar.toggle\n"); |