add some assertions

2002-03-06  Havoc Pennington  <hp@pobox.com>

	* src/core.c (meta_core_get_grab_frame): add some assertions

	* src/menu.c (meta_window_menu_new): make another warning
	into a verbose

	* src/display.c (meta_change_button_grab): use verbose rather than
	warning to log failures to grab button, since these are typically
	BadWindow from a destroyed window.
This commit is contained in:
Havoc Pennington 2002-03-07 03:46:12 +00:00 committed by Havoc Pennington
parent 262e6fab27
commit fdb20df78b
4 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,14 @@
2002-03-06 Havoc Pennington <hp@pobox.com>
* src/core.c (meta_core_get_grab_frame): add some assertions
* src/menu.c (meta_window_menu_new): make another warning
into a verbose
* src/display.c (meta_change_button_grab): use verbose rather than
warning to log failures to grab button, since these are typically
BadWindow from a destroyed window.
2002-03-06 Havoc Pennington <hp@redhat.com> 2002-03-06 Havoc Pennington <hp@redhat.com>
* src/frames.c (meta_frames_manage_window): use hash_table_replace * src/frames.c (meta_frames_manage_window): use hash_table_replace

View File

@ -525,6 +525,10 @@ meta_core_get_grab_frame (Display *xdisplay)
display = meta_display_for_x_display (xdisplay); display = meta_display_for_x_display (xdisplay);
g_assert (display != NULL);
g_assert (display->grab_window != NULL);
g_assert (display->grab_window->display->xdisplay == xdisplay);
if (display->grab_op != META_GRAB_OP_NONE && if (display->grab_op != META_GRAB_OP_NONE &&
display->grab_window->frame) display->grab_window->frame)
return display->grab_window->frame->xwindow; return display->grab_window->frame->xwindow;

View File

@ -2091,7 +2091,7 @@ meta_change_button_grab (MetaDisplay *display,
result = meta_error_trap_pop (display); result = meta_error_trap_pop (display);
if (result != Success) if (result != Success)
meta_warning ("Failed to grab button %d with mask 0x%x for window 0x%lx error code %d\n", meta_verbose ("Failed to grab button %d with mask 0x%x for window 0x%lx error code %d\n",
button, modmask | ignored_mask, xwindow, result); button, modmask | ignored_mask, xwindow, result);
++ignored_mask; ++ignored_mask;

View File

@ -281,7 +281,7 @@ meta_window_menu_new (MetaFrames *frames,
if (ops & META_MENU_OP_WORKSPACES) if (ops & META_MENU_OP_WORKSPACES)
{ {
meta_warning ("Creating %d-workspace menu current %d\n", meta_verbose ("Creating %d-workspace menu current space %d\n",
n_workspaces, active_workspace); n_workspaces, active_workspace);
if (n_workspaces > 0) if (n_workspaces > 0)