From e66be3db454190178c8964459ec0b5b20df0b940 Mon Sep 17 00:00:00 2001 From: Lorenz Cuno Klopfenstein Date: Mon, 21 Oct 2013 09:55:01 +0200 Subject: [PATCH] Issue #43: fixed command line override for "restore last window" feature. --- OnTopReplica/StartupOptions/Factory.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/OnTopReplica/StartupOptions/Factory.cs b/OnTopReplica/StartupOptions/Factory.cs index cfb3401..f62ad6c 100644 --- a/OnTopReplica/StartupOptions/Factory.cs +++ b/OnTopReplica/StartupOptions/Factory.cs @@ -67,11 +67,17 @@ namespace OnTopReplica.StartupOptions { var cmdOptions = new NDesk.Options.OptionSet() .Add("windowId=", "Window handle ({HWND}) to be cloned.", id => { options.WindowId = new IntPtr(id); + options.WindowTitle = null; + options.WindowClass = null; }) .Add("windowTitle=", "Partial {TITLE} of the window to be cloned.", s => { + options.WindowId = null; options.WindowTitle = s; + options.WindowClass = null; }) .Add("windowClass=", "{CLASS} of the window to be cloned.", s => { + options.WindowId = null; + options.WindowTitle = null; options.WindowClass = s; }) .Add("v|visible", "If set, only clones windows that are visible.", s => {