mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-19 01:40:10 +00:00
b837ef5a6d
* add per-display gdk_x11_display_error_trap_push() (X11-specific because gdk_error_trap_push() probably should have been) * make gdk_error_trap_push() handle only GDK displays not displays opened without a GDK wrapper * make gdk_error_trap_pop() and gdk_x11_display_error_trap_pop() automatically sync only if needed, so manual gdk_flush() is not required * add gdk_error_trap_pop_ignored() which just asynchronously ignores errors, so never needs to sync * add G_GNUC_WARN_UNUSED_RESULT to plain pop(), because if you use plain pop() and don't need the return value, the async gdk_error_trap_pop_ignored() should be used instead. This results in lots of warnings to clean up in a later patch. The main objective here was to avoid the need to sync just to ignore an error. Now, syncing is automatic, and only happens when we need to know the error code. https://bugzilla.gnome.org/show_bug.cgi?id=629608
44 lines
1.5 KiB
C
44 lines
1.5 KiB
C
/* GDK - The GIMP Drawing Kit
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library 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
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
/*
|
|
* Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
* files for a list of changes. These files are distributed with
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
*/
|
|
|
|
#include "config.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "gdktypes.h"
|
|
#include "gdkprivate.h"
|
|
|
|
|
|
guint _gdk_debug_flags = 0;
|
|
GList *_gdk_default_filters = NULL;
|
|
gchar *_gdk_display_name = NULL;
|
|
gint _gdk_screen_number = -1;
|
|
gchar *_gdk_display_arg_name = NULL;
|
|
gboolean _gdk_native_windows = FALSE;
|
|
gboolean _gdk_enable_multidevice = FALSE;
|
|
|
|
GSList *_gdk_displays = NULL;
|