summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-02-27 18:09:39 +0100
committer couriersud <couriersud@arcor.de>2015-02-27 18:09:39 +0100
commit218c388088596393c94bcca6257993f65f904bd8 (patch)
treee2b20fa7e3f7cff2ff74ff080917d04489776010
parent50d7d0f8ada64fc65cd1c286894bbd69cc414bb0 (diff)
Fix resizing on windows. (nw)
-rw-r--r--src/osd/sdl/window.c14
-rw-r--r--src/osd/windows/window.c10
2 files changed, 14 insertions, 10 deletions
diff --git a/src/osd/sdl/window.c b/src/osd/sdl/window.c
index b52e81c6d77..65ade6d73ea 100644
--- a/src/osd/sdl/window.c
+++ b/src/osd/sdl/window.c
@@ -1472,17 +1472,17 @@ osd_rect sdl_window_info::constrain_to_aspect_ratio(const osd_rect &rect, int ad
break;
case WMSZ_BOTTOMLEFT:
- ret = rect.move_by(-adjwidth, 0).resize(rect.width(), rect.height() + adjheight);
+ ret = rect.move_by(-adjwidth, 0).resize(rect.width() + adjwidth, rect.height() + adjheight);
break;
case WMSZ_LEFT:
case WMSZ_TOPLEFT:
case WMSZ_TOP:
- ret = rect.move_by(-adjwidth, -adjheight);
+ ret = rect.move_by(-adjwidth, -adjheight).resize(rect.width() + adjwidth, rect.height() + adjheight);
break;
case WMSZ_TOPRIGHT:
- ret = rect.move_by(0, -adjheight).resize(rect.width() + adjwidth, rect.height());
+ ret = rect.move_by(0, -adjheight).resize(rect.width() + adjwidth, rect.height() + adjheight);
break;
}
return ret;
@@ -1499,6 +1499,8 @@ osd_dim sdl_window_info::get_min_bounds(int constrain)
{
INT32 minwidth, minheight;
+ //assert(GetCurrentThreadId() == window_threadid);
+
// get the minimum target size
m_target->compute_minimum_size(minwidth, minheight);
@@ -1548,9 +1550,11 @@ osd_dim sdl_window_info::get_min_bounds(int constrain)
osd_dim sdl_window_info::get_max_bounds(int constrain)
{
- // compute the maximum client area
+ //assert(GetCurrentThreadId() == window_threadid);
- osd_rect maximum = m_monitor->position_size();
+ // compute the maximum client area
+ // m_monitor->refresh();
+ osd_rect maximum = m_monitor->usuable_position_size();
// clamp to the window's max
int tempw = maximum.width();
diff --git a/src/osd/windows/window.c b/src/osd/windows/window.c
index 9790e61d1ef..a53290a9a2c 100644
--- a/src/osd/windows/window.c
+++ b/src/osd/windows/window.c
@@ -1605,17 +1605,17 @@ osd_rect win_window_info::constrain_to_aspect_ratio(const osd_rect &rect, int ad
break;
case WMSZ_BOTTOMLEFT:
- ret = rect.move_by(-adjwidth, 0).resize(rect.width(), rect.height() + adjheight);
+ ret = rect.move_by(-adjwidth, 0).resize(rect.width() + adjwidth, rect.height() + adjheight);
break;
case WMSZ_LEFT:
case WMSZ_TOPLEFT:
case WMSZ_TOP:
- ret = rect.move_by(-adjwidth, -adjheight);
+ ret = rect.move_by(-adjwidth, -adjheight).resize(rect.width() + adjwidth, rect.height() + adjheight);
break;
case WMSZ_TOPRIGHT:
- ret = rect.move_by(0, -adjheight).resize(rect.width() + adjwidth, rect.height());
+ ret = rect.move_by(0, -adjheight).resize(rect.width() + adjwidth, rect.height() + adjheight);
break;
}
return ret;
@@ -1632,7 +1632,7 @@ osd_dim win_window_info::get_min_bounds(int constrain)
{
INT32 minwidth, minheight;
- assert(GetCurrentThreadId() == window_threadid);
+ //assert(GetCurrentThreadId() == window_threadid);
// get the minimum target size
m_target->compute_minimum_size(minwidth, minheight);
@@ -1683,7 +1683,7 @@ osd_dim win_window_info::get_min_bounds(int constrain)
osd_dim win_window_info::get_max_bounds(int constrain)
{
- assert(GetCurrentThreadId() == window_threadid);
+ //assert(GetCurrentThreadId() == window_threadid);
// compute the maximum client area
m_monitor->refresh();