Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7732)

Unified Diff: chrome/common/gtk_util.cc

Issue 463056: GTK: hook up drag and drop of browser actions (for reordering).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/gtk_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/gtk_util.cc
===================================================================
--- chrome/common/gtk_util.cc (revision 34134)
+++ chrome/common/gtk_util.cc (working copy)
@@ -96,6 +96,22 @@
std::map<GdkCursorType, GdkCursor*> cursor_cache_;
};
+// Expose event handler for a container that simply suppresses the default
+// drawing and propagates the expose event to the container's children.
+gboolean PaintNoBackground(GtkWidget* widget,
+ GdkEventExpose* event,
+ gpointer unused) {
+ GList* children = gtk_container_get_children(GTK_CONTAINER(widget));
+ for (GList* item = children; item; item = item->next) {
+ gtk_container_propagate_expose(GTK_CONTAINER(widget),
+ GTK_WIDGET(item->data),
+ event);
+ }
+ g_list_free(children);
+
+ return TRUE;
+}
+
} // namespace
namespace event_utils {
@@ -619,4 +635,9 @@
}
}
+void SuppressDefaultPainting(GtkWidget* container) {
+ g_signal_connect(container, "expose-event",
+ G_CALLBACK(PaintNoBackground), NULL);
+}
+
} // namespace gtk_util
« no previous file with comments | « chrome/common/gtk_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698