void-packages/srcpkgs/gnome-settings-daemon-compat/patches/draw-background-unconditionally.patch

162 lines
5.3 KiB
Diff

diff -Naur gnome-settings-daemon-3.6.4.orig/plugins/background/gsd-background-manager.c gnome-settings-daemon-3.6.4/plugins/background/gsd-background-manager.c
--- gnome-settings-daemon-3.6.4.orig/plugins/background/gsd-background-manager.c 2013-01-10 14:37:58.000000000 +0100
+++ gnome-settings-daemon-3.6.4/plugins/background/gsd-background-manager.c 2013-04-10 16:33:15.858860586 +0200
@@ -69,110 +69,6 @@
static gpointer manager_object = NULL;
-static gboolean
-dont_draw_background (GsdBackgroundManager *manager)
-{
- return !g_settings_get_boolean (manager->priv->settings,
- "draw-background");
-}
-
-static gboolean
-nautilus_is_drawing_background (GsdBackgroundManager *manager)
-{
- Atom window_id_atom;
- Window nautilus_xid;
- Atom actual_type;
- int actual_format;
- unsigned long nitems;
- unsigned long bytes_after;
- unsigned char *data;
- Atom wmclass_atom;
- gboolean running;
- gint error;
- gboolean show_desktop_icons;
-
- show_desktop_icons = g_settings_get_boolean (manager->priv->settings,
- "show-desktop-icons");
- if (! show_desktop_icons) {
- return FALSE;
- }
-
- window_id_atom = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
- "NAUTILUS_DESKTOP_WINDOW_ID", True);
-
- if (window_id_atom == None) {
- return FALSE;
- }
-
- XGetWindowProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
- GDK_ROOT_WINDOW (),
- window_id_atom,
- 0,
- 1,
- False,
- XA_WINDOW,
- &actual_type,
- &actual_format,
- &nitems,
- &bytes_after,
- &data);
-
- if (data != NULL) {
- nautilus_xid = *(Window *) data;
- XFree (data);
- } else {
- return FALSE;
- }
-
- if (actual_type != XA_WINDOW) {
- return FALSE;
- }
- if (actual_format != 32) {
- return FALSE;
- }
-
- wmclass_atom = XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), "WM_CLASS", False);
-
- gdk_error_trap_push ();
-
- XGetWindowProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
- nautilus_xid,
- wmclass_atom,
- 0,
- 24,
- False,
- XA_STRING,
- &actual_type,
- &actual_format,
- &nitems,
- &bytes_after,
- &data);
-
- error = gdk_error_trap_pop ();
-
- if (error == BadWindow) {
- return FALSE;
- }
-
- if (actual_type == XA_STRING &&
- nitems == 24 &&
- bytes_after == 0 &&
- actual_format == 8 &&
- data != NULL &&
- !strcmp ((char *)data, "desktop_window") &&
- !strcmp ((char *)data + strlen ((char *)data) + 1, "Nautilus")) {
- running = TRUE;
- } else {
- running = FALSE;
- }
-
- if (data != NULL) {
- XFree (data);
- }
-
- return running;
-}
-
static void
on_crossfade_finished (GsdBackgroundManager *manager)
{
@@ -189,11 +85,6 @@
int i;
- if (nautilus_is_drawing_background (manager) ||
- dont_draw_background (manager)) {
- return;
- }
-
gnome_settings_profile_start (NULL);
display = gdk_display_get_default ();
@@ -408,8 +299,7 @@
const char *key,
GsdBackgroundManager *manager)
{
- if (dont_draw_background (manager) == FALSE)
- setup_bg_and_draw_background (manager);
+ setup_bg_and_draw_background (manager);
}
gboolean
@@ -422,24 +312,8 @@
gnome_settings_profile_start (NULL);
manager->priv->settings = g_settings_new ("org.gnome.desktop.background");
- g_signal_connect (manager->priv->settings, "changed::draw-background",
- G_CALLBACK (draw_background_changed), manager);
- /* If this is set, nautilus will draw the background and is
- * almost definitely in our session. however, it may not be
- * running yet (so is_nautilus_running() will fail). so, on
- * startup, just don't do anything if this key is set so we
- * don't waste time setting the background only to have
- * nautilus overwrite it.
- */
- show_desktop_icons = g_settings_get_boolean (manager->priv->settings,
- "show-desktop-icons");
-
- if (!show_desktop_icons) {
- setup_bg (manager);
- } else {
- draw_background_after_session_loads (manager);
- }
+ setup_bg (manager);
gnome_settings_profile_end (NULL);