diff -Nru lxdm-0.3.0/debian/changelog lxdm-0.3.0/debian/changelog --- lxdm-0.3.0/debian/changelog 2011-03-16 18:28:50.000000000 +0000 +++ lxdm-0.3.0/debian/changelog 2011-03-17 19:16:38.000000000 +0000 @@ -1,10 +1,10 @@ -lxdm (0.3.0-0ubuntu5~ppa5) maverick; urgency=low +lxdm (0.3.0-0ubuntu5~ppa8) maverick; urgency=low - * debian/patches/17_remove_expose.patch - - Remove expose-event which have a high CPU usage and bad behavior when - drawing the background. (LP: #733912, #703658) + * debian/patches/90_simple_expose.patch + - From upstream, re-work the expose-event callback which have a high CPU + usage and bad behavior when drawing the background. (LP: #733912, #703658) - -- Julien Lavergne Tue, 15 Mar 2011 17:04:38 +0100 + -- Julien Lavergne Thu, 17 Mar 2011 20:16:17 +0100 lxdm (0.3.0-0ubuntu4) natty; urgency=low diff -Nru lxdm-0.3.0/debian/patches/90_simple_expose.patch lxdm-0.3.0/debian/patches/90_simple_expose.patch --- lxdm-0.3.0/debian/patches/90_simple_expose.patch 1970-01-01 00:00:00.000000000 +0000 +++ lxdm-0.3.0/debian/patches/90_simple_expose.patch 2011-03-17 18:14:18.000000000 +0000 @@ -0,0 +1,48 @@ +From a568d0aa03e75fff2ca01fb3672fcd5e9ecba7a2 Mon Sep 17 00:00:00 2001 +From: dgod +Date: Fri, 18 Mar 2011 00:51:26 +0800 +Subject: [PATCH] use less cpu in gtk greeter by only repaint the invalid area and remove scale useless + +--- + src/greeter.c | 15 +++++---------- + 1 files changed, 5 insertions(+), 10 deletions(-) + +Index: lxdm-0.3.0/src/greeter.c +=================================================================== +--- lxdm-0.3.0.orig/src/greeter.c 2011-03-17 19:13:59.000000000 +0100 ++++ lxdm-0.3.0/src/greeter.c 2011-03-17 19:14:11.000000000 +0100 +@@ -441,6 +441,7 @@ + static gboolean on_expose(GtkWidget* widget, GdkEventExpose* evt, gpointer user_data) + { + cairo_t *cr; ++ GdkRectangle *r=&evt->area; + + #if GTK_CHECK_VERSION(2,18,0) + if(! gtk_widget_get_has_window(widget)) +@@ -453,22 +454,16 @@ + #else + cr = gdk_cairo_create(widget->window); + #endif +- if( bg_img ) ++ if(bg_img ) + { +- cairo_matrix_t matrix; +- double x = 0, y = 0, sx, sy; +- cairo_get_matrix(cr, &matrix); +- sx = (double)gdk_screen_width() / (double)gdk_pixbuf_get_width(bg_img); +- sy = (double)gdk_screen_height() / (double)gdk_pixbuf_get_height(bg_img); +- cairo_scale(cr, sx, sy); +- gdk_cairo_set_source_pixbuf(cr, bg_img, x, y); ++ gdk_cairo_set_source_pixbuf(cr, bg_img, 0, 0); ++ gdk_cairo_rectangle (cr,r); + cairo_paint(cr); +- cairo_set_matrix(cr, &matrix); + } + else + { + gdk_cairo_set_source_color(cr, &bg_color); +- cairo_rectangle( cr, 0, 0, gdk_screen_width(), gdk_screen_height() ); ++ gdk_cairo_rectangle (cr,r); + cairo_fill(cr); + } + cairo_destroy(cr); diff -Nru lxdm-0.3.0/debian/patches/series lxdm-0.3.0/debian/patches/series --- lxdm-0.3.0/debian/patches/series 2011-03-16 18:17:49.000000000 +0000 +++ lxdm-0.3.0/debian/patches/series 2011-03-17 18:14:09.000000000 +0000 @@ -2,5 +2,5 @@ lxdm.conf_greeter_path_fix.patch 15-path-replace.patch 16_gtk3_migration.patch -17_remove_expose.patch 80_translations.patch +90_simple_expose.patch