From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kalle Olavi Niemitalo Newsgroups: gmane.emacs.devel Subject: Re: A DOS box starting Emacs (w32) Date: Wed, 12 Feb 2014 07:06:32 +0200 Message-ID: <87lhxg9axz.fsf@Niukka.kon.iki.fi> References: <52FAA9DA.3030302@alice.it> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1392205185 8838 80.91.229.3 (12 Feb 2014 11:39:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 12 Feb 2014 11:39:45 +0000 (UTC) Keywords: MS-Windows, runemacs, System.AppUserModel.RelaunchCommand, SHGetPropertyStoreForWindow Cc: Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 12 12:39:52 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WDYAS-0001ab-A0 for ged-emacs-devel@m.gmane.org; Wed, 12 Feb 2014 12:39:52 +0100 Original-Received: from localhost ([::1]:38454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDYAR-0004VW-Ln for ged-emacs-devel@m.gmane.org; Wed, 12 Feb 2014 06:39:51 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDS0c-0005oa-Bw for emacs-devel@gnu.org; Wed, 12 Feb 2014 00:05:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WDS0R-0006GL-Uc for emacs-devel@gnu.org; Wed, 12 Feb 2014 00:05:18 -0500 Original-Received: from tulikuusama.dnainternet.net ([83.102.40.132]:48365) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WDS0R-0005xi-Nw for emacs-devel@gnu.org; Wed, 12 Feb 2014 00:05:07 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by tulikuusama.dnainternet.net (Postfix) with ESMTP id 2787340512; Wed, 12 Feb 2014 07:04:59 +0200 (EET) X-Virus-Scanned: DNA Postiturva at dnainternet.net Original-Received: from tulikuusama.dnainternet.net ([83.102.40.132]) by localhost (tulikuusama.dnainternet.net [127.0.0.1]) (DNA Postiturva, port 10041) with ESMTP id 6f1ijd7EmVwS; Wed, 12 Feb 2014 07:04:58 +0200 (EET) Original-Received: from omenapuu.dnainternet.net (omenapuu.dnainternet.net [83.102.40.212]) by tulikuusama.dnainternet.net (Postfix) with ESMTP id C58D540241; Wed, 12 Feb 2014 07:04:58 +0200 (EET) Original-Received: from Niukka.Niemitalo.private (85-23-27-133.bb.dnainternet.fi [85.23.27.133]) by omenapuu.dnainternet.net (Postfix) with ESMTP id 970B25FA89; Wed, 12 Feb 2014 07:04:51 +0200 (EET) User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.51 (gnu/linux) X-Accept-Language: fi;q=1.0, en;q=0.9, sv;q=0.5, de;q=0.1 In-Reply-To: (Juanma Barranquero's message of "Wed, 12 Feb 2014 00:46:09 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 83.102.40.132 X-Mailman-Approved-At: Wed, 12 Feb 2014 06:39:48 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:169552 Archived-At: Juanma Barranquero writes: > On Tue, Feb 11, 2014 at 11:53 PM, Angelo Graziosi > wrote: > >> But if I add Emacs to the applications bar (mouse-3 on the Emacs icon and >> then click on "Add this application to the applications bar"), and then I >> start Emacs from that bar, a DOS box opens behind the Emacs frame. > > Modify the shortcut so it runs runemacs.exe, not emacs.exe. On MS-Windows 7 or later, emacs.exe could automate this by setting the System.AppUserModel.RelaunchCommand property on its windows. It would have to detect whether the property should refer to emacs.exe or runemacs.exe. Because runemacs.c sets start.wShowWindow = SW_HIDE when it calls CreateProcess, emacs.exe could perhaps call GetConsoleWindow and IsWindowVisible, or call GetStartupInfo and check wShowWindow. Some of the necessary functions don't exist in MS-Windows 9X, so GetProcAddress would have to be used.