summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-29 15:50:23 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-29 15:50:23 +0000
commit0dbf657461ad991e09707c4ee7e1f9f3000903e4 (patch)
tree903966c840e9d56935cf8019444d6b3f14a6e7db
parentd43c374dc64085f100a65698d5b88387694c4232 (diff)
downloadchromium_src-0dbf657461ad991e09707c4ee7e1f9f3000903e4.zip
chromium_src-0dbf657461ad991e09707c4ee7e1f9f3000903e4.tar.gz
chromium_src-0dbf657461ad991e09707c4ee7e1f9f3000903e4.tar.bz2
Back to creating a new GC for each expose.
The style (or at least the GCs) are shared across widgets, so they shouldn't be modified, or should be restored. Creating a GC should be cheap enough, I was overthinking this. Review URL: http://codereview.chromium.org/100161 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14845 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
index c94b6e6..cb62cb5 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc
@@ -388,8 +388,7 @@ gboolean AutocompletePopupViewGtk::HandleExpose(GtkWidget* widget,
return TRUE;
GdkDrawable* drawable = GDK_DRAWABLE(event->window);
- // We don't actually care about the style, we just need a GC.
- GdkGC* gc = widget->style->black_gc;
+ GdkGC* gc = gdk_gc_new(drawable);
// kBorderColor is unallocated, so use the GdkRGB routine.
gdk_gc_set_rgb_fg_color(gc, &kBorderColor);