~macslow/gnome-settings-daemon/ubuntu

« back to all changes in this revision

Viewing changes to debian/patches/40_xres_lcddefault.patch

  • Committer: seb128
  • Date: 2009-05-11 15:51:42 UTC
  • Revision ID: seb128@seb128-laptop-20090511155142-rjzv0utaxz5ek5e4
Tags: 2.27.1-0ubuntu1
releasing version 2.27.1-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -Nur -x '*.orig' -x '*~' gnome-settings-daemon-2.26.0/plugins/xsettings/gsd-xsettings-manager.c gnome-settings-daemon-2.26.0.new/plugins/xsettings/gsd-xsettings-manager.c
 
2
--- gnome-settings-daemon-2.26.0/plugins/xsettings/gsd-xsettings-manager.c      2008-12-31 00:54:17.000000000 +0100
 
3
+++ gnome-settings-daemon-2.26.0.new/plugins/xsettings/gsd-xsettings-manager.c  2009-04-06 20:09:46.000000000 +0200
 
4
@@ -293,6 +293,9 @@
 
5
         int         dpi;
 
6
         const char *rgba;
 
7
         const char *hintstyle;
 
8
+
 
9
+       /* priv helper for OOO lcdfilter */
 
10
+       gboolean use_rgba;
 
11
 } GnomeXftSettings;
 
12
 
 
13
 static const char *rgba_types[] = { "rgb", "bgr", "vbgr", "vrgb" };
 
14
@@ -319,6 +322,7 @@
 
15
         settings->hintstyle = "hintfull";
 
16
         settings->dpi = dpi * 1024; /* Xft wants 1/1024ths of an inch */
 
17
         settings->rgba = "rgb";
 
18
+        settings->use_rgba = FALSE;
 
19
 
 
20
         if (rgba_order) {
 
21
                 int i;
 
22
@@ -357,7 +361,6 @@
 
23
         }
 
24
 
 
25
         if (antialiasing) {
 
26
-                gboolean use_rgba = FALSE;
 
27
 
 
28
                 if (strcmp (antialiasing, "none") == 0) {
 
29
                         settings->antialias = 0;
 
30
@@ -365,13 +368,13 @@
 
31
                         settings->antialias = 1;
 
32
                 } else if (strcmp (antialiasing, "rgba") == 0) {
 
33
                         settings->antialias = 1;
 
34
-                        use_rgba = TRUE;
 
35
+                        settings->use_rgba = TRUE;
 
36
                 } else {
 
37
                         g_warning ("Invalid value for " FONT_ANTIALIASING_KEY " : '%s'",
 
38
                                    antialiasing);
 
39
                 }
 
40
 
 
41
-                if (!use_rgba) {
 
42
+                if (!settings->use_rgba) {
 
43
                         settings->rgba = "none";
 
44
                 }
 
45
         }
 
46
@@ -395,6 +398,7 @@
 
47
                 xsettings_manager_set_string (manager->priv->managers [i], "Xft/HintStyle", settings->hintstyle);
 
48
                 xsettings_manager_set_int (manager->priv->managers [i], "Xft/DPI", settings->dpi);
 
49
                 xsettings_manager_set_string (manager->priv->managers [i], "Xft/RGBA", settings->rgba);
 
50
+                xsettings_manager_set_string (manager->priv->managers [i], "Xft/lcdfilter", settings->use_rgba ? "lcddefault" : "none");
 
51
         }
 
52
         gnome_settings_profile_end (NULL);
 
53
 }
 
54
@@ -510,6 +514,10 @@
 
55
                                 "Xft.rgba: %s\n",
 
56
                                 settings->rgba);
 
57
 
 
58
+        g_string_append_printf (add_string,
 
59
+                                "Xft.lcdfilter: %s\n",
 
60
+                                settings->use_rgba ? "lcddefault" : "none");
 
61
+
 
62
         spawn_with_input (command, add_string->str);
 
63
 
 
64
         g_string_free (add_string, TRUE);