Closed
Bug 152280
Opened 23 years ago
Closed 23 years ago
Avoid flashing a foreground window when a dialog is displayed
Categories
(SeaMonkey :: UI Design, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: emaijala+moz, Assigned: emaijala+moz)
References
Details
Attachments
(1 file)
2.00 KB,
patch
|
deanis74
:
review+
jag+mozilla
:
superreview+
|
Details | Diff | Splinter Review |
Apparently there is a problem in Windows 2000 and XP that causes a flashed
(blinked, using FlashWindow()) foreground window to not "unflash". This will
cause a taskbar with auto-hide enabled to stay visible until the window is
deactivated and activated. This can be avoided by not even unflashing a
foreground window.
I will be posting a patch soon.
Assignee | ||
Comment 1•23 years ago
|
||
This patch changes the attention code so that ::FlashWindow(handle, FALSE) is
not called if ::FlashWindow(handle, TRUE) has not been called (usually if the
window is already on foreground).
For some reason trying to unflash a window will always invert the taskbar
button causing an auto-hidden taskbar to be shown on Windows 2000 and XP.
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Comment 2•23 years ago
|
||
Thanks so much for filing this, Ere. This is my first experience with Bugzilla,
and I'm tremendously impressed!
Ere, is this what I tried poorly to describe in bug 145146?
Assignee | ||
Comment 4•23 years ago
|
||
It looks like it's the same issue and this fix might help there also. I tried
the test case with the patched version and it seemed to work, although I was
using Terminal Services and it was a bit slow, so I'm not sure about the timing.
Anyway, there was nothing flashing.
CC'ing Bill Law for a review (please?).
Updated•23 years ago
|
Blocks: 145146
Keywords: mozilla1.1
Assignee | ||
Comment 5•23 years ago
|
||
*** Bug 145146 has been marked as a duplicate of this bug. ***
Do you really need a separate SetFlashed() function, or can this just be done in
the TimerProc()?
Assignee | ||
Comment 7•23 years ago
|
||
Umm.. I think it's necessary. FlashWindow(..., FALSE) must be called in the end
if FlashWindow(..., TRUE) has been called. TimerProc will be called multiple
times if the window isn't on foreground. The attention timer is the only one
that can hold all the information about the window to be flashed. There is no
other way (at least that I know of) to tell if FlashWindow(..., TRUE) has been
called to window.
Comment on attachment 87980 [details] [diff] [review]
v1 patch to avoid even unflashing a window if it hasn't flashed
Right, I understand that, but I was wondering specifically why the separate
SetFlashed() function.
>+ void SetFlashed(HWND timerWindow) {
>+ TimerInfo *info = FindInfo(timerWindow);
>+ if (info)
>+ info->hasFlashed = PR_TRUE;
>+ }
....
>+ gAttentionTimerMonitor->SetFlashed(hwnd);
>+ }
Why not just do this in nsGetAttentionTimerFunc() instead of calling
SetFlashed()?
TimerInfo *info = FindInfo(hwnd);
if (info)
info->hasFlashed = PR_TRUE;
Why does it need a separate function?
Assignee | ||
Comment 9•23 years ago
|
||
That would require exposing the TimerInfo structure to outsiders which is
something I'd rather avoid when there is a nice class wrapping it already. Note
that SetFlashed() belongs to nsAttentionTimerMonitor class and the TimerProc to
nsWindow.
Comment 10•23 years ago
|
||
Comment on attachment 87980 [details] [diff] [review]
v1 patch to avoid even unflashing a window if it hasn't flashed
Ah yes, I see that now. I should refrain from reviewing code in the first
couple of days after spending a week in the Caribbean!
Is this bug documented anywhere? Regardless, r=me.
Attachment #87980 -
Flags: review+
Assignee | ||
Comment 11•23 years ago
|
||
I couldn't find anything official, but there are dozens of puzzled comments in
the usenet. I also built a small test program which showed the same behavior.
Comment 12•23 years ago
|
||
Comment on attachment 87980 [details] [diff] [review]
v1 patch to avoid even unflashing a window if it hasn't flashed
sr=jag
Attachment #87980 -
Flags: superreview+
Assignee | ||
Comment 13•23 years ago
|
||
Fix checked in to trunk.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 14•23 years ago
|
||
This fixed bug 145146 for me, so verifying fixed on Win2K using 2002062908.
No longer blocks: 145146
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•