From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#23174: Windows : Emacs frame stays on top after Alt-Tab Date: Sun, 29 Sep 2019 07:36:53 +0200 Message-ID: References: <56FCEB26.9070607@null.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="262781"; mail-complaints-to="usenet@blaine.gmane.org" Cc: devi8@null.net, 23174-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Sep 29 07:38:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iERuP-0016E8-Bi for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2019 07:38:13 +0200 Original-Received: from localhost ([::1]:36906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iERuN-0005aO-KJ for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Sep 2019 01:38:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47485) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iERuF-0005YR-NL for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 01:38:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iERuE-0000Mk-7r for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 01:38:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43212) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iERuE-0000LT-3J for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 01:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iERuE-0005hq-0C for bug-gnu-emacs@gnu.org; Sun, 29 Sep 2019 01:38:02 -0400 In-Reply-To: <56FCEB26.9070607@null.net> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sun, 29 Sep 2019 05:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 23174 X-GNU-PR-Package: emacs Mail-Followup-To: 23174@debbugs.gnu.org, stefan@marxist.se, devi8@null.net Original-Received: via spool by 23174-done@debbugs.gnu.org id=D23174.156973543221867 (code D ref 23174); Sun, 29 Sep 2019 05:38:01 +0000 Original-Received: (at 23174-done) by debbugs.gnu.org; 29 Sep 2019 05:37:12 +0000 Original-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 Original-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 Original-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) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:167600 Archived-At: 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