Merge lp:~smspillaz/gnome-keyring/gnome-keyring.fix_931958 into lp:~ubuntu-desktop/gnome-keyring/ubuntu

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 73
Proposed branch: lp:~smspillaz/gnome-keyring/gnome-keyring.fix_931958
Merge into: lp:~ubuntu-desktop/gnome-keyring/ubuntu
Diff against target: 58 lines (+38/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/05_grab_tracking.patch (+29/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~smspillaz/gnome-keyring/gnome-keyring.fix_931958
Reviewer Review Type Date Requested Status
Michael Terry Approve
Review via email: mp+100563@code.launchpad.net

Description of the change

Don't re-grab the keyboard if the window state changed if we didn't ungrab the window for the same reason. Fixes LP #931958

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, Sam, that code has been moved upstream in gcr but still seem identic:
http://git.gnome.org/browse/gcr/log/gcr/gcr-prompt-dialog.c

Do you think you could open a bug https://bugzilla.gnome.org/enter_bug.cgi?product=gnome-keyring (component gcr) with your patch and the rational?

Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Michael Terry (mterry) wrote :

Not sure why this didn't get pushed in? Looks good to me, so I uploaded it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-03-26 19:00:17 +0000
3+++ debian/changelog 2012-04-03 07:51:18 +0000
4@@ -1,3 +1,11 @@
5+gnome-keyring (3.2.2-2ubuntu3) precise; urgency=low
6+
7+ * debian/patches/05_grab_tracking.patch: track when we ungrabbed the keyboard
8+ because the window state changed so that we only re-grab it when
9+ we had initially ungrabbed it for this reason. (LP #931958)
10+
11+ -- Sam Spilsbury <sam.spilsbury@canonical.com> Tue, 03 Apr 2012 15:46:24 +0800
12+
13 gnome-keyring (3.2.2-2ubuntu2) precise; urgency=low
14
15 * ubiquity-hook: Call 'logger' instead of 'echo' so that the error is
16
17=== added file 'debian/patches/05_grab_tracking.patch'
18--- debian/patches/05_grab_tracking.patch 1970-01-01 00:00:00 +0000
19+++ debian/patches/05_grab_tracking.patch 2012-04-03 07:51:18 +0000
20@@ -0,0 +1,29 @@
21+Index: gnome-keyring-3.2.2/ui/gku-prompt-tool.c
22+===================================================================
23+--- gnome-keyring-3.2.2.orig/ui/gku-prompt-tool.c 2011-11-14 18:27:43.000000000 +0800
24++++ gnome-keyring-3.2.2/ui/gku-prompt-tool.c 2012-04-03 15:45:40.338888289 +0800
25+@@ -201,9 +201,15 @@
26+ state & GDK_WINDOW_STATE_ICONIFIED ||
27+ state & GDK_WINDOW_STATE_FULLSCREEN ||
28+ state & GDK_WINDOW_STATE_MAXIMIZED)
29++ {
30++ g_object_set_data (G_OBJECT (win), "grab-disabled", GINT_TO_POINTER (1));
31+ ungrab_keyboard (win, (GdkEvent*)event, data);
32+- else
33++ }
34++ else if (g_object_get_data (G_OBJECT (win), "grab-disabled") == GPOINTER_TO_INT (1))
35++ {
36++ g_object_set_data (G_OBJECT (win), "grab-disabled", GINT_TO_POINTER (0));
37+ grab_keyboard (win, (GdkEvent*)event, data);
38++ }
39+
40+ return FALSE;
41+ }
42+@@ -465,6 +471,7 @@
43+ * When passwords are involved we grab the keyboard so that people
44+ * don't accidentally type their passwords in other windows.
45+ */
46++ g_object_set_data (G_OBJECT (dialog), "grab-disabled", GINT_TO_POINTER (0));
47+ g_signal_connect (dialog, "map-event", G_CALLBACK (grab_keyboard), NULL);
48+ g_signal_connect (dialog, "unmap-event", G_CALLBACK (ungrab_keyboard), NULL);
49+ g_signal_connect (dialog, "window-state-event", G_CALLBACK (window_state_changed), NULL);
50
51=== modified file 'debian/patches/series'
52--- debian/patches/series 2012-02-01 14:32:13 +0000
53+++ debian/patches/series 2012-04-03 07:51:18 +0000
54@@ -3,3 +3,4 @@
55 00git_rpc-layer-Correctly-handle-case-where-gnome-keyring-.patch
56 03_kfreebsd.patch
57 04_nodisplay_autostart.patch
58+05_grab_tracking.patch

Subscribers

People subscribed via source and target branches