diff -Nru unity-greeter-0.2.9/debian/changelog unity-greeter-0.2.9/debian/changelog --- unity-greeter-0.2.9/debian/changelog 2013-06-14 13:37:12.000000000 +0000 +++ unity-greeter-0.2.9/debian/changelog 2014-04-09 02:00:27.000000000 +0000 @@ -1,3 +1,11 @@ +unity-greeter (0.2.9-0ubuntu1.3) precise; urgency=medium + + * debian/patches/dont-focus-destroyed-window.patch: + - Handle a window being destroyed after we get the map event and try and + focus it (LP: #1048131) + + -- Robert Ancell Wed, 09 Apr 2014 13:58:13 +1200 + unity-greeter (0.2.9-0ubuntu1.2) precise; urgency=low * debian/patches/user_selection.patch: diff -Nru unity-greeter-0.2.9/debian/patches/dont-focus-destroyed-window.patch unity-greeter-0.2.9/debian/patches/dont-focus-destroyed-window.patch --- unity-greeter-0.2.9/debian/patches/dont-focus-destroyed-window.patch 1970-01-01 00:00:00.000000000 +0000 +++ unity-greeter-0.2.9/debian/patches/dont-focus-destroyed-window.patch 2014-04-09 02:00:27.000000000 +0000 @@ -0,0 +1,37 @@ +Index: unity-greeter-0.2.9/src/unity-greeter.vala +=================================================================== +--- unity-greeter-0.2.9.orig/src/unity-greeter.vala 2012-11-21 15:24:50.000000000 +1300 ++++ unity-greeter-0.2.9/src/unity-greeter.vala 2014-04-09 13:57:31.509980391 +1200 +@@ -734,19 +734,21 @@ + var display = Gdk.x11_lookup_xdisplay (xevent.xmap.display); + var xwin = xevent.xmap.window; + var win = Gdk.X11Window.foreign_new_for_display (display, xwin); +- +- /* Check to see if this window is our onboard window, since we don't want to focus it. */ +- X.Window keyboard_xid = 0; +- if (main_window.menubar.keyboard_window != null) +- keyboard_xid = Gdk.X11Window.get_xid (main_window.menubar.keyboard_window.get_window ()); +- +- if (xwin != keyboard_xid && win.get_type_hint() != Gdk.WindowTypeHint.NOTIFICATION) ++ if (win != null) + { +- win.focus (Gdk.CURRENT_TIME); +- +- /* Make sure to keep keyboard above */ ++ /* Check to see if this window is our onboard window, since we don't want to focus it. */ ++ X.Window keyboard_xid = 0; + if (main_window.menubar.keyboard_window != null) +- main_window.menubar.keyboard_window.get_window ().raise (); ++ keyboard_xid = Gdk.X11Window.get_xid (main_window.menubar.keyboard_window.get_window ()); ++ ++ if (xwin != keyboard_xid && win.get_type_hint() != Gdk.WindowTypeHint.NOTIFICATION) ++ { ++ win.focus (Gdk.CURRENT_TIME); ++ ++ /* Make sure to keep keyboard above */ ++ if (main_window.menubar.keyboard_window != null) ++ main_window.menubar.keyboard_window.get_window ().raise (); ++ } + } + } + else if (xevent.type == X.EventType.UnmapNotify) diff -Nru unity-greeter-0.2.9/debian/patches/series unity-greeter-0.2.9/debian/patches/series --- unity-greeter-0.2.9/debian/patches/series 2013-06-14 13:37:12.000000000 +0000 +++ unity-greeter-0.2.9/debian/patches/series 2014-04-09 02:00:27.000000000 +0000 @@ -1,2 +1,3 @@ r402_pam_text.patch user_selection.patch +dont-focus-destroyed-window.patch