Package: gtk-qt-engine
Severity: important
Tags: patch

Hello.

gtk-gt-engine's focus drawing routine re-draws background, and it prevents 
Firefox 3 from displaying some widgets normally (e.g., checkboxes and 
radiobuttons embedded into html).

This patch fixes this behaviour.

P.S. See also https://bugzilla.mozilla.org/show_bug.cgi?id=424367

-- 
WBR, Andrew
--- gtk-qt-engine-0.8.orig/src/qt_qt_wrapper.cpp	2008-06-07 00:05:35.000000000 +0300
+++ gtk-qt-engine-0.8/src/qt_qt_wrapper.cpp	2008-06-07 00:07:10.000000000 +0300
@@ -1720,7 +1720,6 @@
 	gdk_draw_drawable(window, style->bg_gc[state], pix, 0, 0, x, y, w, h);
 	g_object_unref(pix);
 }
-
 void drawFocusRect(GdkWindow * window, GtkStyle * style, int x, int y, int w, int h)
 {
 	if (!gtkQtEnable)
@@ -1733,10 +1732,10 @@
 	QPainter painter(&pixmap);
 	QColor bg(qApp->palette().active().background());
 
-	painter.fillRect(0,0,w,h,bg);
+	GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
+	gdk_draw_drawable(pix, style->bg_gc[GTK_STATE_NORMAL], window, x, y, 0, 0, w, h);
 	qApp->style().drawPrimitive(QStyle::PE_FocusRect, &painter, QRect(0,0,w,h), qApp->palette().active(), QStyle::Style_Default, QStyleOption(bg));
 
-	GdkPixmap* pix = gdk_pixmap_foreign_new(pixmap.handle());
 	gdk_draw_drawable(window, style->bg_gc[GTK_STATE_NORMAL], pix, 0, 0, x, y, w, h);
 	g_object_unref(pix);
 }

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to