Update comment to be more clear and print a warning if we try to create a

2007-06-06  Richard Hult  <richard@imendio.com>

	* gdk/quartz/gdkevents-quartz.c (synthesize_crossing_events):
	Update comment to be more clear and print a warning if we try to
	create a crossing event without knowing what the current mouse
	window is, to help track down focus bugs.

	* gdk/quartz/gdkevents-quartz.c
	(_gdk_quartz_events_update_focus_window): Fix indentation.

svn path=/trunk/; revision=18047
This commit is contained in:
Richard Hult 2007-06-06 08:29:20 +00:00 committed by Richard Hult
parent 949a86729d
commit fb6a0314fd
2 changed files with 20 additions and 13 deletions

View File

@ -1,4 +1,14 @@
2007-06-05 Richard Hult <richard@imendio.com>
2007-06-06 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkevents-quartz.c (synthesize_crossing_events):
Update comment to be more clear and print a warning if we try to
create a crossing event without knowing what the current mouse
window is, to help track down focus bugs.
* gdk/quartz/gdkevents-quartz.c
(_gdk_quartz_events_update_focus_window): Fix indentation.
2007-06-06 Richard Hult <richard@imendio.com>
* gdk/quartz/GdkQuartzWindow.c: Don't let temp windows become key
window.

View File

@ -495,10 +495,10 @@ _gdk_quartz_events_update_focus_window (GdkWindow *window,
if (!got_focus && window == current_keyboard_window)
{
event = create_focus_event (current_keyboard_window, FALSE);
append_event (event);
g_object_unref (current_keyboard_window);
current_keyboard_window = NULL;
event = create_focus_event (current_keyboard_window, FALSE);
append_event (event);
g_object_unref (current_keyboard_window);
current_keyboard_window = NULL;
}
if (got_focus)
@ -755,15 +755,12 @@ synthesize_crossing_events (GdkWindow *window,
}
else
{
/* This means we have not current_mouse_window. FIXME: Should
* we make sure to always set the root window instead of NULL?
/* This means we have no current_mouse_window, which probably
* means that there is a bug somewhere, we should always have
* the root in we don't have another window. Does this ever
* happen?
*/
/* FIXME: Figure out why this is being called with window being
* NULL. The check works around a crash for now.
*/
if (window)
synthesize_enter_event (window, nsevent, mode, GDK_NOTIFY_UNKNOWN);
g_warning ("Trying to create crossing event when current_mouse_window is NULL");
}
_gdk_quartz_events_update_mouse_window (window);