patch1036.diff
src/qtui/main_window.cc | ||
---|---|---|
210 | 210 |
* place, but user screenshots show that it somehow happens, and in |
211 | 211 |
* that case we don't want them to be gone forever. */ |
212 | 212 |
toolbar->show(); |
213 |
int dock_count = 0; |
|
213 | 214 |
for (auto w : findChildren<DockWidget *>()) |
215 |
{ |
|
214 | 216 |
w->show(); |
217 |
++dock_count; |
|
218 |
} |
|
215 | 219 | |
216 | 220 |
/* set initial keyboard focus on the playlist */ |
217 | 221 |
m_playlist_tabs->currentPlaylistWidget()->setFocus(Qt::OtherFocusReason); |
222 | ||
223 |
/* handle restoring window geometry: some older Qt versions fail to account for window-manager decorations: */ |
|
224 |
int x = aud_get_int ("qtui", "player_x"); |
|
225 |
int y = aud_get_int ("qtui", "player_y"); |
|
226 |
if (y <= 0) |
|
227 |
y = 25; /* make sure the window titlebar (which usually allows user to move) isn't off the screen: */ |
|
228 | ||
229 |
if (dock_count > 0) |
|
230 |
this->move (x, y); |
|
218 | 231 |
} |
219 | 232 | |
220 | 233 |
MainWindow::~MainWindow() |
... | ... | |
223 | 236 |
settings.setValue("geometry", saveGeometry()); |
224 | 237 |
settings.setValue("windowState", saveState()); |
225 | 238 | |
239 |
/* handle saving window geometry: some older Qt versions fail to account for window-manager decorations: */ |
|
240 |
aud_set_int ("qtui", "player_x", this->geometry().x()); |
|
241 |
aud_set_int ("qtui", "player_y", this->geometry().y()); |
|
242 | ||
226 | 243 |
audqt::unregister_dock_host(); |
227 | 244 | |
228 | 245 |
if (m_search_tool) |