[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#6468: A couple of problem related to frame raising (partly w32)

From: Lennart Borgman
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
<address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]