Bugzilla – Attachment 176123 Details for
Bug 304399
login not possible when a tablet is used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
Newest version of the patch
gnome-screensaver-xvkbd-on-lock.patch (text/plain), 4.96 KB, created by
Rodrigo Moya
on 2007-10-03 13:33:31 UTC
(
hide
)
Description:
Newest version of the patch
Filename:
MIME Type:
Creator:
Rodrigo Moya
Created:
2007-10-03 13:33:31 UTC
Size:
4.96 KB
patch
obsolete
>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 <stdlib.h> >+#include <sys/wait.h> > #include <unistd.h> > #include <string.h> > #include <errno.h> >@@ -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/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,42 @@ x11_window_is_ours (Window window) > return ret; > } > >+#define GET_DISPLAY gdk_x11_display_get_xdisplay (gdk_display_get_default ()) >+GdkWindow *xvkbd_window = NULL; >+static gboolean >+is_xvkbd_window (Window window) >+{ >+ gboolean ret = FALSE; >+ XClassHint class_hint = { NULL, NULL }; >+ gdk_error_trap_push (); >+ if (XGetClassHint (GET_DISPLAY, window, &class_hint)) { >+ if (g_strstr_len (class_hint.res_name, >+ strlen (class_hint.res_name), >+ "xvkbd")) >+ ret = TRUE; >+ } >+ if (G_UNLIKELY (gdk_error_trap_pop () == BadWindow)) ; >+ return ret; >+} >+ >+static void >+setup_xvkbd_window (GSWindow *gswindow, Window window) >+{ >+ xvkbd_window = gdk_window_foreign_new (window); >+ gdk_window_hide (xvkbd_window); >+ gdk_window_set_override_redirect (xvkbd_window, TRUE); >+ gdk_window_set_events (xvkbd_window, gdk_window_get_events (xvkbd_window) | GDK_STRUCTURE_MASK); >+ >+ int display_width, display_height, width, height; >+ GdkWindow *root = gdk_screen_get_root_window (gdk_drawable_get_screen (xvkbd_window)); >+ >+ gdk_window_get_geometry (xvkbd_window, NULL, NULL, &width, &height, NULL); >+ gdk_window_get_geometry (root, NULL, NULL, &display_width, &display_height, NULL); >+ gdk_window_reparent (xvkbd_window, NULL, display_width - width, display_height - height); >+ gdk_window_set_transient_for (xvkbd_window, GTK_WIDGET (gswindow)->window); >+ gdk_window_show (xvkbd_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 (window, xme->window); >+ else >+ gs_window_raise (window); > } else { > gs_debug ("not raising our windows"); > } >@@ -657,7 +718,8 @@ gs_window_xevent (GSWindow *window, > XConfigureEvent *xce = &ev->xconfigure; > > if (! x11_window_is_ours (xce->window)) { >- gs_window_raise (window); >+ gs_window_raise (window); >+ gs_window_raise (xvkbd_window); > } else { > gs_debug ("not raising our windows"); > } >Only in gnome-screensaver-2.18.1/src: gs-window-x11.c~
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 304399
:
175991
|
176123
|
176214
|
176294
|
176295
|
176296
|
176628
|
182807
|
183888
|
183897