Merge lp:~fourdollars/unity-greeter/add-hidpi-support-for-utopic into lp:unity-greeter/14.10

Proposed by Shih-Yuan Lee on 2015-01-07
Status: Needs review
Proposed branch: lp:~fourdollars/unity-greeter/add-hidpi-support-for-utopic
Merge into: lp:unity-greeter/14.10
Diff against target: 84 lines (+33/-12)
1 file modified
src/unity-greeter.vala (+33/-12)
To merge this branch: bzr merge lp:~fourdollars/unity-greeter/add-hidpi-support-for-utopic
Reviewer Review Type Date Requested Status
Unity Greeter Development Team 2015-01-07 Pending
Review via email: mp+245711@code.launchpad.net

Description of the change

Waiting for the xsettings plugin of unity-settings-daemon. (LP: #1286878)

To post a comment you must log in.

Unmerged revisions

1346. By Shih-Yuan Lee on 2015-01-07

Waiting for the xsettings plugin of unity-settings-daemon. (LP: #1286878)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/unity-greeter.vala'
2--- src/unity-greeter.vala 2014-04-08 03:48:42 +0000
3+++ src/unity-greeter.vala 2015-01-07 07:46:27 +0000
4@@ -35,7 +35,7 @@
5
6 private Cairo.XlibSurface background_surface;
7
8- private SettingsDaemon settings_daemon;
9+ private static SettingsDaemon settings_daemon;
10
11 public bool orca_needs_kick;
12 private MainWindow main_window;
13@@ -74,12 +74,6 @@
14 if (!connected && !test_mode)
15 Posix.exit (Posix.EXIT_FAILURE);
16
17- if (!test_mode)
18- {
19- settings_daemon = new SettingsDaemon ();
20- settings_daemon.start ();
21- }
22-
23 var state_dir = Path.build_filename (Environment.get_user_cache_dir (), "unity-greeter");
24 DirUtils.create_with_parents (state_dir, 0775);
25
26@@ -487,7 +481,6 @@
27 warning ("Error starting the at-spi registry: %s", e.message);
28 }
29
30- Gtk.init (ref args);
31 Ido.init ();
32
33 log_timer = new Timer ();
34@@ -495,10 +488,6 @@
35
36 debug ("Starting unity-greeter %s UID=%d LANG=%s", Config.VERSION, (int) Posix.getuid (), Environment.get_variable ("LANG"));
37
38- /* Set the cursor to not be the crap default */
39- debug ("Setting cursor");
40- Gdk.get_default_root_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.LEFT_PTR));
41-
42 bool do_show_version = false;
43 bool do_test_mode = false;
44 OptionEntry versionOption = { "version", 'v', 0, OptionArg.NONE, ref do_show_version,
45@@ -535,7 +524,39 @@
46 }
47
48 if (do_test_mode)
49+ {
50 debug ("Running in test mode");
51+ }
52+ else
53+ {
54+ settings_daemon = new SettingsDaemon ();
55+ settings_daemon.start ();
56+
57+ var builder = new StringBuilder ();
58+ builder.append ("xwininfo -root -tree");
59+ builder.append ("| awk '{print $1}'");
60+ builder.append ("| grep ^0x");
61+ builder.append ("| while read id; do xprop -id $id; done");
62+ builder.append ("| grep _XSETTINGS_SETTINGS > /dev/null");
63+
64+ while (Posix.system(builder.str) != 0)
65+ {
66+ var loop = new MainLoop ();
67+ var time = new TimeoutSource (1000);
68+ time.set_callback (() => {
69+ loop.quit ();
70+ return false;
71+ });
72+ time.attach (loop.get_context ());
73+ loop.run ();
74+ }
75+ }
76+
77+ Gtk.init (ref args);
78+
79+ /* Set the cursor to not be the crap default */
80+ debug ("Setting cursor");
81+ Gdk.get_default_root_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.LEFT_PTR));
82
83 /* Set GTK+ settings */
84 debug ("Setting GTK+ settings");

Subscribers

People subscribed via source and target branches