15123
|
1 |
diff -rup -x '*.orig' -x '*.rej' -x '*.*~' gnome-session-2.25.91/splash/gnome-session-splash.c ../gnome-session-2.25.91/splash/gnome-session-splash.c
|
|
2 |
--- gnome-session-2.25.91/splash/gnome-session-splash.c 2009-02-17 17:52:31.574130870 +0100
|
|
3 |
+++ ../gnome-session-2.25.91/splash/gnome-session-splash.c 2009-02-17 17:52:10.834139948 +0100
|
|
4 |
@@ -270,8 +270,29 @@ setup_splash_window (void)
|
13113
|
5 |
GsmSplashWindow *splash;
|
|
6 |
GdkPixbuf *background;
|
12752
|
7 |
|
13113
|
8 |
+ display = gdk_display_get_default ();
|
|
9 |
+ screen = gdk_display_get_default_screen (display);
|
12752
|
10 |
+
|
13113
|
11 |
/* Create the splash window */
|
|
12 |
background = load_splash_pixbuf ();
|
|
13 |
+
|
|
14 |
+ if (gdk_pixbuf_get_width (background) > gdk_screen_get_width (screen))
|
|
15 |
+ {
|
|
16 |
+ GdkPixbuf *center = NULL;
|
|
17 |
+ int width = gdk_screen_get_width (screen);
|
|
18 |
+ int height = gdk_screen_get_height (screen);
|
|
19 |
+ int x_offset = (gdk_pixbuf_get_width (background) - width) / 2;
|
|
20 |
+ int y_offset = (gdk_pixbuf_get_height (background) - height) / 2;
|
|
21 |
+
|
|
22 |
+ center = gdk_pixbuf_new_subpixbuf (background,
|
|
23 |
+ x_offset,
|
|
24 |
+ y_offset,
|
|
25 |
+ width,
|
|
26 |
+ height);
|
|
27 |
+ g_object_unref (background);
|
|
28 |
+ background = center;
|
|
29 |
+ }
|
|
30 |
+
|
|
31 |
splash_widget = gsm_splash_window_new (background);
|
|
32 |
splash = (GsmSplashWindow *)splash_widget;
|
15123
|
33 |
if (background)
|
16501
|
34 |
--- gnome-session-2.27.91/splash/splash-window.c.ori 2009-09-09 04:43:59.062657500 +0100
|
|
35 |
+++ gnome-session-2.27.91/splash/splash-window.c 2009-09-09 04:50:16.324625800 +0100
|
|
36 |
@@ -116,10 +116,8 @@
|
12752
|
37 |
|
13113
|
38 |
pango_layout_get_pixel_extents (splash->layout, NULL, &pixel_rect);
|
12752
|
39 |
|
13113
|
40 |
- splash->text_box.x = (allocation->x + allocation->width / 2 -
|
|
41 |
- pixel_rect.width / 2);
|
|
42 |
- splash->text_box.y = (allocation->y + allocation->height -
|
|
43 |
- pixel_rect.height - SPLASH_LABEL_V_OFFSET);
|
|
44 |
+ splash->text_box.x = (gdk_pixbuf_get_width (splash->background) / 2) - (pixel_rect.width / 2);
|
|
45 |
+ splash->text_box.y = (gdk_pixbuf_get_height (splash->background) / 2) - (pixel_rect.height / 2) + 66;
|
|
46 |
splash->text_box.width = pixel_rect.width + 1;
|
|
47 |
splash->text_box.height = pixel_rect.height + 1;
|
12752
|
48 |
}
|
16501
|
49 |
@@ -137,7 +135,7 @@
|
13113
|
50 |
return FALSE;
|
|
51 |
}
|
12752
|
52 |
|
13113
|
53 |
- for (l = splash->icons; l; l = l->next) {
|
|
54 |
+/* for (l = splash->icons; l; l = l->next) {
|
|
55 |
SplashIcon *si = l->data;
|
12752
|
56 |
|
13113
|
57 |
if (gdk_rectangle_intersect (&event->area,
|
16501
|
58 |
@@ -154,24 +152,24 @@
|
15123
|
59 |
GDK_RGB_DITHER_MAX,
|
|
60 |
exposed.x, exposed.y);
|
13113
|
61 |
}
|
|
62 |
- }
|
|
63 |
+ } */
|
12752
|
64 |
|
13577
|
65 |
+/*
|
13113
|
66 |
if (splash->layout) {
|
|
67 |
calc_text_box (splash);
|
13577
|
68 |
if (gdk_rectangle_intersect (&event->area, &splash->text_box, &exposed)) {
|
|
69 |
- /* drop shadow */
|
16501
|
70 |
gdk_draw_layout (gtk_widget_get_window (widget),
|
|
71 |
style->black_gc,
|
13577
|
72 |
splash->text_box.x + 1, splash->text_box.y + 1,
|
|
73 |
splash->layout);
|
|
74 |
|
|
75 |
- /* text */
|
16501
|
76 |
gdk_draw_layout (gtk_widget_get_window (widget),
|
|
77 |
style->white_gc,
|
13577
|
78 |
splash->text_box.x, splash->text_box.y,
|
|
79 |
splash->layout);
|
|
80 |
}
|
|
81 |
}
|
|
82 |
+*/
|
|
83 |
|
|
84 |
return FALSE;
|
|
85 |
}
|
16501
|
86 |
@@ -483,8 +481,8 @@
|
12752
|
87 |
|
13113
|
88 |
/* re-draw the old text extents */
|
|
89 |
gtk_widget_queue_draw_area (GTK_WIDGET (splash),
|
|
90 |
- splash->text_box.x, splash->text_box.y,
|
|
91 |
- splash->text_box.width, splash->text_box.height);
|
|
92 |
+ splash->text_box.x - 10, splash->text_box.y,
|
|
93 |
+ splash->text_box.width + 10, splash->text_box.height);
|
|
94 |
|
|
95 |
g_free (splash->cur_text);
|
|
96 |
splash->cur_text = g_strdup (app_name);
|