(svn r1613) -Fix: WE_CLICK event is not called on default actions. If special action is needed, use the other events like WE_RESIZE or WE_DESTROY, etc.
authordarkvater
Sun, 23 Jan 2005 13:42:26 +0000
changeset 1112 d8503ef77898
parent 1111 6f4d8544e70b
child 1113 da5c5c571541
(svn r1613) -Fix: WE_CLICK event is not called on default actions. If special action is needed, use the other events like WE_RESIZE or WE_DESTROY, etc.
window.c
--- a/window.c	Sun Jan 23 13:30:02 2005 +0000
+++ b/window.c	Sun Jan 23 13:42:26 2005 +0000
@@ -54,17 +54,22 @@
 				return;
 			}
 
-			if (e.click.widget == 1) /* 'Title bar' */
-				StartWindowDrag(w);
+			if (e.click.widget == 1) { /* 'Title bar' */
+				StartWindowDrag(w); // if not return then w = StartWindowDrag(w); to get correct pointer
+				return;
+			}
 		}
 
-		if (w->desc_flags & WDF_RESIZABLE && wi->type == WWT_RESIZEBOX)
-			w = StartWindowSizing(w);
+		if (w->desc_flags & WDF_RESIZABLE && wi->type == WWT_RESIZEBOX) {
+			StartWindowSizing(w); // if not return then w = StartWindowSizing(w); to get correct pointer
+			return;
+		}
 
 		if (w->desc_flags & WDF_STICKY_BUTTON && wi->type == WWT_STICKYBOX) {
 			TOGGLEBIT(w->click_state, e.click.widget);
 			w->flags4 ^= WF_STICKY;
 			InvalidateWidget(w, e.click.widget);
+			return;
 		}
 	}