The geometry output of vo_calc_window_geometry does not have any information about the current window position. This causes the window to move when setting geometry even without setting x/y. Change it so that the window position is unchanged if x/y are not set and after startup.
Unified · Split
| @@ -1944,8 +1944,13 @@ static void window_reconfig(struct vo_w32_state *w32, bool force) · 1943 unmodified lines | |||
| 1944 | w32->o_dheight = vo->dheight; | 1944 | w32->o_dheight = vo->dheight; |
| 1945 | 1945 | ||
| 1946 | if (!w32->parent && (!w32->window_bounds_initialized || force)) { | 1946 | if (!w32->parent && (!w32->window_bounds_initialized || force)) { |
| 1947 | SetRect(&w32->windowrc, geo.win.x0, geo.win.y0, | 1947 | int x0 = geo.win.x0; |
| 1948 | geo.win.x0 + vo->dwidth, geo.win.y0 + vo->dheight); | 1948 | int y0 = geo.win.y0; |
| 1949 | if (!w32->opts->geometry.xy_valid && w32->window_bounds_initialized) { | ||
| 1950 | x0 = w32->windowrc.left; | ||
| 1951 | y0 = w32->windowrc.top; | ||
| 1952 | } | ||
| 1953 | SetRect(&w32->windowrc, x0, y0, x0 + vo->dwidth, y0 + vo->dheight); | ||
| 1949 | w32->prev_windowrc = w32->windowrc; | 1954 | w32->prev_windowrc = w32->windowrc; |
| 1950 | w32->window_bounds_initialized = true; | 1955 | w32->window_bounds_initialized = true; |
| 1951 | w32->win_force_pos = geo.flags & VO_WIN_FORCE_POS; | 1956 | w32->win_force_pos = geo.flags & VO_WIN_FORCE_POS; |