diff dynamin/gui/window.d @ 68:6580fabb7dce

Setting a property to the value it already is shouldn't do anything
author Jordan Miner <jminer7@gmail.com>
date Mon, 10 Aug 2009 02:48:15 -0500
parents 419e38206522
children b5460ba7c93e
line wrap: on
line diff
--- a/dynamin/gui/window.d	Mon Aug 10 02:46:42 2009 -0500
+++ b/dynamin/gui/window.d	Mon Aug 10 02:48:15 2009 -0500
@@ -397,6 +397,8 @@
 	//       the taskbar, then show it on taskbar if window has an owner,
 	//       but don't if it does not
 	void owner(Window w) {
+		if(_owner == w)
+			return;
 		_owner = w;
 		if(!handleCreated)
 			return;
@@ -410,6 +412,8 @@
 	bool visible() { return _visible; }
 	/// ditto
 	void visible(bool b) {
+		if(_visible == b)
+			return;
 		_visible = b;
 		backend_visible = b;
 
@@ -450,6 +454,8 @@
 	WindowBorderStyle borderStyle() { return _borderStyle; }
 	/// ditto
 	void borderStyle(WindowBorderStyle border) {
+		if(_borderStyle == border)
+			return;
 		if(border > WindowBorderStyle.Tool)
 			throw new IllegalArgumentException("Window.borderStyle(): invalid border style");
 		_borderStyle = border;
@@ -495,6 +501,8 @@
 	bool resizable() { return _resizable; }
 	/// ditto
 	void resizable(bool b) {
+		if(_resizable == b)
+			return;
 		_resizable = b;
 		if(!handleCreated)
 			return;