Take focus mode into account when tracking FocusIn/Out events, so we don't

Tue Sep 10 09:29:00 2002  Owen Taylor  <otaylor@redhat.com>
        * gdk/x11/gdkevents-x11.c (gdk_event_translate): Take
        focus mode into account when tracking FocusIn/Out events,
        so we don't get confused by focus changes while a
        keyboard grab is in effect. (Probably fixes #90563)
This commit is contained in:
Owen Taylor 2002-09-10 13:45:18 +00:00 committed by Owen Taylor
parent c2b02b560b
commit 44e2b53f83
7 changed files with 58 additions and 4 deletions

View File

@ -1,3 +1,10 @@
Tue Sep 10 09:29:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Take
focus mode into account when tracking FocusIn/Out events,
so we don't get confused by focus changes while a
keyboard grab is in effect. (Probably fixes #90563)
Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com> Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com>
* gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter

View File

@ -1,3 +1,10 @@
Tue Sep 10 09:29:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Take
focus mode into account when tracking FocusIn/Out events,
so we don't get confused by focus changes while a
keyboard grab is in effect. (Probably fixes #90563)
Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com> Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com>
* gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter

View File

@ -1,3 +1,10 @@
Tue Sep 10 09:29:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Take
focus mode into account when tracking FocusIn/Out events,
so we don't get confused by focus changes while a
keyboard grab is in effect. (Probably fixes #90563)
Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com> Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com>
* gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter

View File

@ -1,3 +1,10 @@
Tue Sep 10 09:29:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Take
focus mode into account when tracking FocusIn/Out events,
so we don't get confused by focus changes while a
keyboard grab is in effect. (Probably fixes #90563)
Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com> Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com>
* gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter

View File

@ -1,3 +1,10 @@
Tue Sep 10 09:29:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Take
focus mode into account when tracking FocusIn/Out events,
so we don't get confused by focus changes while a
keyboard grab is in effect. (Probably fixes #90563)
Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com> Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com>
* gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter

View File

@ -1,3 +1,10 @@
Tue Sep 10 09:29:00 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Take
focus mode into account when tracking FocusIn/Out events,
so we don't get confused by focus changes while a
keyboard grab is in effect. (Probably fixes #90563)
Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com> Mon Sep 9 16:16:25 2002 Shivram U <shivaram.upadhyayula@wipro.com>
* gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter * gtk/gtktextview.c (gtk_text_view_drag_motion): If the end iter

View File

@ -1072,9 +1072,19 @@ gdk_event_translate (GdkDisplay *display,
case NotifyNonlinear: case NotifyNonlinear:
case NotifyVirtual: case NotifyVirtual:
case NotifyNonlinearVirtual: case NotifyNonlinearVirtual:
/* We pretend that the focus moves to the grab
* window, so we pay attention to NotifyGrab
* NotifyUngrab, and ignore NotifyWhileGrabbed
*/
if (xevent->xfocus.mode != NotifyWhileGrabbed)
window_impl->has_focus = TRUE; window_impl->has_focus = TRUE;
break; break;
case NotifyPointer: case NotifyPointer:
/* The X server sends NotifyPointer/NotifyGrab,
* but the pointer focus is ignored while a
* grab is in effect
*/
if (xevent->xfocus.mode != NotifyGrab)
window_impl->has_pointer_focus = TRUE; window_impl->has_pointer_focus = TRUE;
break; break;
case NotifyInferior: case NotifyInferior:
@ -1101,9 +1111,11 @@ gdk_event_translate (GdkDisplay *display,
case NotifyNonlinear: case NotifyNonlinear:
case NotifyVirtual: case NotifyVirtual:
case NotifyNonlinearVirtual: case NotifyNonlinearVirtual:
if (xevent->xfocus.mode != NotifyWhileGrabbed)
window_impl->has_focus = FALSE; window_impl->has_focus = FALSE;
break; break;
case NotifyPointer: case NotifyPointer:
if (xevent->xfocus.mode != NotifyUngrab)
window_impl->has_pointer_focus = FALSE; window_impl->has_pointer_focus = FALSE;
break; break;
case NotifyInferior: case NotifyInferior: