Closed Bug 5180 Opened 26 years ago Closed 26 years ago

GTK nsWidget gets new look and feel objects in constructor

Categories

(Core :: XUL, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: bruce, Assigned: pavlov)

Details

Attachments

(2 files)

the GTK nsWidget constructor gets a Look and feel object everytime, just to get a single value from it and destroy it. http://lxr.mozilla.org/seamonkey/source/widget/src/gtk/nsWidget.cpp#39
Assignee: ramiro → pavlov
we could do this by creating a style each time, but in order to get the correct colors, this is needed. (saving the overhead from L&F but still creating some overhead). This is required in part because we are using GTK and therefore should support its themes. If we don't do this, then the colors get fubar, and broken. I will look into this in more detail.
Is there any way to be notified when GTK's style info changes? Can we just cache the nsILookAndFeel * for now, and avoid the CreateInterface overhead every time?
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
I've committed the attached patch.
Pavlov believes that it's safe for the LnF object to cache the GtkStyle * as well, so I've committed again.
Status: RESOLVED → VERIFIED
sorry for bugzilla spam. trying to get these off my radar
Status: RESOLVED → VERIFIED
re-verifying this bug.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: