-
-
Save nachanon/7f1aff255e24eb01b4fd to your computer and use it in GitHub Desktop.
From: Nutchanon Wetchasit <nachanon@users.noreply.github.com> | |
Subject: Load user-configured background on password prompt display | |
Bug: https://github.com/mate-desktop/mate-screensaver/issues/55 | |
--- a/src/gs-manager.c | |
+++ b/src/gs-manager.c | |
@@ -1053,8 +1053,6 @@ | |
"changed", | |
G_CALLBACK (on_bg_changed), | |
manager); | |
- | |
- mate_bg_load_from_system_preferences (manager->priv->bg); | |
} | |
static void | |
@@ -1270,6 +1268,10 @@ | |
gs_window_set_background_pixmap (window, NULL); | |
#endif | |
} | |
+ else | |
+ { | |
+ mate_bg_load_from_preferences (manager->priv->bg); | |
+ } | |
screen = gs_window_get_screen (window); | |
width = gdk_screen_get_width (screen); |
Patch is great, a little enhancement from my side:
--- gs-manager.c 2014-09-28 21:37:31.000000000 +0200
+++ gs-manager.c 2015-09-19 21:53:35.000000000 +0200
@@ -1048,7 +1048,7 @@
G_CALLBACK (on_bg_changed),
manager);
- mate_bg_load_from_system_preferences (manager->priv->bg);
+ mate_bg_load_from_preferences (manager->priv->bg);
}
static void
@@ -1254,6 +1254,7 @@
GdkScreen *screen;
int width;
int height;
+ mate_bg_load_from_preferences (manager->priv->bg);
if (manager->priv->bg == NULL)
{
@@ -1951,7 +1952,9 @@
}
/* Find the GSWindow that contains the pointer */
+
window = find_window_at_pointer (manager);
+ apply_background_to_window (manager, window);
gs_window_request_unlock (window);
return TRUE;
This follows background changes after the screensaver was started (works even in locked state). The use case is pretty particular (but valid): the user has dynamic desktop wallpaper set.
@RedDot15: I don't know if you managed to figure it out... download the mate-screensaver_______.orig.tar.xz and mate-screensaver__________.debian.tar.gz files (replace the underscores with your version/distro dependent things). Create a directory where you will work. Untar into this directory the .orig.tar.gz file. You will have a mate-screensaver____ directory in your work directory, change into it. Untar here the debian.tar.gz. Then you can apply the patch. Then you run
dpkg-checkbuilddeps
this tells you what dev packages you need to install -- be careful here: xmlto brings latex with itself, you can skip it (and save one GB disk space). Then you run
dpkg-source --commit
(it will include this goodie in the debian.tar.gz), then
dpkg-buildpackage -us -uc -d
and there you go, the updated mate-screensaver packages are generated.
I hope I haven't forgot anything.
thanks krisek, i have never applied a patch before, i was way off... thanks again.
@ krisek
Is your improvement a replacement or should this work on top of origin patch?
I'm a bit confused about that you add bits at a place where it was removed in origin patch.
@krisek
I tried both versions but i think we want to use your improved version as rhel/centos are using a timing desktop bg (dynamic desktop wallpaper). Do you want to make a pull request?
how do i apply this in linux mint 17.2 mate?