Closed Bug 357215 Opened 18 years ago Closed 18 years ago

[Win] Focus breaks, cut/copy/paste and other focus-dependent tasks broken, especially with Virtual Desktop Manager Powertoy

Categories

(Core :: DOM: Editor, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: pkasting, Assigned: pkasting)

References

(Blocks 1 open bug)

Details

Bug 220900 recently fixed one cause of focus breakage.  However, there are seemingly still others, as I can still reproduce focus breakage (with all the same symptoms as described on that hideous bug) on my trunk build as of today.

I use the Microsoft Windows XP Virtual Desktop Manager Powertoy (available at http://download.microsoft.com/download/whistler/Install/2/WXP/EN-US/DeskmanPowertoySetup.exe -- if that moves, the source page as of this writing was http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx ).

This desktop manager apparently fakes up virtual desktops by minimizing apps and then completely hiding them from the taskbar on virtual desktop switch.  Sometimes, the series of messages Firefox receives (either on switching away or switching back, I'm not sure which since it's impossible to test while switched away) causes focus to be broken.  Manually minimizing and then restoring the window will repair focus.

As a wild guess from reading the patch on bug 220900 and other bugs, we might be trying to restore focus too soon when switching back to the Firefox-containing desktop.  This desktop switching is noticeably non-instantaneous, especially with many apps open or on a loaded machine.  I suspect these load/timing factors are what make the problem intermittent.

I estimate that in my usage, about 1 out of every 3 times I switch back to the virtual desktop containing Firefox, focus is broken.

Steps to reproduce:
(1) Download powertoy linked above, install, use
(2) Start Firefox on one virtual desktop
(3) Switch to another virtual desktop, then switch back
(4) If focus in Firefox is not now broken, repeat step (3), varying the speed of switching, the machine load, and the number of open apps on the desktop
(5) Once focus _is_ broken, note that it can be repaired by minimizing and restoring
Summary: [Win] Focus breaks, cut/copy/paste and other focus-dependent tasks broken → [Win] Focus breaks, cut/copy/paste and other focus-dependent tasks broken, especially with Virtual Desktop Manager Powertoy
As a note on Jesse's summary change (which is accurate), I believe that the Virtual Desktop powertoy makes the problem much more easily reproducible, but I don't believe it's a necessary component of reproducing -- whatever series of messages/timing that occurs here can presumably occur elsewhere, and thus be one of the sources of the numerous "copy/paste is broken", "find triggers on apostrophe", and other similar focus-broken symptom bugs.
Interesting.

Today I managed to break the window in a different but seemingly related way: after switching desktops, the window titlebar was blinking continuously but the window could not be interacted with.  The following text was in my console:

WARNING: Should not try to set the focus on a disabled window: file c:/pkasting/firefox/mozilla/dom/src/base/nsGlobalWindow.cpp, line 3566
WARNING: Should not try to activate a disabled window: file c:/pkasting/firefox/mozilla/dom/src/base/nsGlobalWindow.cpp, line 5581
WARNING: Should not try to set the focus on a disabled window: file c:/pkasting/firefox/mozilla/dom/src/base/nsGlobalWindow.cpp, line 3566
WARNING: Should not try to activate a disabled window: file c:/pkasting/firefox/mozilla/dom/src/base/nsGlobalWindow.cpp, line 5581

I suspect this issue is related to the one in this bug.  That is, it may be that the global window is not yet "enabled" when we try to activate and/or change focus on it after switching desktops, and this is causing the focus breakage.
did patch in bug 220900 caused the bug you describe here?  If not then this probably shouldn't be blocking 220900 which is not a meta bug.
If you think it's misleading, then remove blocking.

For clarity: no, bug 220900 does not cause this, it simply fails to fix it.  However, if we're being pedantic about bugzilla, then based on the summary of bug 220900, the patch on bug 220900 does not completely fix that bug.  This bug is a specific case of focus breakage which is not fixed.  If bug 220900 is not about fixing focus breakage in general, its summary should reflect that, or setting this bug to block it seems appropriate to me-- especially when the "focus breaks" class of bugs is the source of perhaps our most common and frustrating user complaints (copy/paste broken, quick find pops up unexpectedly, etc.).
From the Mozillazine forums:
"I can still consistently reproduce [focus breaking] if I use either trayit or rbtray to minimize Fx to the system tray."
Similar behavior is observed using the Virtual Dimension virtual desktop manager and FF 1.5.0.9 on XP SP2 with multiscreen support (two monitors, 8 virtual desktops).

Manually refocusing by clicking outside the Firefox window and then clicking inside the Firefox window restores focus to proper operation.
No longer blocks: 220900
Oliver, you willing to take this bug on too?

/be
Taking.
Blocks: focusnav
Status: NEW → ASSIGNED
Assignee: nobody → oliver_yeoh
Status: ASSIGNED → NEW
Also observed using the Virtual Dimension virtual desktop
manager and FF 2.0.0.1 on XP SP2 with multiscreen support (two monitors, 10
virtual desktops).

Manually refocusing by clicking outside the Firefox window and then clicking
inside the Firefox window restores focus to proper operation.
Is this something we want on the 1.8.1 branch?
If we can find a safe fix, then yes; the "focus broken" class of bugs is one of the most annoying and frequently-reported, so it would be really great to fix it before Fx 3.
This should be fixed by Bug 261074. I can't reproduce this bug anymore. Peter, do you still see this?
Haven't used a trunk build in a while.  Let me try and get something built and tested for a few days and I'll get back to you.  Taking for now to remind myself to reply :)
Assignee: oliver_yeoh → pkasting
After testing this for several days, I can no longer reproduce, so I believe comment #12 is correct.

Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
This is still happening to me in 2.0.0.3 on XP SP2 with multiscreen support (two monitors, 10 virtual desktops). Has the fix been released yet?
(In reply to comment #15)
> This is still happening to me in 2.0.0.3

That would be because this fix was not merged to the 1.8.1 branch Firefox 2 is built from.  You should not expect it to be fixed in any Firefox 2.x release unless you see something here about it being merged back.
If you'd bothered to read the bug comments (specifically, comment #12), you'd know that this was fixed by bug 261074. If you go to that bug, you'll see that the patch came in too late for the 2.0.0.4 development cycle but has been nominated for possible inclusion for 2.0.0.5.
Is this fixed by 261074 or is something else checked in independently? If so, shouldn't this be marked as dependent on it rather than just fixed? I think we can understand a little confusion between that and Peter not explicitly stating he was using a nightly. If Peter had meant that it was working fine for him in 2.0.0.3 we'd want John to let us know it's still broken for him.
Comment #12 is pretty clear that the checkin for bug 261074 specifically fixed it. Yes, it should be marked dependent, so I'm doing it now :-).

It should also be noted that bug 261074 caused some regressions on the trunk. According to that bug, a branch patch won't be considered until they're fixed.
Depends on: 261074
After posting my question I did actually read the other bug, and saw the regression and branch timing comments, so I did figure out pretty much what Comment #17 and Comment #19 said; my initial assumption when I posted the question was "fixed" meant it would be in the next release made after that date. Thanks for the confirmation, and sorry for the silly question; but I am glad it got this bug properly marked dependent.
Folks, this is _still_ happening for me in FF 3.6 on WinXP SP3 using Virtual Dimension with 2 screens and 10 desktops.

When will the focus refactoring that supposedly fixed this (bug 261074 and bug 178324) actually ship?

Should I reopen this bug? Or open a new one?
Just upgraded to 3.6.3 and this is still happening.
it'd be good to file a new bug for now. we can always dupe it back later
You need to log in before you can comment on or make changes to this bug.