- Save root window in XSETROOTID property for transition
This commit is contained in:
parent
aa6967bdf2
commit
2e5fb932ea
117
gdm-2.23.92-save-root-window.patch
Normal file
117
gdm-2.23.92-save-root-window.patch
Normal file
@ -0,0 +1,117 @@
|
||||
diff -up gdm-2.23.92/daemon/gdm-simple-slave.c.save-root-window gdm-2.23.92/daemon/gdm-simple-slave.c
|
||||
--- gdm-2.23.92/daemon/gdm-simple-slave.c.save-root-window 2008-09-03 16:52:53.000000000 -0400
|
||||
+++ gdm-2.23.92/daemon/gdm-simple-slave.c 2008-09-16 15:29:15.000000000 -0400
|
||||
@@ -825,6 +825,15 @@ setup_server (GdmSimpleSlave *slave)
|
||||
{
|
||||
/* Set the busy cursor */
|
||||
gdm_slave_set_busy_cursor (GDM_SLAVE (slave));
|
||||
+
|
||||
+ /* The root window has a background that may be useful
|
||||
+ * to cross fade or transition from when setting the
|
||||
+ * login screen background. We read it here, and stuff
|
||||
+ * it into the standard _XSETROOT_ID root window property,
|
||||
+ * so gnome-settings-daemon can get at it.
|
||||
+ */
|
||||
+ gdm_slave_save_root_windows (GDM_SLAVE (slave));
|
||||
+
|
||||
}
|
||||
|
||||
static void
|
||||
diff -up gdm-2.23.92/daemon/gdm-slave.c.save-root-window gdm-2.23.92/daemon/gdm-slave.c
|
||||
--- gdm-2.23.92/daemon/gdm-slave.c.save-root-window 2008-08-26 15:04:00.000000000 -0400
|
||||
+++ gdm-2.23.92/daemon/gdm-slave.c 2008-09-16 15:39:18.000000000 -0400
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <dbus/dbus-glib-lowlevel.h>
|
||||
|
||||
#include <X11/Xlib.h> /* for Display */
|
||||
+#include <X11/Xatom.h> /* for XA_PIXMAP */
|
||||
#include <X11/cursorfont.h> /* for watch cursor */
|
||||
|
||||
#include "gdm-common.h"
|
||||
@@ -341,6 +342,75 @@ gdm_slave_run_script (GdmSlave *slave,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static void
|
||||
+gdm_slave_save_root_window_of_screen (GdmSlave *slave,
|
||||
+ Atom id_atom,
|
||||
+ int screen_number)
|
||||
+{
|
||||
+ Window root_window;
|
||||
+ GC gc;
|
||||
+ XGCValues values;
|
||||
+ Pixmap pixmap;
|
||||
+ int width, height, depth;
|
||||
+
|
||||
+ root_window = RootWindow (slave->priv->server_display,
|
||||
+ screen_number);
|
||||
+
|
||||
+ width = DisplayWidth (slave->priv->server_display, screen_number);
|
||||
+ height = DisplayHeight (slave->priv->server_display, screen_number);
|
||||
+ depth = DefaultDepth (slave->priv->server_display, screen_number);
|
||||
+ pixmap = XCreatePixmap (slave->priv->server_display,
|
||||
+ root_window,
|
||||
+ width, height, depth);
|
||||
+
|
||||
+ values.function = GXcopy;
|
||||
+ values.plane_mask = AllPlanes;
|
||||
+ values.fill_style = FillSolid;
|
||||
+ values.subwindow_mode = IncludeInferiors;
|
||||
+
|
||||
+ gc = XCreateGC (slave->priv->server_display,
|
||||
+ root_window,
|
||||
+ GCFunction | GCPlaneMask | GCFillStyle | GCSubwindowMode,
|
||||
+ &values);
|
||||
+
|
||||
+ if (XCopyArea (slave->priv->server_display,
|
||||
+ root_window, pixmap, gc, 0, 0,
|
||||
+ width, height, 0, 0)) {
|
||||
+
|
||||
+ long pixmap_as_long;
|
||||
+
|
||||
+ pixmap_as_long = (long) pixmap;
|
||||
+
|
||||
+ XChangeProperty (slave->priv->server_display,
|
||||
+ root_window, id_atom, XA_PIXMAP,
|
||||
+ 32, PropModeReplace, (guchar *) &pixmap_as_long,
|
||||
+ 1);
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ XFreeGC (slave->priv->server_display, gc);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+gdm_slave_save_root_windows (GdmSlave *slave)
|
||||
+{
|
||||
+ int i, number_of_screens;
|
||||
+ Atom atom;
|
||||
+
|
||||
+ number_of_screens = ScreenCount (slave->priv->server_display);
|
||||
+
|
||||
+ atom = XInternAtom (slave->priv->server_display,
|
||||
+ "_XSETROOT_ID", False);
|
||||
+
|
||||
+ if (atom == 0) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ for (i = 0; i < number_of_screens; i++) {
|
||||
+ gdm_slave_save_root_window_of_screen (slave, atom, i);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void
|
||||
gdm_slave_set_busy_cursor (GdmSlave *slave)
|
||||
{
|
||||
diff -up gdm-2.23.92/daemon/gdm-slave.h.save-root-window gdm-2.23.92/daemon/gdm-slave.h
|
||||
--- gdm-2.23.92/daemon/gdm-slave.h.save-root-window 2008-08-26 15:04:00.000000000 -0400
|
||||
+++ gdm-2.23.92/daemon/gdm-slave.h 2008-09-16 15:29:15.000000000 -0400
|
||||
@@ -69,6 +69,7 @@ gboolean gdm_slave_switch_to_
|
||||
|
||||
gboolean gdm_slave_connect_to_x11_display (GdmSlave *slave);
|
||||
void gdm_slave_set_busy_cursor (GdmSlave *slave);
|
||||
+void gdm_slave_save_root_windows (GdmSlave *slave);
|
||||
gboolean gdm_slave_run_script (GdmSlave *slave,
|
||||
const char *dir,
|
||||
const char *username);
|
7
gdm.spec
7
gdm.spec
@ -16,7 +16,7 @@
|
||||
Summary: The GNOME Display Manager
|
||||
Name: gdm
|
||||
Version: 2.23.92
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Epoch: 1
|
||||
License: GPLv2+
|
||||
Group: User Interface/X
|
||||
@ -80,6 +80,7 @@ BuildRequires: libxklavier-devel
|
||||
Requires: audit-libs >= %{libauditver}
|
||||
Patch1: xkb-groups.patch
|
||||
Patch2: gdm-2.23.92-force-active-vt.patch
|
||||
Patch3: gdm-2.23.92-save-root-window.patch
|
||||
|
||||
# Fedora-specific
|
||||
Patch99: gdm-2.23.1-fedora-logo.patch
|
||||
@ -103,6 +104,7 @@ multiple simulanteous logged in users.
|
||||
%setup -q
|
||||
%patch1 -p1 -b .xkb-groups
|
||||
%patch2 -p1 -b .force-active-vt
|
||||
%patch3 -p1 -b .save-root-window
|
||||
%patch99 -p1 -b .fedora-logo
|
||||
|
||||
autoreconf
|
||||
@ -304,6 +306,9 @@ fi
|
||||
%{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
|
||||
|
||||
%changelog
|
||||
* Tue Sep 16 2008 Ray Strode <rstrode@redhat.com> - 1:2.23.92-5
|
||||
- Save root window in XSETROOTID property for transition
|
||||
|
||||
* Fri Sep 12 2008 Ray Strode <rstrode@redhat.com> - 1:2.23.92-4
|
||||
- Fix bug in last patch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user