RECT amigawin_rect, mainwin_rect;
RECT amigawinclip_rect;
int window_extra_width, window_extra_height;
+ int window_extra_height_bar;
int win_x_diff, win_y_diff;
int setcursoroffset_x, setcursoroffset_y;
int mouseposx, mouseposy;
int ratio_width, ratio_height;
int ratio_adjust_x, ratio_adjust_y;
bool ratio_sizing;
- int prevsbheight;
bool render_ok, wait_render;
int in_sizemove;
LPMINMAXINFO lpmmi;
lpmmi = (LPMINMAXINFO)lParam;
lpmmi->ptMinTrackSize.x = 160 + mon->window_extra_width;
- lpmmi->ptMinTrackSize.y = 128 + mon->window_extra_height;
+ lpmmi->ptMinTrackSize.y = 128 + mon->window_extra_height + mon->window_extra_height_bar;
lpmmi->ptMaxTrackSize.x = max_uae_width + mon->window_extra_width;
- lpmmi->ptMaxTrackSize.y = max_uae_height + mon->window_extra_height;
+ lpmmi->ptMaxTrackSize.y = max_uae_height + mon->window_extra_height + mon->window_extra_height_bar;
}
return 0;
int w = mon->mainwin_rect.right - mon->mainwin_rect.left;
int h = mon->mainwin_rect.bottom - mon->mainwin_rect.top;
if (w != changed_prefs.gfx_monitor[mon->monitor_id].gfx_size_win.width + mon->window_extra_width ||
- h != changed_prefs.gfx_monitor[mon->monitor_id].gfx_size_win.height + mon->window_extra_height) {
+ h != changed_prefs.gfx_monitor[mon->monitor_id].gfx_size_win.height + mon->window_extra_height + mon->window_extra_height_bar) {
changed_prefs.gfx_monitor[mon->monitor_id].gfx_size_win.width = w - mon->window_extra_width;
- changed_prefs.gfx_monitor[mon->monitor_id].gfx_size_win.height = h - mon->window_extra_height;
+ changed_prefs.gfx_monitor[mon->monitor_id].gfx_size_win.height = h - (mon->window_extra_height + mon->window_extra_height_bar);
set_config_changed();
}
}
if (!h)
return def;
wi.cbSize = sizeof wi;
- if (GetWindowInfo (h, &wi))
+ if (GetWindowInfo(h, &wi)) {
+ int dpi = getdpiforwindow(h);
def = wi.rcWindow.bottom - wi.rcWindow.top;
+ def = def * dpi / 96;
+ }
DestroyWindow(h);
return def;
}
else
ny = rc.top + (rc.bottom - rc.top - nh);
}
- if (w != nw || h != nh || x != nx || y != ny || sbheight != mon->prevsbheight) {
+ if (w != nw || h != nh || x != nx || y != ny || sbheight != mon->window_extra_height_bar) {
w = nw;
h = nh;
x = nx;
y = ny;
+ mon->window_extra_height_bar = sbheight;
mon->in_sizemove++;
- if (mon->hMainWnd && !fsw && !dxfs && !d3dfs && !rp_isactive ()) {
- mon->window_extra_height += (sbheight - mon->prevsbheight);
+ if (mon->hMainWnd && !fsw && !dxfs && !d3dfs && !rp_isactive()) {
GetWindowRect(mon->hMainWnd, &r);
x = r.left;
y = r.top;
- SetWindowPos(mon->hMainWnd, HWND_TOP, x, y, w + mon->window_extra_width, h + mon->window_extra_height,
+ SetWindowPos(mon->hMainWnd, HWND_TOP, x, y, w + mon->window_extra_width, h + mon->window_extra_height + mon->window_extra_height_bar,
SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSENDCHANGING | SWP_NOZORDER);
x = gap;
y = gap;
mon->amigawin_rect.left, mon->amigawin_rect.top, mon->amigawin_rect.right - mon->amigawin_rect.left, mon->amigawin_rect.bottom - mon->amigawin_rect.top);
updatemouseclip(mon);
rp_screenmode_changed ();
- mon->prevsbheight = sbheight;
return 1;
}
rc.bottom -= sbheight;
rc.bottom += sbheight2;
sbheight = sbheight2;
+ DestroyWindow(mon->hMainWnd);
+ mon->hMainWnd = NULL;
continue;
}
}
break;
}
GetWindowRect(mon->hMainWnd, &rc2);
- mon->window_extra_width = rc2.right - rc2.left - mon->currentmode.current_width;
- mon->window_extra_height = rc2.bottom - rc2.top - mon->currentmode.current_height;
+ mon->window_extra_width = (rc2.right - rc2.left) - mon->currentmode.current_width;
+ mon->window_extra_height = (rc2.bottom - rc2.top) - mon->currentmode.current_height;
+ mon->window_extra_height -= sbheight;
+ mon->window_extra_height_bar = sbheight;
createstatuswindow(mon);
createstatusline(mon->monitor_id);
} else {
if (dxfs || d3dfs)
movecursor (x + w / 2, y + h / 2);
addnotifications (mon->hAmigaWnd, FALSE, FALSE);
- mon->prevsbheight = sbheight;
+ mon->window_extra_height_bar = sbheight;
if (mon->monitor_id) {
ShowWindow(mon->hMainWnd, SW_SHOWNOACTIVATE);