Hi, I’m proposing the attached change to GTK+ in lenny. It fixes a very funny (but quite important) bug that prevents you from printing big documents (especially in evince) unless you keep moving your mouse.
Debdiff attached. Cheers, -- .''`. Josselin Mouette : :' : `. `' “A handshake with whitnesses is the same `- as a signed contact.” -- Jörg Schilling
diff -u gtk+2.0-2.12.12/debian/changelog gtk+2.0-2.12.12/debian/changelog --- gtk+2.0-2.12.12/debian/changelog +++ gtk+2.0-2.12.12/debian/changelog @@ -1,3 +1,10 @@ +gtk+2.0 (2.12.12-1~lenny2) stable-proposed-updates; urgency=low + + * 096_cups_mainloop_events.patch: stolen upstream. Fixes a very nasty + bug that prevents printing big documents. GNOME #591846, LP #359975. + + -- Josselin Mouette <j...@debian.org> Mon, 01 Feb 2010 15:19:03 +0100 + gtk+2.0 (2.12.12-1~lenny1) stable-proposed-updates; urgency=low [ Josselin Mouette ] diff -u gtk+2.0-2.12.12/debian/patches/series gtk+2.0-2.12.12/debian/patches/series --- gtk+2.0-2.12.12/debian/patches/series +++ gtk+2.0-2.12.12/debian/patches/series @@ -23,0 +24 @@ +096_cups_mainloop_events.patch only in patch2: unchanged: --- gtk+2.0-2.12.12.orig/debian/patches/096_cups_mainloop_events.patch +++ gtk+2.0-2.12.12/debian/patches/096_cups_mainloop_events.patch @@ -0,0 +1,103 @@ +From 3b336186ee4d55799f4290c672d6bccd787c70fa Mon Sep 17 00:00:00 2001 +From: Marek Kasik <mka...@redhat.com> +Date: Sun, 30 Aug 2009 01:32:01 +0000 +Subject: Add CUPS events as soon as possible when printing + +CUPS events are added in prepare part of the main loop. These +events are initialized before their addition (#434318, #586466). +--- +diff --git a/modules/printbackends/cups/gtkprintbackendcups.c b/modules/printbackends/cups/gtkprintbackendcups.c +index f84c920..e930980 100644 +--- a/modules/printbackends/cups/gtkprintbackendcups.c ++++ b/modules/printbackends/cups/gtkprintbackendcups.c +@@ -803,15 +803,11 @@ request_password (gpointer data) + return FALSE; + } + +-static gboolean +-cups_dispatch_watch_check (GSource *source) ++static void ++cups_dispatch_add_poll (GSource *source) + { + GtkPrintCupsDispatchWatch *dispatch; + GtkCupsPollState poll_state; +- gboolean result; +- +- GTK_NOTE (PRINTING, +- g_print ("CUPS Backend: %s <source %p>\n", G_STRFUNC, source)); + + dispatch = (GtkPrintCupsDispatchWatch *) source; + +@@ -820,26 +816,41 @@ cups_dispatch_watch_check (GSource *source) + if (dispatch->request->http != NULL) + { + if (dispatch->data_poll == NULL) +- { ++ { + dispatch->data_poll = g_new0 (GPollFD, 1); +- g_source_add_poll (source, dispatch->data_poll); +- } +- else +- { ++ + if (poll_state == GTK_CUPS_HTTP_READ) + dispatch->data_poll->events = G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI; + else if (poll_state == GTK_CUPS_HTTP_WRITE) + dispatch->data_poll->events = G_IO_OUT | G_IO_ERR; + else + dispatch->data_poll->events = 0; +- } + + #ifdef HAVE_CUPS_API_1_2 +- dispatch->data_poll->fd = httpGetFd (dispatch->request->http); ++ dispatch->data_poll->fd = httpGetFd (dispatch->request->http); + #else +- dispatch->data_poll->fd = dispatch->request->http->fd; ++ dispatch->data_poll->fd = dispatch->request->http->fd; + #endif ++ g_source_add_poll (source, dispatch->data_poll); ++ } + } ++} ++ ++static gboolean ++cups_dispatch_watch_check (GSource *source) ++{ ++ GtkPrintCupsDispatchWatch *dispatch; ++ GtkCupsPollState poll_state; ++ gboolean result; ++ ++ GTK_NOTE (PRINTING, ++ g_print ("CUPS Backend: %s <source %p>\n", G_STRFUNC, source)); ++ ++ dispatch = (GtkPrintCupsDispatchWatch *) source; ++ ++ poll_state = gtk_cups_request_get_poll_state (dispatch->request); ++ ++ cups_dispatch_add_poll (source); + + if (poll_state != GTK_CUPS_HTTP_IDLE && !dispatch->request->need_password) + if (!(dispatch->data_poll->revents & dispatch->data_poll->events)) +@@ -868,6 +879,7 @@ cups_dispatch_watch_prepare (GSource *source, + gint *timeout_) + { + GtkPrintCupsDispatchWatch *dispatch; ++ gboolean result; + + dispatch = (GtkPrintCupsDispatchWatch *) source; + +@@ -876,7 +888,11 @@ cups_dispatch_watch_prepare (GSource *source, + + *timeout_ = -1; + +- return gtk_cups_request_read_write (dispatch->request); ++ result = gtk_cups_request_read_write (dispatch->request); ++ ++ cups_dispatch_add_poll (source); ++ ++ return result; + } + + static gboolean +-- +cgit v0.8.3.1