Closed Bug 113283 Opened 24 years ago Closed 24 years ago

dependent window placement improvements

Categories

(Core :: XUL, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.8

People

(Reporter: danm.moz, Assigned: danm.moz)

References

Details

Attachments

(1 file, 1 obsolete file)

Maybe it's time for some long overdue improvements to the window placement code.
Attached patch window placement enhancements (obsolete) — Splinter Review
(1) Centers dependent windows on their parent instead of on their parent's screen, (2) Persists dependent window positions relative to their parent instead of globally, and (3) allows position persistence to override centering. Note (1) had already been implemented, but had some bugs. This fixes them. (3) allows a window to be both centered and given position persistence. It will show up centered the first time, and on subsequent times, in its saved position. Note also we still don't have a full suite of window centering options. This patch reinterprets the window.open feature "centerscreen" to mean "center on parent." Alternatively we could enrich the window.open feature set but I resist doing that because of the 32 bitfield parameter we reduce the string to. While we do (currently) have the bits to spare, still a bunch of centering options seem out of place. I've chosen to wing it with a heuristic, instead.
How does item (1) interact with parents whose center is off the screen? Does the dependent window appear (partially) off the screen?
Probably. There is already code to keep windows at least partially onscreen, but it'll allow quite a bit. I'll need to teach the widget code to force a dependent window to remain entirely onscreen. That complicates things a bit...
Another twist is that dependents of parents which are entirely offscreen (eg multiple-desktop setup on Unix or Windows) should be fine popping up offscreen, right? Popping them up on a different desktop from the parent could be a little confusing.
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.8
Blocks: 98830
Blocks: 112495
This patch same as before except dependent windows are pinned entirely on the same screen as the parent window, and I've enabled it on unix builds too (dependent/transient windows, only -- independent windows remain placed by the window manager) because of bug 112495, a fix for which this patch should lay the groundwork. Yes, Yoda I channel. Note that only the first ten files changed in the patch are important. The remainder are just tweaks necessary because I'm changing an interface.
Attachment #60177 - Attachment is obsolete: true
.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
see bug 119141 for a regression from this.
Blocks: 50686
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: