From unknown Wed Jun 18 23:04:14 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#23174 <23174@debbugs.gnu.org> To: bug#23174 <23174@debbugs.gnu.org> Subject: Status: Windows : Emacs frame stays on top after Alt-Tab Reply-To: bug#23174 <23174@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:04:14 +0000 retitle 23174 Windows : Emacs frame stays on top after Alt-Tab reassign 23174 emacs submitter 23174 devi8@null.net severity 23174 minor thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 31 17:20:42 2016 Received: (at submit) by debbugs.gnu.org; 31 Mar 2016 21:20:42 +0000 Received: from localhost ([127.0.0.1]:46517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alk1C-0002d8-2A for submit@debbugs.gnu.org; Thu, 31 Mar 2016 17:20:42 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57817) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alYjh-0000ZM-SE for submit@debbugs.gnu.org; Thu, 31 Mar 2016 05:17:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alYjX-0003mY-Mi for submit@debbugs.gnu.org; Thu, 31 Mar 2016 05:17:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:48883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alYjX-0003mU-Jg for submit@debbugs.gnu.org; Thu, 31 Mar 2016 05:17:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alYjR-0000GR-D7 for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2016 05:17:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alYjM-0003hn-BJ for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2016 05:17:37 -0400 Received: from mout.gmx.com ([74.208.4.200]:52302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alYjM-0003fv-5U for bug-gnu-emacs@gnu.org; Thu, 31 Mar 2016 05:17:32 -0400 Received: from [10.10.6.218] ([192.26.168.156]) by mail.gmx.com (mrgmxus001) with ESMTPSA (Nemesis) id 0MNYtA-1afW3W2zHO-0079T5; Thu, 31 Mar 2016 11:17:28 +0200 To: bug-gnu-emacs@gnu.org From: devi8@null.net Subject: Windows : Emacs frame stays on top after Alt-Tab X-Enigmail-Draft-Status: N1110 Message-ID: <56FCEB26.9070607@null.net> Date: Thu, 31 Mar 2016 11:17:26 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:AXmWHYXu6+aYuve9hYGXx/IlVr1nOC+8Wblcl50KRNwifRBuzz0 +0qhJRWIWXlbYANa0JUcqOs/9k+c9eWWs/FYe9wGTCMjymtXOZArynXytVlGfmcMJsh4Zz4 gp9nt4WXsQA+jHIpNW3whN7F+bsQxKkZ+iVfajxqVc6WcsvPc9EB/VCB4c//fEllzQThh2T j/rXgeGXqVikKzaMMHCJA== X-UI-Out-Filterresults: notjunk:1;V01:K0:cVv6gZ2d/eE=:6S6YYR1SeqXce+jiWB8u79 4aAvn3iMhO/jLceXmuTwpeIS/65hA7gP3D86nhOiHKRcTPWigOb74M3IjDVakQCyc/gqVOkUO rW2kK+115tGJO5Igi9abmL6JjyyZJVBoX+MhUQb6W7BIdPdngCgBp+gEQCa2DzPYJ+DIkW8y9 VmS3xJEydAs4tlI0swFSgLHB7lY2quusE5LyCX7oyxDDuui/VIhJ47onw71FUbO1Nqu+NNrVF Vq7leS+r0isFGOrsf/FsphmT6wvuymtipM+Yh6/K+ECfGwFpaTHIP+39Mg8uMkWMMhPRUFWzF dw5MKQBF0LwysPE56CdPDxzPVmP54CqnT4bPPDQw/twHVRScj96PVl6umaNmUTYwrkxdtgplG 0a0QzzjiXv5YarmtKq6M07vXv8lhenAR9UN9Ch7/Y4kINOAKDaVai2LnnoCW5MUnlhwQ3XfJO Rbr2tUAPe/yXNQTxqLCgpKZxVu3AxkJ6If4++AMQ3fnnw4QKnVLB3Aol2DGC4eGuQNLKZxslN mfrUTtLTCWwflUIVaQ156U/lRzi1h9Elwh9fQjTcnTnZtpJJrbwZBD67K5lfY4fvFu7F1rPWn LYGz7+lZg+5FXzvzYmRAJfAKXP3wpsolm6uByRmt3yvPmXlVBdtWGOB/Zm50yVZviK46Sn2bY AsFHBPwYij6s+yhQR2lNFvnCnoS43JMFbp9/b5bjhpVHKmsNSBMb8cp7YDsozimXVXVN6G5S0 mXVo06s5Z2el1Q+QZIS8i8V4b5hBh3msKUCoxDT7cABxP6OlxEy3Gz3pSoSw0JVp0ixFX2TE/ YbnQzWs X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Thu, 31 Mar 2016 17:20:41 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 On Windows (7 Professional), after (?) switching from a Aero Desktop Theme back to a non-Aero Desktop Theme, pressing Alt-Tab will switch application windows, but the Emacs Window ("Frame"?) will stay on the foreground, which is wrong behaviour. Only after exiting and restarting Emacs is the correct behaviour restored again, and Alt-Tab works as expected. I saw some discussions on the use of SetForegroundWindow and some bug reports that might relate to this. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6468 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=11513 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=13954 https://debbugs.gnu.org/cgi/bugreport.cgi?bug=11513 In general I despise applications that use SetForegroundWindow, because almost all of them fail to do what the user wants, because of lack of knowledge of other active applications and the user's intentions. This bug report is also an example of such behaviour. Why not totally remove the use of SetForegroundWindow (except maybe for sys_kill and some places that try to fix "bugs"), or at least make it customizable so that I can disable it? From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 01 03:02:29 2016 Received: (at 23174) by debbugs.gnu.org; 1 Apr 2016 07:02:29 +0000 Received: from localhost ([127.0.0.1]:46683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alt6D-0002kF-4D for submit@debbugs.gnu.org; Fri, 01 Apr 2016 03:02:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:44183) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1alt6B-0002k4-UI for 23174@debbugs.gnu.org; Fri, 01 Apr 2016 03:02:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alt63-0004Nr-OT for 23174@debbugs.gnu.org; Fri, 01 Apr 2016 03:02:22 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alt63-0004Nm-M1; Fri, 01 Apr 2016 03:02:19 -0400 Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2697 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1alt62-0002pf-Nu; Fri, 01 Apr 2016 03:02:19 -0400 Date: Fri, 01 Apr 2016 10:02:09 +0300 Message-Id: <83r3epu80e.fsf@gnu.org> From: Eli Zaretskii To: devi8@null.net In-reply-to: <56FCEB26.9070607@null.net> (devi8@null.net) Subject: Re: bug#23174: Windows : Emacs frame stays on top after Alt-Tab References: <56FCEB26.9070607@null.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -6.0 (------) X-Debbugs-Envelope-To: 23174 Cc: 23174@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Eli Zaretskii Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) > From: devi8@null.net > Date: Thu, 31 Mar 2016 11:17:26 +0200 > > GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 > > On Windows (7 Professional), after (?) switching from a Aero Desktop Theme back to a non-Aero Desktop Theme, > pressing Alt-Tab will switch application windows, but the Emacs Window ("Frame"?) will stay on the foreground, which is wrong behaviour. > Only after exiting and restarting Emacs is the correct behaviour restored again, and Alt-Tab works as expected. > > I saw some discussions on the use of SetForegroundWindow and some bug reports that might relate to this. > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6468 > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=11513 > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=13954 > https://debbugs.gnu.org/cgi/bugreport.cgi?bug=11513 > > In general I despise applications that use SetForegroundWindow, because almost all of them fail to do what the user wants, because of lack of knowledge of other active applications and the user's intentions. > This bug report is also an example of such behaviour. > > Why not totally remove the use of SetForegroundWindow (except maybe for sys_kill and some places that try to fix "bugs"), or at least make it customizable so that I can disable it? You may be right, but please explain how are the calls to SetForegroundWindow related to the problem you describe. IOW, please tell the details of how Alt-TAB winds up calling that API, or how the call to that API interferes with Alt-TAB. Emacs calls SetForegroundWindow in only 2 specific situations: when it was requested to direct a focus to a frame, and when it was requested to raise a frame. I don't necessarily see how is that related to the issue at hand. I also couldn't reproduce the problem, on Windows 8.1 and Emacs 24.5. Maybe I don't quite understand what you did, so please describe the recipe for reproducing the problem step by step, preferably starting with "emacs -Q". From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 29 01:37:12 2019 Received: (at 23174-done) by debbugs.gnu.org; 29 Sep 2019 05:37:12 +0000 Received: from localhost ([127.0.0.1]:52031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iERtQ-0005gd-Ay for submit@debbugs.gnu.org; Sun, 29 Sep 2019 01:37:12 -0400 Received: from mail-pf1-f170.google.com ([209.85.210.170]:46505) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iERtO-0005gR-Ld for 23174-done@debbugs.gnu.org; Sun, 29 Sep 2019 01:37:11 -0400 Received: by mail-pf1-f170.google.com with SMTP id q5so3673841pfg.13 for <23174-done@debbugs.gnu.org>; Sat, 28 Sep 2019 22:37:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=HS2Mlmtpzjc0ODrOun9sD78yihe3Z3p4TGPAb31t/L4=; b=EPH8brsjO04s4veRVQJob7ZvH4hUac4SiFq9qq2QPMIarKKtO0d/ncwzVunNkgIIDn M+K98SagkgHe2jtvhRqqbLGK2/P1ELoFBfDJileJA5qs9nKlcOqW54kuRLU6jCNY2ORe ruJADU6L48taMsmqG0Ll8yOBj0LSgcmIGhCcfuqMjCpBisCi20okWpyrTHvN69OXi8rC lXghCQSKWEsOKdgZcuN3uW8DehHJvwudadEJ76/UgKX+OS6j9RHFDx9VleHdzqjEVTjg LGyigs7puA4+2Sx/0uGMC4i1j40rOoZiwuOAx9tzQKVxBiLgAQQFftYKXgM0rEzNryQU dHXg== X-Gm-Message-State: APjAAAU/kLPJn1EPzQbNRXCK2MunfXajH+rV+6X30t6LoHnGF/QzKQVa BguFpS1pqa2nAWJTWoswhmK8jLVBDGrEXRIxuMM= X-Google-Smtp-Source: APXvYqzoY7Aq78Lgz7RdoAwFUa5VtL/TFcYh9E//OQBYNXUXQDZ1l3+FwA1uOsiEa9OzfW6UDLSuxiMplsP6ju6i3jo= X-Received: by 2002:aa7:8750:: with SMTP id g16mr14038008pfo.190.1569735424948; Sat, 28 Sep 2019 22:37:04 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Sun, 29 Sep 2019 07:36:53 +0200 Message-ID: Subject: Re: bug#23174: Windows : Emacs frame stays on top after Alt-Tab To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.4 (/) X-Debbugs-Envelope-To: 23174-done Cc: devi8@null.net, 23174-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) Eli Zaretskii writes: >> From: devi8@null.net >> Date: Thu, 31 Mar 2016 11:17:26 +0200 >> >> GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570 >> >> On Windows (7 Professional), after (?) switching from a Aero Desktop Theme back to a non-Aero Desktop Theme, >> pressing Alt-Tab will switch application windows, but the Emacs Window ("Frame"?) will stay on the foreground, which is wrong behaviour. >> Only after exiting and restarting Emacs is the correct behaviour restored again, and Alt-Tab works as expected. >> >> I saw some discussions on the use of SetForegroundWindow and some bug reports that might relate to this. >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=6468 >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=11513 >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=13954 >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=11513 >> >> In general I despise applications that use SetForegroundWindow, because almost all of them fail to do what the user wants, because of lack of knowledge of other active applications and the user's intentions. >> This bug report is also an example of such behaviour. >> >> Why not totally remove the use of SetForegroundWindow (except maybe for sys_kill and some places that try to fix "bugs"), or at least make it customizable so that I can disable it? > > You may be right, but please explain how are the calls to > SetForegroundWindow related to the problem you describe. IOW, please > tell the details of how Alt-TAB winds up calling that API, or how the > call to that API interferes with Alt-TAB. > > Emacs calls SetForegroundWindow in only 2 specific situations: when it > was requested to direct a focus to a frame, and when it was requested > to raise a frame. I don't necessarily see how is that related to the > issue at hand. > > I also couldn't reproduce the problem, on Windows 8.1 and Emacs 24.5. > Maybe I don't quite understand what you did, so please describe the > recipe for reproducing the problem step by step, preferably starting > with "emacs -Q". More information was requested, but was not given within three years. I'm therefore closing this bug report. If anyone can reproduce this issue, please reopen. Best regards, Stefan Kangas From unknown Wed Jun 18 23:04:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 27 Oct 2019 11:24:12 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator