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

Proposed by Shih-Yuan Lee
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 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

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
=== modified file 'src/unity-greeter.vala'
--- src/unity-greeter.vala 2014-04-08 03:48:42 +0000
+++ src/unity-greeter.vala 2015-01-07 07:46:27 +0000
@@ -35,7 +35,7 @@
3535
36 private Cairo.XlibSurface background_surface;36 private Cairo.XlibSurface background_surface;
3737
38 private SettingsDaemon settings_daemon;38 private static SettingsDaemon settings_daemon;
3939
40 public bool orca_needs_kick;40 public bool orca_needs_kick;
41 private MainWindow main_window;41 private MainWindow main_window;
@@ -74,12 +74,6 @@
74 if (!connected && !test_mode)74 if (!connected && !test_mode)
75 Posix.exit (Posix.EXIT_FAILURE);75 Posix.exit (Posix.EXIT_FAILURE);
7676
77 if (!test_mode)
78 {
79 settings_daemon = new SettingsDaemon ();
80 settings_daemon.start ();
81 }
82
83 var state_dir = Path.build_filename (Environment.get_user_cache_dir (), "unity-greeter");77 var state_dir = Path.build_filename (Environment.get_user_cache_dir (), "unity-greeter");
84 DirUtils.create_with_parents (state_dir, 0775);78 DirUtils.create_with_parents (state_dir, 0775);
85 79
@@ -487,7 +481,6 @@
487 warning ("Error starting the at-spi registry: %s", e.message);481 warning ("Error starting the at-spi registry: %s", e.message);
488 }482 }
489483
490 Gtk.init (ref args);
491 Ido.init ();484 Ido.init ();
492485
493 log_timer = new Timer ();486 log_timer = new Timer ();
@@ -495,10 +488,6 @@
495488
496 debug ("Starting unity-greeter %s UID=%d LANG=%s", Config.VERSION, (int) Posix.getuid (), Environment.get_variable ("LANG"));489 debug ("Starting unity-greeter %s UID=%d LANG=%s", Config.VERSION, (int) Posix.getuid (), Environment.get_variable ("LANG"));
497490
498 /* Set the cursor to not be the crap default */
499 debug ("Setting cursor");
500 Gdk.get_default_root_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.LEFT_PTR));
501
502 bool do_show_version = false;491 bool do_show_version = false;
503 bool do_test_mode = false;492 bool do_test_mode = false;
504 OptionEntry versionOption = { "version", 'v', 0, OptionArg.NONE, ref do_show_version,493 OptionEntry versionOption = { "version", 'v', 0, OptionArg.NONE, ref do_show_version,
@@ -535,7 +524,39 @@
535 }524 }
536525
537 if (do_test_mode)526 if (do_test_mode)
527 {
538 debug ("Running in test mode");528 debug ("Running in test mode");
529 }
530 else
531 {
532 settings_daemon = new SettingsDaemon ();
533 settings_daemon.start ();
534
535 var builder = new StringBuilder ();
536 builder.append ("xwininfo -root -tree");
537 builder.append ("| awk '{print $1}'");
538 builder.append ("| grep ^0x");
539 builder.append ("| while read id; do xprop -id $id; done");
540 builder.append ("| grep _XSETTINGS_SETTINGS > /dev/null");
541
542 while (Posix.system(builder.str) != 0)
543 {
544 var loop = new MainLoop ();
545 var time = new TimeoutSource (1000);
546 time.set_callback (() => {
547 loop.quit ();
548 return false;
549 });
550 time.attach (loop.get_context ());
551 loop.run ();
552 }
553 }
554
555 Gtk.init (ref args);
556
557 /* Set the cursor to not be the crap default */
558 debug ("Setting cursor");
559 Gdk.get_default_root_window ().set_cursor (new Gdk.Cursor (Gdk.CursorType.LEFT_PTR));
539560
540 /* Set GTK+ settings */561 /* Set GTK+ settings */
541 debug ("Setting GTK+ settings");562 debug ("Setting GTK+ settings");

Subscribers

People subscribed via source and target branches