Comment 32 for bug 885989

Revision history for this message
Alberts Muktupāvels (muktupavels) wrote :

"<alex> seb128: seems a bit simple to me, we don't want to construct a new object each time, rather we want one per screen"

I have 4 screens, wanted to know how many times constructor will be called with this patch. Added 2 lines to nautilus_desktop_background_constructor before return:

GdkScreen *screen = gtk_widget_get_screen(singleton->details->widget);
g_printerr("Desktop background constructed for screen %i!\n", gdk_screen_get_number(screen));

After building and installing new packages, when i run nautilus from terminal i got 4 lines:
Desktop background constructed for screen 0!
Desktop background constructed for screen 1!
Desktop background constructed for screen 2!
Desktop background constructed for screen 3!

So it seems that submitted patch already constructs new object only once per screen! Or am I missing something?