From 8309d279a83f39cc5d767ea18045946c63bfc3bd Mon Sep 17 00:00:00 2001 From: Jerome St-Louis Date: Wed, 7 Aug 2013 03:10:09 -0400 Subject: [PATCH] ecere/gui/MDI System: (#843) Fixed missing buttons opening document maximized from command line - Refinement of 71ebaed351b8fe8ac9ce3b63a396898c8b46efcb, 71be105e220d33e70b1f4e4d9403c93c03bc76c8 --- ecere/src/gui/Window.ec | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ecere/src/gui/Window.ec b/ecere/src/gui/Window.ec index 9b08859..1570be7 100644 --- a/ecere/src/gui/Window.ec +++ b/ecere/src/gui/Window.ec @@ -2197,16 +2197,14 @@ private: Window GetParentMenuBar() { - Window result = this; - bool notActiveClient = false; Window menuBarParent; for(menuBarParent = this; menuBarParent; menuBarParent = menuBarParent.parent) { - if(menuBarParent.menuBar) { result = notActiveClient ? null : menuBarParent.menuBar; break; } - if(menuBarParent.parent && /*menuBarParent != */!menuBarParent.parent.activeClient) - notActiveClient = true; + if(menuBarParent.menuBar) return menuBarParent.menuBar; + if(menuBarParent && !menuBarParent.isActiveClient) + return null; } - return result; + return null; } void CreateSystemChildren(void) -- 1.8.3.1