Closed Bug 506433 Opened 15 years ago Closed 15 years ago

reduce the number of GdkWindows used in nsIWidgets

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: karlt, Assigned: karlt)

References

(Depends on 1 open bug)

Details

Attachments

(3 files, 1 obsolete file)

Child nsIWidgets usually have two GdkWindows.  Toplevel nsIWidgets have four.
This removes one GdkWindow from any nsIWidget.
Attachment #390625 - Flags: review?(roc)
MozContainers already have a GdkWindow, so let's not create another one.
This removes another GdkWindow from toplevel nsIWidgets (and other container nsIWidgets).
Attachment #390626 - Flags: review?(roc)
I'd better have a look at test_container too, though that doesn't seem to be part of any build.
Comment on attachment 390625 [details] [diff] [review]
part 1: replace mozDrawingarea with a single GdkWindow

         else if (mContainer) {
             gtk_widget_hide(GTK_WIDGET(mContainer));
-            moz_drawingarea_set_visibility(mDrawingarea, FALSE);
-        }
-        if (mDrawingarea) {
-            moz_drawingarea_set_visibility(mDrawingarea, FALSE);
+            gdk_window_hide(mGdkWindow);
+        }
+        if (mGdkWindow) {
+            gdk_window_hide(mGdkWindow);

Shouldn't that be "else if (mGdkWindow)", matching the aAction true case?
Attachment #390625 - Flags: review?(roc) → review+
(In reply to comment #4)
> Shouldn't that be "else if (mGdkWindow)", matching the aAction true case?

Yes, it should.  That gets fixed up in attachment 390626 [details] [diff] [review].
Attached patch test_container changes (obsolete) — Splinter Review
test_container didn't build even without attachment 390625 [details] [diff] [review].
These changes are enough that test_container can be built and run, but the child widgets are not really visible because moz_container_allocate_child doesn't really do anything.  (Our only child widgets are plugin sockets which set their own size.)
Attachment #390754 - Flags: review?(roc)
Let's just remove test_container. It's not testing anything that isn't tested by all our other tests.
Attachment #390754 - Attachment is obsolete: true
Attachment #390754 - Flags: review?(roc)
Attachment #390755 - Flags: review?(roc)
Depends on: 509895
Depends on: 513630
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: