(x_focus_changed): If we get a focusout and pointer
authorJan Djärv <jan.h.d@swipnet.se>
Fri, 4 Sep 2009 05:33:49 +0000 (05:33 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Fri, 4 Sep 2009 05:33:49 +0000 (05:33 +0000)
is invisible, make it visible.

src/ChangeLog
src/xterm.c

index 4bbaf28..9e94c8f 100644 (file)
@@ -1,5 +1,8 @@
 2009-09-04  Jan Djärv  <jan.h.d@swipnet.se>
 
+       * xterm.c (x_focus_changed): If we get a focusout and pointer
+       is invisible, make it visible.
+
        * xterm.h: Remove condition for declaration of
        x_*_window_to_frame.
 
index 1e13ae8..a2af789 100644 (file)
@@ -3139,6 +3139,7 @@ XTtoggle_invisible_pointer (f, invisible)
   else
     XDefineCursor (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                    f->output_data.x->current_cursor);
+  f->pointer_invisible = invisible;
   UNBLOCK_INPUT;
 }
 
@@ -3372,6 +3373,8 @@ x_focus_changed (type, state, dpyinfo, frame, bufp)
       if (FRAME_XIC (frame))
         XUnsetICFocus (FRAME_XIC (frame));
 #endif
+      if (frame->pointer_invisible)
+        XTtoggle_invisible_pointer (frame, 0);
     }
 }