Closed
Bug 28003
Opened 25 years ago
Closed 24 years ago
no background color should be set on a window on linux
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
VERIFIED
FIXED
M17
People
(Reporter: blizzard, Assigned: blizzard)
References
Details
Attachments
(6 files)
1.78 KB,
patch
|
Details | Diff | Splinter Review | |
148.10 KB,
image/png
|
Details | |
2.37 KB,
text/plain
|
Details | |
2.31 KB,
patch
|
Details | Diff | Splinter Review | |
1.79 KB,
patch
|
Details | Diff | Splinter Review | |
1.17 KB,
patch
|
Details | Diff | Splinter Review |
There are a lot of times when a widget's Show() method is called before the background color is set. It looks not-so-nice when a big black block appears before a web page is loaded. I'm attaching a patch to detect the situation.
Assignee | ||
Comment 1•25 years ago
|
||
Changing component and re-assigning
Assignee: troy → trudelle
Component: Layout → XP Toolkit/Widgets
QA Contact: petersen → paulmac
Comment 3•25 years ago
|
||
widgets in web pages are HTML Form Controls, not XPToolkit, changing component and reassigning.
Assignee: trudelle → karnaze
Component: XP Toolkit/Widgets → HTML Form Controls
QA Contact: paulmac → ckritzer
Assignee | ||
Comment 4•25 years ago
|
||
This is the background of web pages, not indvidual widgets just FYI.
I see this happening, it only started to happen today. I will see what can be done.
Status: NEW → ASSIGNED
Assignee | ||
Comment 9•25 years ago
|
||
It's been exposed by some code that I check in two days ago. I had always had the background color hard set at 192,192,192 at the time of widget creation. I stopped doing that since none of the other platforms do it.
Comment 10•25 years ago
|
||
I am not sure what the right solution is here, I also see transparent area for around the toolbar before they get painted.
Target Milestone: M15
Assignee | ||
Comment 11•25 years ago
|
||
*** Bug 25743 has been marked as a duplicate of this bug. ***
Comment 12•25 years ago
|
||
Transparent area before painting is not a problem. Please do not set any X background color on any mozilla windows. This was recently fixed (again, I believe) and I don't want to see it broken again. Since mozilla uses double buffering for everything it is a waste (and ugly blinking) to paint background twice. The background color should only be for paint buffer. Quick test is to run 'xrefresh'. There should be no blinking in mozilla window. BTW: there are several "black" bugs :)
Comment 13•25 years ago
|
||
What is the resolution on this. Do we want to set the background or do we just leave it as is?
Assignee | ||
Comment 14•25 years ago
|
||
We want to set the background color for documents. When you are dragging a window across mozilla it looks really crappy right now since it leaves trails behind in the browser or when you resize it.
Comment 15•25 years ago
|
||
I strongly disagree. If you set the background color, you will force the server to paint every time (double painting, blinking) and you will have the trail of the background color (which could be much) different than content in the page). Also, all expose events will blink. Please, please, please, don't change this again. The correct solution is to make the repainting very fast. :)
Assignee | ||
Comment 16•25 years ago
|
||
For a long time I had the background color set and it didn't hurt performance. For scrolling I actually turned off the background color which was about the only place that it really seemed to hurt.
Comment 17•25 years ago
|
||
It hurts a lot in opaque move and opaque resize! And blinking hurts too :)
Assignee | ||
Comment 18•25 years ago
|
||
*** Bug 33648 has been marked as a duplicate of this bug. ***
Comment 20•24 years ago
|
||
*** Bug 28023 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 21•24 years ago
|
||
*** Bug 20776 has been marked as a duplicate of this bug. ***
Comment 22•24 years ago
|
||
Okay. This bug bothers me enough that I need to post more detail. I tend to use virtual desktops with Netscape maximized in it's own viewport. When switching to a viewport containing Mozilla, I see the windows in the old viewport and can watch the mozilla frame draw, and then the web page. This takes a little less than a second. As my computer becomes busier, the time increases. Some other programs have this problem too -- they all feel very clunky. PLEASE, immediate feedback is good. Turn it off for scrolling, and resize if you want... But it's driving me crazy, and making mozilla *feel* very unprofessional.
Comment 23•24 years ago
|
||
Comment 24•24 years ago
|
||
I've just attached a picture of Mozilla while it was performing a site lookup. I moved to a new viewport, moved back and started xv. I then performed a screen grab using a hidden xv window. Notice that you can see my desktop behind mozilla, and you can see the "hidden" xv windows. With no NULL color, mozilla just becomes inivisible! When I switch viewports, I see this exact thing, but it refreshes after half a second.
Comment 25•24 years ago
|
||
The repainting is slow and needs to be improved. The correct solution is not to set X background color, because it caused double painting and makes double buffering mostly useless. The fact that mozilla doesn't repaint the background (even under windows) in some situations (often when going to new page) is a separate bug and should be filed separately.
Comment 26•24 years ago
|
||
I think that we sould not set bg color, it just makes double drawing. I wonder why all "flashes black when loaging page" bugs are marked duplicate of this? I think that is other problem. Here is my thought what is hapening, i could be totally wrong thougt: Looks like mozilla is creating new window every time it loads page. And when creating that page, it defaults to black? So fix to is is reuse old window, not setting bg color to some other default. This seems to be happening on nsDocShell::SetupNewViewer. There mContentViewer gets deleted and re-created, window is attached to that via pressshell, so window it is deleted and created too. You can see this by putting breakpoint to nsWindow::Destroy and loading about:blank. Maybe we should copy window from old contentviewer, there is lots of copying already in nsDocShell::SetupNewViewer. Or not just reuse old contenviewer, like suggested in some comment on nsDocShell::CreateContentViewer. Maybe some docshell guy should look this.
Assignee | ||
Comment 27•24 years ago
|
||
I think the proper way to fix this is before showing the new widget to set the background color to the parent's document's background color.
Comment 28•24 years ago
|
||
Tomi: agree that many black window bugs should probably not be dups of this. I also agree that setting X background is a bad idea due to double drawing. Blizzard: Possibly, as long as you are not talking about X window background. (but some mozilla widget background) Any ideas how the black flashed could happen during scrolling. One of my duplicates contains this problem. Should I request a reopen. (it reports horizontal scrolling problems, but I now managed to do it also for vertical scrolling)
Comment 29•24 years ago
|
||
Comment 30•24 years ago
|
||
How to compile the attached workaround: gcc -g -Wall -fPIC -shared nobg.c -o nobg.so -L/usr/X11R6/lib -lX11 -ldl The workaround removed any background setting code. It not only removes black flashes, mozilla seems to be noticeably faster too. Now we have to find out where the bogus background colors are being set (gtk+?), and remove them. I'm not experienced in the gtk style system internals, so help would be appreciated.
Comment 31•24 years ago
|
||
gdk_window_new seems to hardcode BlackPixel default.
Comment 32•24 years ago
|
||
Comment 33•24 years ago
|
||
Another related problem: Click "Cancel" in any dialog. Watch how the widgets disappear first then the background repaints and only then the window disappears. I will post a patch for that too (It's basically the same issue as in my last patch)
Assignee | ||
Comment 34•24 years ago
|
||
This looks completely reasonable to me. Gtk is lame. I'll check it in when the tree opens. Thanks!
Assignee | ||
Comment 35•24 years ago
|
||
Taking ownership.
Assignee: waqar → blizzard
Status: ASSIGNED → NEW
Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 36•24 years ago
|
||
Assignee | ||
Comment 37•24 years ago
|
||
This is a patch that I did that uses gdk primitives just so it's all gdk.
Assignee | ||
Comment 38•24 years ago
|
||
..and I fixed the C++ comments in a c file so tor doesn't give me a melvin.
Comment 39•24 years ago
|
||
Basically the same thing has to be done in gtk/nsWindow.cpp for each gtk_window_new. I used X11 code because I was looking at CVS gdk code that doesn't like what we are doing to it (different arguments required). Perhaps we should just use X calls... :(
Comment 40•24 years ago
|
||
Assignee | ||
Comment 41•24 years ago
|
||
Yeah, that looks good too. I'll check that in as well.
Assignee | ||
Comment 42•24 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•24 years ago
|
Summary: background color is not set on many widgets before nsIWidget::Show is called → no background color should be set on a window on linux
Comment 43•24 years ago
|
||
*** Bug 39602 has been marked as a duplicate of this bug. ***
Comment 44•24 years ago
|
||
*** Bug 39602 has been marked as a duplicate of this bug. ***
Comment 47•23 years ago
|
||
verified on build 2001-08-07-80-trunk
You need to log in
before you can comment on or make changes to this bug.
Description
•