diff options
author | Clement Lefebvre <clement.lefebvre@linuxmint.com> | 2017-06-20 15:42:34 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-06-20 15:52:36 +0200 |
commit | 31ce82f151b564532211e05e97ffaf1db02abdcd (patch) | |
tree | b1cba8263e48e73a160f4495569a61a92610e6fc /src | |
parent | d14e5d872a308990140f677dd718807311984fa7 (diff) | |
download | arctica-greeter-31ce82f151b564532211e05e97ffaf1db02abdcd.tar.gz arctica-greeter-31ce82f151b564532211e05e97ffaf1db02abdcd.tar.bz2 arctica-greeter-31ce82f151b564532211e05e97ffaf1db02abdcd.zip |
Don't draw the background before starting the session.
Drawing the background on the root window causes the following issues:
- The settings daemon sets the DE resolution and that can break the
aspect of the background
- Depending on configuration and distros, the background rendered by
the greeter may or may not be the same as the users's.
- Some DEs such as Cinnamon render a login animation, which looks good
on a black screen but not when a background is drawn.
Potential for regression:
Minimal DEs and WM should be tested to ensure the default state of the
root window is OK. We might have to clear that window or explicitly
paint it black (or the background color chosen by the user).
Diffstat (limited to 'src')
-rw-r--r-- | src/arctica-greeter.vala | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala index 5048bf9..0369eb7 100644 --- a/src/arctica-greeter.vala +++ b/src/arctica-greeter.vala @@ -230,18 +230,11 @@ public class ArcticaGreeter public bool start_session (string? session, Background bg) { /* Explicitly set the right scale before closing window */ - var screen = Gdk.Screen.get_default (); var display = Gdk.Display.get_default(); var monitor = display.get_primary_monitor(); var scale = monitor.get_scale_factor (); background_surface.set_device_scale (scale, scale); - /* Paint our background onto the root window before we close our own window */ - var c = new Cairo.Context (background_surface); - bg.draw_full (c, Background.DrawFlags.NONE); - c = null; - refresh_background (screen, background_surface); - main_window.before_session_start(); if (test_mode) @@ -500,22 +493,6 @@ public class ArcticaGreeter return surface; } - private static void refresh_background (Gdk.Screen screen, Cairo.XlibSurface surface) - { - Gdk.flush (); - - unowned X.Display display = (screen.get_display () as Gdk.X11.Display).get_xdisplay (); - - /* Ensure Cairo has actually finished its drawing */ - surface.flush (); - /* Use this pixmap for the background */ - X.SetWindowBackgroundPixmap (display, - (screen.get_root_window () as Gdk.X11.Window).get_xid (), - surface.get_drawable ()); - - X.ClearWindow (display, (screen.get_root_window () as Gdk.X11.Window).get_xid ()); - } - private static void log_cb (string? log_domain, LogLevelFlags log_level, string message) { string prefix; |