~ubuntu-branches/ubuntu/precise/xsplash/precise

« back to all changes in this revision

Viewing changes to src/xsplash.c

  • Committer: Bazaar Package Importer
  • Author(s): Ken VanDine
  • Date: 2009-10-15 13:36:24 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20091015133624-beclkz6rhdzps8ey
Tags: 0.8.4-0ubuntu1
* New upstream version
  - Fix resolution setting to match desktop session after gdm (LP: #413348)
  - Fix top panel appearing above over xsplash (LP: #447084)
  - Fix broken logging (LP: #439268)

Show diffs side-by-side

added added

removed removed

Lines of Context:
579
579
      gtk_fixed_move (GTK_FIXED (priv->fixed),
580
580
                      priv->logo,
581
581
                      get_monitor_width () / 2 - gdk_pixbuf_get_width (priv->logo_pixbuf) / 2,
582
 
                      get_monitor_height () / 3 - gdk_pixbuf_get_height (priv->logo_pixbuf) / 2);;
 
582
                      get_monitor_height () / 3 - gdk_pixbuf_get_height (priv->logo_pixbuf) / 2);
583
583
    }
584
584
}
585
585
 
630
630
}
631
631
 
632
632
static void
633
 
monitors_changed (GdkScreen *screen,
 
633
image_size_changed (GdkScreen *screen,
634
634
                  gpointer   user_data)
635
635
{
636
 
  XsplashServer *server= (XsplashServer *)user_data;
 
636
  XsplashServer *server = (XsplashServer *)user_data;
637
637
 
638
638
  setup_background_image (server);
639
639
  setup_logo_image (server);
692
692
                    server);
693
693
  g_signal_connect (G_OBJECT (priv->screen),
694
694
                    "monitors-changed",
695
 
                    G_CALLBACK (monitors_changed),
 
695
                    G_CALLBACK (image_size_changed),
 
696
                    server);
 
697
  g_signal_connect (G_OBJECT (priv->screen),
 
698
                    "size-changed",
 
699
                    G_CALLBACK (image_size_changed),
696
700
                    server);
697
701
 
698
702
  g_signal_connect (priv->window,
759
763
                                      !gty_timeline_get_direction (timeline));
760
764
        }
761
765
    }
 
766
 
 
767
  gdk_window_raise (priv->window->window);
762
768
}
763
769
 
764
770
static void
997
1003
    }
998
1004
}
999
1005
 
1000
 
#define XSPLASH_LOG "/var/log/gdm/xsplash.log"
1001
 
 
1002
1006
int
1003
1007
main (int argc, char *argv[])
1004
1008
{
1008
1012
  DBusGConnection *system_bus;
1009
1013
  DBusGProxy      *bus_proxy;
1010
1014
  guint            nameret = 0;
 
1015
  gchar           *log_filename = NULL;
1011
1016
  struct passwd   *pwd;
1012
1017
 
1013
1018
  pwd = getpwnam (XSPLASH_USER);
1039
1044
      exit (1);
1040
1045
    }
1041
1046
 
 
1047
  log_filename = g_strdup_printf ("/var/log/gdm/xsplash-%s.log", gdm_session ? "gdm" : "user");
 
1048
  log_init (log_filename); g_message ("xsplash started");
 
1049
  g_free (log_filename);
 
1050
 
1042
1051
  gtk_init (&argc, &argv);
1043
1052
 
1044
 
  log_init (XSPLASH_LOG); g_message ("xsplash started");
1045
 
 
1046
1053
  signal (SIGHUP, sig_handler);
1047
1054
  signal (SIGINT, sig_handler);
1048
1055
  signal (SIGTERM, sig_handler);
1119
1126
                                gchar          *waitfor,
1120
1127
                                GError        **error)
1121
1128
{
 
1129
  XsplashServerPrivate *priv = XSPLASH_SERVER_GET_PRIVATE (server);
 
1130
 
1122
1131
  g_message ("received a new signal to wait for: %s", waitfor);
1123
1132
 
1124
1133
  if (waitfor)
1126
1135
      add_signal (waitfor);
1127
1136
    }
1128
1137
 
 
1138
  gdk_window_raise (priv->window->window);
 
1139
 
1129
1140
  return TRUE;
1130
1141
}
1131
1142