fix to unfocus window only when you leave the window frame, not when you

2003-02-22  Havoc Pennington  <hp@pobox.com>

	* src/display.c (event_callback): fix to unfocus window only when
	you leave the window frame, not when you leave the window itself,
	unless window has no frame. #100248 fix from Orien Vandenbergh
This commit is contained in:
Havoc Pennington 2003-02-22 22:19:19 +00:00 committed by Havoc Pennington
parent fb9ad1eb13
commit d85012ecfd
2 changed files with 7 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2003-02-22 Havoc Pennington <hp@pobox.com>
* src/display.c (event_callback): fix to unfocus window only when
you leave the window frame, not when you leave the window itself,
unless window has no frame. #100248 fix from Orien Vandenbergh
2003-02-22 Havoc Pennington <hp@pobox.com> 2003-02-22 Havoc Pennington <hp@pobox.com>
* src/display.c (meta_display_get_tab_next): when tabbing * src/display.c (meta_display_get_tab_next): when tabbing

View File

@ -1499,13 +1499,8 @@ event_callback (XEvent *event,
switch (meta_prefs_get_focus_mode ()) switch (meta_prefs_get_focus_mode ())
{ {
case META_FOCUS_MODE_MOUSE: case META_FOCUS_MODE_MOUSE:
/* This is kind of questionable; but we normally
* set focus to RevertToPointerRoot, so I guess
* leaving it on PointerRoot when nothing is focused
* is probably right. Anyway, unfocus the
* focused window.
*/
if (window->has_focus && if (window->has_focus &&
(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)