Pop-up window drawn in the wrong place
Categories
(Core :: Widget: Gtk, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox-esr91 | --- | unaffected |
firefox93 | --- | unaffected |
firefox94 | --- | unaffected |
firefox95 | --- | affected |
People
(Reporter: darktrojan, Unassigned)
References
(Regression)
Details
(Keywords: regression)
After bug 1736068 pop-up windows are now drawn in the top-left-hand corner of the screen, though they are actually in the middle (if opened with centerscreen) or elsewhere if moved around. The rectangle where the window really is just displays what was there at the time of opening.
I went back to the nightly before bug 1736068 and it didn't happen there so I'm fairly sure it has to be the cause.
Here's the simple test case I'm using again:
Services.ww.openWindow(null, "about:mozilla", "_blank", "popup,centerscreen,width=640,height=480", Services.ww)
Comment 1•4 years ago
|
||
This example is wrong:
Services.ww.openWindow(null, "about:mozilla", "_blank", "popup,centerscreen,width=640,height=480", Services.ww)
You're opening a popup window but without any parent which is incorrect (popups are positioned relatively to parent window). Also the popup position is not specified, you set only size.
I think you need to figure out your need and the select proper window type for it.
Comment 2•4 years ago
•
|
||
Ok, I see the 'centerscreen' param but it's still popup without parent. You should use modal popup and select correct parent window.
Reporter | ||
Comment 3•4 years ago
|
||
Our need is a window before any others are open, because we're doing migration things that need to happen before the rest of the program starts. I wouldn't use the popup type except that I'd prefer the window to not be closable because that will leave the user with no indication of what is going on.
Comment 4•4 years ago
|
||
In such case please use regular toplevel window without decorations.
Comment 5•4 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #3)
I wouldn't use the popup type except that I'd prefer the window to not be closable because that will leave the user with no indication of what is going on.
That's interesting - does it behave the same on all platforms? Is the popup without parent persistent everywhere or is that just Linux specific?
Reporter | ||
Comment 6•4 years ago
|
||
In such case please use regular toplevel window without decorations.
How do I do that? I've never found a way, or I wouldn't be trying to do it this way.
That's interesting - does it behave the same on all platforms? Is the popup without parent persistent everywhere or is that just Linux specific?
Not sure I follow. What I'm trying to do is the same everywhere, if that's what you're asking.
Comment 7•4 years ago
|
||
(In reply to Geoff Lankow (:darktrojan) from comment #6)
In such case please use regular toplevel window without decorations.
How do I do that? I've never found a way, or I wouldn't be trying to do it this way.
That's interesting - does it behave the same on all platforms? Is the popup without parent persistent everywhere or is that just Linux specific?
Not sure I follow. What I'm trying to do is the same everywhere, if that's what you're asking.
Yes, I understand you. You need a panel which is drawn at center of the screen and user can't close it (needs to be closed by application only).
But how do you end up with the
Services.ww.openWindow(null, "about:mozilla", "_blank", "popup,centerscreen,width=640,height=480", Services.ww)
example? Is that documented somehow that this specific config produces such window? Or did you find that by some experiment?
I'm asking because I need to understand how is that supposed to work, it looks like just a bug/window missconfiguration to me but maybe it's a documented way how to create such window and we need to implement such specific setup in widget code.
Comment 8•4 years ago
|
||
And does the example above works as expected on Mac/Windows? Is Linux the only broken platform here?
Reporter | ||
Comment 9•4 years ago
|
||
I see. It's not documented, I figured it out by trawling through the features in nsWindowWatcher.cpp. (In fact I'm not aware of any good documentation on the features outside of those usable by web stuff, which is how I ended up looking at the code. Also the IDL says last argument can be null except doing that crashes, but I digress…) It does work fine in the other platforms, or did last time I checked.
Sorry I'm wasting your time on this. I had exactly what I thought I wanted and was about to get it reviewed and landed, and then it broke.
Comment 10•4 years ago
|
||
Okay, if Linux is the only non-working platform here we may 'fix' that.
Comment 11•4 years ago
|
||
Hm, I think you need to use a toplevel window anyway. It may be confusing if you create a phantom window which isn't attached to any application and can't be closed. If you create a toplevel window you can use handlers attached to 'close' signal. When such signal comes you can ask user if the the migration needs to be aborted and clean up. It's much better than workaround it by a persistent window.
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Set release status flags based on info from the regressing bug 1736068
Comment 13•4 years ago
|
||
Bug 1736949 isn't fixing this too, or?
Comment 14•4 years ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #13)
Bug 1736949 isn't fixing this too, or?
I think that's a different issue.
Comment 15•4 years ago
|
||
It looks like the same after all.
Updated•4 years ago
|
Description
•