Prevent the visual bell from changing the focus window. Fixes #123366.

2005-02-25  Elijah Newren  <newren@gmail.com>

	Prevent the visual bell from changing the focus window.  Fixes
	#123366.

	* src/bell.c: (meta_bell_flash_screen): if not in click-to-focus
	mode and mouse_mode is also false, increment the focus sentinel so
	that we can ignore spurious EnterNotify and LeaveNotify events.

	* src.display.c: (event_callback): make sure to also ignore
	LeaveNotify events when the focus sentinel isn't clear
This commit is contained in:
Elijah Newren 2005-02-25 20:14:08 +00:00 committed by Elijah Newren
parent 6375bee8a2
commit bea407e309
3 changed files with 20 additions and 3 deletions

View File

@ -1,3 +1,15 @@
2005-02-25 Elijah Newren <newren@gmail.com>
Prevent the visual bell from changing the focus window. Fixes
#123366.
* src/bell.c: (meta_bell_flash_screen): if not in click-to-focus
mode and mouse_mode is also false, increment the focus sentinel so
that we can ignore spurious EnterNotify and LeaveNotify events.
* src.display.c: (event_callback): make sure to also ignore
LeaveNotify events when the focus sentinel isn't clear
2005-02-23 Elijah Newren <newren@gmail.com> 2005-02-23 Elijah Newren <newren@gmail.com>
* src/window.c: (meta_window_new_with_attrs): Fix crash that * src/window.c: (meta_window_new_with_attrs): Fix crash that

View File

@ -78,6 +78,10 @@ meta_bell_flash_screen (MetaDisplay *display,
XSync (display->xdisplay, False); XSync (display->xdisplay, False);
XUnmapWindow (display->xdisplay, screen->flash_window); XUnmapWindow (display->xdisplay, screen->flash_window);
} }
if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK &&
!display->mouse_mode)
meta_display_increment_focus_sentinel (display);
XFlush (display->xdisplay); XFlush (display->xdisplay);
} }

View File

@ -1832,7 +1832,8 @@ event_callback (XEvent *event,
if ((window->frame == NULL || frame_was_receiver) && if ((window->frame == NULL || frame_was_receiver) &&
event->xcrossing.mode != NotifyGrab && event->xcrossing.mode != NotifyGrab &&
event->xcrossing.mode != NotifyUngrab && event->xcrossing.mode != NotifyUngrab &&
event->xcrossing.detail != NotifyInferior) event->xcrossing.detail != NotifyInferior &&
meta_display_focus_sentinel_clear (display))
{ {
if (window == display->expected_focus_window) if (window == display->expected_focus_window)
{ {