Closed Bug 459254 Opened 17 years ago Closed 16 years ago

shift-command-clicking on a link opens new window in foreground instead of background

Categories

(Camino Graveyard :: General, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Camino2.0

People

(Reporter: edjusted, Assigned: murph)

References

Details

(Keywords: regression)

Attachments

(1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en; rv:1.9.0.4pre) Gecko/2008100800 Camino/2.0a1pre (like Firefox/3.0.4pre) Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en; rv:1.9.0.4pre) Gecko/2008100800 Camino/2.0a1pre (like Firefox/3.0.4pre) In previous builds of Camino, command-clicking on a link opens the link in a new foreground window, while shift-command-clicking on a link opens the link in a new *background* window. In the new 2.0a1 build, shift-command-clicking on a link opens the link the the *foreground* instead of the *background*. Reproducible: Always Steps to Reproduce: 1.shift-command-click on a link in any web page 2. 3. Actual Results: link opens in a new foreground window Expected Results: link should open in a new background window instead
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Summary: shift-command-clicking on a link on a page opens window in foreground instead of background → shift-command-clicking on a link opens new window in foreground instead of background
Target Milestone: --- → Camino2.0
cl had bug 395423 that day, too, not that it seems any more likely.
Yeah, I don't see how any of the tab loop stuff (or my bug) could possibly have broken this, but I don't see anything else even by expanding that regression window 24 hours on either end.
Hardware: Macintosh → All
Even expanding the regression window to 15-23 September, I don't see anything likely: http://bonsai.mozilla.org/cvsquery.cgi?date=explicit&mindate=2008-09-15&maxdate=2008-09-23 but I can indeed confirm Smokey's regression window. The 15 Sep build works; the 23 Sep build doesn't.
I'm not sure why the keyboard loop fixes I introduced seem to cause this, but the basic gist of what's going on: When showing the new window, we call setSuppressMakeKeyFront:YES, order the window behind the current one, then immediately call setSuppressMakeKeyFront:NO. When Gecko sends the SetFocus() callback, which happens during loading start and finish, we'll check the suppressMakeKeyFront and find it to be no and then order the window front, since the flag was immediately switched back when finished showing the window. It's not immediately clear to me why this worked before, but I'd fix it by removing the setSuppressMakeKeyFront:NO call when showing the browser window. As soon as the window becomes key again, by the user, setSuppressMakeKeyFront:NO will actually be called during that process.
Assignee: nobody → murph
Attached patch Patch (obsolete) — Splinter Review
Fix using the approach mentioned above.
Attachment #343434 - Flags: review?(stuart.morgan+bugzilla)
(In reply to comment #5) > It's not immediately clear to me why this worked before, but I'd fix it by > removing the setSuppressMakeKeyFront:NO call when showing the browser window. > As soon as the window becomes key again, by the user, > setSuppressMakeKeyFront:NO will actually be called during that process. Does this mean we should remove *all* the instances of |setSuppressMakeKeyFront:NO| outside of stuff that would be getting hit when a window becomes key? I see two other occurrences of that call in the code, one or both of which might be responsible for bug 461403 (which is very similar but isn't helped by the existing patch here).
For that matter, is there a reason Gecko is allowed to steal focus *ever* when it's not in the key window? I'm thinking we need to change the |setGeckoActive:| method in BWC so that it only calls |setSuppressMakeKeyFront:NO| if |setGeckoActive:|'s in-parameter is YES. Isn't Gecko's focus-setting part of, well, Gecko being "active"? Seems to me like we ought to fully "inactivate" Gecko in a method call of |setGeckoActive:NO| :-p
(In reply to comment #8) > For that matter, is there a reason Gecko is allowed to steal focus *ever* when > it's not in the key window? window.focus()
Comment on attachment 343434 [details] [diff] [review] Patch Clearing the review request, and obsoleting the patch, because rather than working around the problem, I found the root cause and this will be fixed by bug 461403.
Attachment #343434 - Attachment is obsolete: true
Attachment #343434 - Flags: review?(stuart.morgan+bugzilla)
Depends on: 461403
FIXED by the landing of bug 461403; the fix will be in tomorrow's Cm2-M1.9 nightly.
Grr. /kick bug 452888.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: