← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/do_not_update_size_when_minimized into lp:widelands

 

SirVer has proposed merging lp:~widelands-dev/widelands/do_not_update_size_when_minimized into lp:widelands.

Commit message:
Windows should not update their size when minimized, but instead when they get restored.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1289943 in widelands: "minimized construction window contents get leaked out"
  https://bugs.launchpad.net/widelands/+bug/1289943

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/do_not_update_size_when_minimized/+merge/285277
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/do_not_update_size_when_minimized into lp:widelands.
=== modified file 'src/ui_basic/window.cc'
--- src/ui_basic/window.cc	2016-01-31 21:03:15 +0000
+++ src/ui_basic/window.cc	2016-02-06 19:35:23 +0000
@@ -131,7 +131,7 @@
  */
 void Window::update_desired_size()
 {
-	if (m_center_panel) {
+	if (m_center_panel && !_is_minimal) {
 		int innerw, innerh;
 		m_center_panel->get_desired_size(&innerw, &innerh);
 		set_desired_size
@@ -488,6 +488,7 @@
 		(get_lborder(), get_rborder(),
 		 get_tborder(), BT_B_PIXMAP_THICKNESS);
 	set_inner_size(get_inner_w(), _oldh);
+	update_desired_size();
 	move_inside_parent();
 }
 void Window::minimize() {


Follow ups