1
0
Fork 0
mutter-performance-source/src/errors.h
Havoc Pennington c6b475b251 Optimizations for managing new windows (do not all take effect if
2002-10-21  Havoc Pennington  <hp@redhat.com>

	Optimizations for managing new windows (do not all take effect if
	METACITY_DEBUG=1). Bug #96404

	* src/keybindings.c (meta_change_keygrab): use error trap nesting
	and conditionalize on meta_is_verbose() to avoid a ton of XSync

	* src/display.c (meta_change_button_grab): ditto

	Throughout: move to new error trap setup to save on XSync calls,
	new setup is:

	* src/errors.c (meta_error_trap_push_with_return): new function,
	an error trap that needs to care about return value and thus
	sync even if an outer trap still exists
	(meta_error_trap_pop_with_return): new function
	(meta_error_trap_pop): add "last_request_was_roundtrip"
	argument allowing us to avoid XSync() if we just did
	a GetProperty or whatever.

	* src/util.c (meta_warning): flush the warning file descriptor

	* src/Makefile.am (INCLUDES): define G_LOG_DOMAIN
2002-10-21 21:44:35 +00:00

39 lines
1.4 KiB
C

/* Metacity X error handling */
/*
* Copyright (C) 2001 Havoc Pennington
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef META_ERRORS_H
#define META_ERRORS_H
#include "util.h"
#include "display.h"
void meta_errors_init (void);
void meta_error_trap_push (MetaDisplay *display);
void meta_error_trap_pop (MetaDisplay *display,
gboolean last_request_was_roundtrip);
void meta_error_trap_push_with_return (MetaDisplay *display);
/* returns X error code, or 0 for no error */
int meta_error_trap_pop_with_return (MetaDisplay *display,
gboolean last_request_was_roundtrip);
#endif