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
=== modified file 'debian/changelog'
--- debian/changelog 2012-03-26 19:00:17 +0000
+++ debian/changelog 2012-04-03 07:51:18 +0000
@@ -1,3 +1,11 @@
1gnome-keyring (3.2.2-2ubuntu3) precise; urgency=low
2
3 * debian/patches/05_grab_tracking.patch: track when we ungrabbed the keyboard
4 because the window state changed so that we only re-grab it when
5 we had initially ungrabbed it for this reason. (LP #931958)
6
7 -- Sam Spilsbury <sam.spilsbury@canonical.com> Tue, 03 Apr 2012 15:46:24 +0800
8
1gnome-keyring (3.2.2-2ubuntu2) precise; urgency=low9gnome-keyring (3.2.2-2ubuntu2) precise; urgency=low
210
3 * ubiquity-hook: Call 'logger' instead of 'echo' so that the error is11 * ubiquity-hook: Call 'logger' instead of 'echo' so that the error is
412
=== added file 'debian/patches/05_grab_tracking.patch'
--- debian/patches/05_grab_tracking.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/05_grab_tracking.patch 2012-04-03 07:51:18 +0000
@@ -0,0 +1,29 @@
1Index: gnome-keyring-3.2.2/ui/gku-prompt-tool.c
2===================================================================
3--- gnome-keyring-3.2.2.orig/ui/gku-prompt-tool.c 2011-11-14 18:27:43.000000000 +0800
4+++ gnome-keyring-3.2.2/ui/gku-prompt-tool.c 2012-04-03 15:45:40.338888289 +0800
5@@ -201,9 +201,15 @@
6 state & GDK_WINDOW_STATE_ICONIFIED ||
7 state & GDK_WINDOW_STATE_FULLSCREEN ||
8 state & GDK_WINDOW_STATE_MAXIMIZED)
9+ {
10+ g_object_set_data (G_OBJECT (win), "grab-disabled", GINT_TO_POINTER (1));
11 ungrab_keyboard (win, (GdkEvent*)event, data);
12- else
13+ }
14+ else if (g_object_get_data (G_OBJECT (win), "grab-disabled") == GPOINTER_TO_INT (1))
15+ {
16+ g_object_set_data (G_OBJECT (win), "grab-disabled", GINT_TO_POINTER (0));
17 grab_keyboard (win, (GdkEvent*)event, data);
18+ }
19
20 return FALSE;
21 }
22@@ -465,6 +471,7 @@
23 * When passwords are involved we grab the keyboard so that people
24 * don't accidentally type their passwords in other windows.
25 */
26+ g_object_set_data (G_OBJECT (dialog), "grab-disabled", GINT_TO_POINTER (0));
27 g_signal_connect (dialog, "map-event", G_CALLBACK (grab_keyboard), NULL);
28 g_signal_connect (dialog, "unmap-event", G_CALLBACK (ungrab_keyboard), NULL);
29 g_signal_connect (dialog, "window-state-event", G_CALLBACK (window_state_changed), NULL);
030
=== modified file 'debian/patches/series'
--- debian/patches/series 2012-02-01 14:32:13 +0000
+++ debian/patches/series 2012-04-03 07:51:18 +0000
@@ -3,3 +3,4 @@
300git_rpc-layer-Correctly-handle-case-where-gnome-keyring-.patch300git_rpc-layer-Correctly-handle-case-where-gnome-keyring-.patch
403_kfreebsd.patch403_kfreebsd.patch
504_nodisplay_autostart.patch504_nodisplay_autostart.patch
605_grab_tracking.patch

Subscribers

People subscribed via source and target branches