GNU bug report logs - #6468
A couple of problem related to frame raising (partly w32)

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Sat, 19 Jun 2010 18:24:02 UTC

Severity: normal

Tags: notabug

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 6468 <at> 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
On Sun, Jun 20, 2010 at 1:36 AM, Lennart Borgman
<lennart.borgman <at> 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
>>
>




This bug report was last modified 13 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.