metacity r3788 - in trunk: . src/core
- From: tthurman svn gnome org
- To: svn-commits-list gnome org
- Subject: metacity r3788 - in trunk: . src/core
- Date: Mon, 14 Jul 2008 00:41:25 +0000 (UTC)
Author: tthurman
Date: Mon Jul 14 00:41:25 2008
New Revision: 3788
URL: http://svn.gnome.org/viewvc/metacity?rev=3788&view=rev
Log:
2008-07-13 Thomas Thurman <tthurman gnome org>
* src/core/display.c (event_callback): meta_display_screen_for_root()
can return NULL, so check for that. Fixes #422242. Also tidying.
Modified:
trunk/ (props changed)
trunk/ChangeLog
trunk/src/core/display.c
Modified: trunk/src/core/display.c
==============================================================================
--- trunk/src/core/display.c (original)
+++ trunk/src/core/display.c Mon Jul 14 00:41:25 2008
@@ -1910,11 +1910,13 @@
meta_event_mode_to_string (event->xfocus.mode),
meta_event_detail_to_string (event->xfocus.detail));
}
- else if (meta_display_screen_for_root (display,
- event->xany.window) != NULL)
+ else
{
- MetaScreen * screen;
- screen = meta_display_screen_for_root (display, event->xany.window);
+ MetaScreen *screen =
+ meta_display_screen_for_root(display,
+ event->xany.window);
+ if (screen == NULL)
+ break;
meta_topic (META_DEBUG_FOCUS,
"Focus %s event received on root window 0x%lx "
@@ -1930,17 +1932,24 @@
event->xfocus.detail == NotifyDetailNone)
{
meta_topic (META_DEBUG_FOCUS,
- "Focus got set to None, probably due to brain-damage in the X protocol (see bug 125492). Setting the default focus window.\n");
-
- meta_workspace_focus_default_window (screen->active_workspace, NULL, meta_display_get_current_time_roundtrip (display));
+ "Focus got set to None, probably due to "
+ "brain-damage in the X protocol (see bug "
+ "125492). Setting the default focus window.\n");
+ meta_workspace_focus_default_window (screen->active_workspace,
+ NULL,
+ meta_display_get_current_time_roundtrip (display));
}
else if (event->type == FocusIn &&
event->xfocus.mode == NotifyNormal &&
event->xfocus.detail == NotifyInferior)
{
meta_topic (META_DEBUG_FOCUS,
- "Focus got set to root window, probably due to gnome-session logout dialog usage (see bug 153220). Setting the default focus window.\n");
- meta_workspace_focus_default_window (screen->active_workspace, NULL, meta_display_get_current_time_roundtrip (display));
+ "Focus got set to root window, probably due to "
+ "gnome-session logout dialog usage (see bug "
+ "153220). Setting the default focus window.\n");
+ meta_workspace_focus_default_window (screen->active_workspace,
+ NULL,
+ meta_display_get_current_time_roundtrip (display));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]