unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lennart Borgman <lennart.borgman@gmail.com>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: 6468@debbugs.gnu.org
Subject: bug#6468: A couple of problem related to frame raising (partly w32)
Date: Tue, 22 Jun 2010 01:19:50 +0200	[thread overview]
Message-ID: <AANLkTik4B8lgA18HDAito9elYQs3LIuIzS2FKjmQOsLo@mail.gmail.com> (raw)
In-Reply-To: <AANLkTik_hjID8KN9YDJ_H4OtTD4V3GKzJr6lPm-cKidg@mail.gmail.com>

On Sun, Jun 20, 2010 at 1:36 AM, Lennart Borgman
<lennart.borgman@gmail.com> wrote:
>
>>> I am asking about this part:
>>>
>>>       foreground_window = GetForegroundWindow ();
>>>       foreground_thread = GetWindowThreadProcessId (foreground_window, NULL);
>>>       if (!foreground_window
>>>           || foreground_thread == GetCurrentThreadId ()
>>>
>>> Does not the if clause mean that if foreground_wind is not 0 then the
>>> old value of foreground_thread will be erased? Or am I misreading
>>> this?
>>
>> If foreground_window is 0, or
>
>
> Ah, shit. Thanks. (I am too unused to reading C code.)

Eh, now wait a minute again... - does not that mean that if
foreground_window is not 0 then the "|| foreground_thread =
GetCurrentThread ()" will be executed? (As I said...)

And I do not think that is supposed to happen. Or do I get something wrong here?

Why is it so easy to get this simple thing wrong? (I think I know the
answer, but it hurts my feeling as a human being. We are supposed to
be the most logical animal.)

>>   foreground_thread is equal to the current thread's id, or
>>   the AttachThread call returns 0
>> then
>>   foreground_thread is set to 0
>>
>>    Juanma
>>
>





  parent reply	other threads:[~2010-06-21 23:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-19 18:23 bug#6468: A couple of problem related to frame raising (partly w32) Lennart Borgman
2010-06-19 18:35 ` Juanma Barranquero
2010-06-19 19:14   ` Lennart Borgman
2010-06-19 19:20     ` Juanma Barranquero
2010-06-19 20:32       ` Lennart Borgman
2010-06-19 20:50         ` Juanma Barranquero
2010-06-19 23:36           ` Lennart Borgman
2010-06-19 23:58             ` Juanma Barranquero
2010-06-20  1:07               ` Lennart Borgman
2010-06-20 12:21                 ` Lennart Borgman
2010-06-21 23:19             ` Lennart Borgman [this message]
2010-06-22  8:17               ` Juanma Barranquero
2010-06-22 10:39                 ` Lennart Borgman
2010-06-22 10:58                   ` Juanma Barranquero
2010-06-23 10:17                     ` Lennart Borgman
2010-06-23 10:34                       ` Juanma Barranquero
2010-06-23 10:41                         ` Lennart Borgman
2010-06-23 10:54                           ` Juanma Barranquero
2010-06-23 11:08                             ` Lennart Borgman
2010-06-19 21:47 ` Eli Zaretskii
2011-10-06 20:35   ` Glenn Morris
     [not found] ` <handler.6468.D6468.131793333925336.notifdone@debbugs.gnu.org>
2011-10-06 20:39   ` bug#6468: closed (Re: bug#6468: A couple of problem related to frame raising (partly w32)) Lennart Borgman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTik4B8lgA18HDAito9elYQs3LIuIzS2FKjmQOsLo@mail.gmail.com \
    --to=lennart.borgman@gmail.com \
    --cc=6468@debbugs.gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).