GNU bug report logs -
#6468
A couple of problem related to frame raising (partly w32)
Previous Next
Full log
Message #38 received at 6468 <at> debbugs.gnu.org (full text, mbox):
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 231 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.