Hello community,
here is the log from the commit of package gnome-screensaver
checked in at Fri May 4 00:09:06 CEST 2007.
--------
--- GNOME/gnome-screensaver/gnome-screensaver.changes 2007-04-12 01:41:52.000000000 +0200
+++ /mounts/work_src_done/STABLE/gnome-screensaver/gnome-screensaver.changes 2007-05-03 13:39:27.516048000 +0200
@@ -1,0 +2,6 @@
+Thu May 3 13:38:59 CEST 2007 - rodrigo@suse.de
+
+- Added patch from SLE10-SP1 to run xvkbd on the lock window (FATE
+ #300346)
+
+-------------------------------------------------------------------
New:
----
gnome-screensaver-xvkbd-on-lock.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gnome-screensaver.spec ++++++
--- /var/tmp/diff_new_pack.w19520/_old 2007-05-04 00:08:51.000000000 +0200
+++ /var/tmp/diff_new_pack.w19520/_new 2007-05-04 00:08:51.000000000 +0200
@@ -18,7 +18,7 @@
BuildRequires: dbus-1-devel dbus-1-glib
%endif
Version: 2.18.1
-Release: 1
+Release: 7
URL: http://www.gnome.org/
Group: System/GUI/GNOME
License: GNU General Public License (GPL)
@@ -27,6 +27,7 @@
Patch: gnome-screensaver-suse-pam.diff
# FIXME: This patch needs to be redone.
Patch6: gnome-screensaver-unlock-dialog-size.patch
+Patch7: gnome-screensaver-xvkbd-on-lock.patch
Autoreqprov: on
Requires: /sbin/unix2_chkpwd xscreensaver
Provides: %{name}-devel = %{version}-%{release}
@@ -55,6 +56,7 @@
%setup -q
%patch
# %patch6 -p1
+%patch7 -p1
%build
# gnome-common intltool are needed only here
@@ -117,6 +119,9 @@
#%dir %{_sysconfdir}/xdg/menus
%changelog
+* Thu May 03 2007 - rodrigo@suse.de
+- Added patch from SLE10-SP1 to run xvkbd on the lock window (FATE
+ [#300346])
* Wed Apr 11 2007 - maw@suse.de
- Update to version 2.18.1
- Fixes for bugzilla.gnome.org #424165 and #425550
++++++ gnome-screensaver-xvkbd-on-lock.patch ++++++
diff -upr gnome-screensaver-2.18.1-orig/src/gs-lock-plug.c gnome-screensaver-2.18.1/src/gs-lock-plug.c
--- gnome-screensaver-2.18.1-orig/src/gs-lock-plug.c 2007-02-24 15:35:42.000000000 +0100
+++ gnome-screensaver-2.18.1/src/gs-lock-plug.c 2007-05-03 13:13:55.000000000 +0200
@@ -23,6 +23,7 @@
#include "config.h"
#include
+#include
#include
#include
#include
@@ -98,6 +99,8 @@ struct GSLockPlugPrivate
guint response_idle_id;
GList *key_events;
+
+ GPid xvkbd_pid;
};
typedef struct _ResponseData ResponseData;
@@ -1555,6 +1558,21 @@ gs_lock_plug_init (GSLockPlug *plug)
g_signal_connect (plug, "delete_event", G_CALLBACK (delete_handler), NULL);
+ int status = system ("hal-find-by-property --key system.formfactor.subtype --string tabletpc");
+ if (WIFEXITED (status) && WEXITSTATUS (status) == 0) {
+ gchar **argv[] = { "/usr/X11R6/bin/xvkbd", "-always-on-top", "-compact", "-geometry", "-0-0", NULL };
+ GError *error = NULL;
+
+ if (!g_spawn_async (g_get_home_dir (), argv, NULL, 0, NULL, NULL,
+ &plug->priv->xvkbd_pid, &error)) {
+ g_warning ("Could not spawn xvkbd: %s\n", error->message);
+ g_error_free (error);
+
+ plug->priv->xvkbd_pid = -1;
+ }
+ } else
+ plug->priv->xvkbd_pid = -1;
+
gs_profile_end (NULL);
}
@@ -1570,6 +1588,11 @@ gs_lock_plug_finalize (GObject *object)
g_return_if_fail (plug->priv != NULL);
+ if (plug->priv->xvkbd_pid != -1) {
+ kill (plug->priv->xvkbd_pid, 9);
+ plug->priv->xvkbd_pid = -1;
+ }
+
g_free (plug->priv->logout_command);
remove_response_idle (plug);
Only in gnome-screensaver-2.18.1/src: gs-lock-plug.c~
diff -upr gnome-screensaver-2.18.1-orig/src/gs-window-x11.c gnome-screensaver-2.18.1/src/gs-window-x11.c
--- gnome-screensaver-2.18.1-orig/src/gs-window-x11.c 2007-02-23 05:39:09.000000000 +0100
+++ gnome-screensaver-2.18.1/src/gs-window-x11.c 2007-05-03 13:17:14.000000000 +0200
@@ -618,6 +618,64 @@ x11_window_is_ours (Window window)
return ret;
}
+#define GET_DISPLAY gdk_x11_display_get_xdisplay (gdk_display_get_default ())
+
+static gboolean
+is_xvkbd_window (Window window)
+{
+ gboolean ret = FALSE;
+ XClassHint class_hint;
+
+ if (XGetClassHint (GET_DISPLAY, window, &class_hint) == Success) {
+ if (g_strstr_len (class_hint.res_name,
+ strlen (class_hint.res_name),
+ "xvkbd"))
+ ret = TRUE;
+ }
+
+ return ret;
+}
+
+static void
+setup_xvkbd_window (Window window)
+{
+ XWithdrawWindow (GET_DISPLAY, window, gdk_x11_get_default_screen ());
+ for(;;) {
+ Atom type;
+ int format;
+ unsigned long length, after;
+ unsigned char *data;
+ int r;
+
+ r = XGetWindowProperty (GET_DISPLAY,
+ window, XInternAtom (GET_DISPLAY, "WM_STATE", TRUE), 0, 2,
+ FALSE, AnyPropertyType, &type, &format,
+ &length, &after, &data );
+ gboolean withdrawn = TRUE;
+ if (r == Success && data && format == 32) {
+ guint32 *wstate = (guint32 *) data;
+ withdrawn = (*wstate == WithdrawnState );
+ XFree ((char *) data);
+ }
+ if (withdrawn)
+ break;
+ }
+
+ XSelectInput (GET_DISPLAY, window, StructureNotifyMask);
+ XWindowAttributes attr_geom;
+
+ if (!XGetWindowAttributes (GET_DISPLAY, window, &attr_geom ))
+ return;
+ int x = XDisplayWidth (GET_DISPLAY, gdk_x11_get_default_screen ()) - attr_geom.width;
+ int y = XDisplayHeight (GET_DISPLAY, gdk_x11_get_default_screen ()) - attr_geom.height;
+
+ XSetWindowAttributes attr;
+ attr.override_redirect = True;
+ XChangeWindowAttributes (GET_DISPLAY, window, CWOverrideRedirect, &attr);
+ XReparentWindow (GET_DISPLAY, window, GDK_ROOT_WINDOW(), x, y );
+ XMapWindow (GET_DISPLAY, window);
+}
+
#ifdef HAVE_SHAPE_EXT
static void
unshape_window (GSWindow *window)
@@ -645,7 +703,10 @@ gs_window_xevent (GSWindow *window,
XMapEvent *xme = &ev->xmap;
if (! x11_window_is_ours (xme->window)) {
- gs_window_raise (window);
+ if (is_xvkbd_window (xme->window))
+ setup_xvkbd_window (xme->window);
+ else
+ gs_window_raise (window);
} else {
gs_debug ("not raising our windows");
}
@@ -657,7 +718,10 @@ gs_window_xevent (GSWindow *window,
XConfigureEvent *xce = &ev->xconfigure;
if (! x11_window_is_ours (xce->window)) {
- gs_window_raise (window);
+ if (is_xvkbd_window (xce->window))
+ XRaiseWindow (GET_DISPLAY, xce->window);
+ else
+ gs_window_raise (window);
} else {
gs_debug ("not raising our windows");
}
Only in gnome-screensaver-2.18.1/src: gs-window-x11.c~
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org