Rename errors.[ch] to meta-x11-errors.[ch]

Also rename meta_error_trap_* to meta_x11_error_trap_* and
move meta-x11-errors.c to src/x11
This commit is contained in:
Armin Krezović 2017-08-27 20:48:55 +02:00 committed by Jonas Ådahl
parent 7d2ef2d821
commit 25c9ce2dad
34 changed files with 189 additions and 189 deletions

View File

@ -13,7 +13,6 @@ src/compositor/meta-background.c
src/core/bell.c
src/core/core.c
src/core/display.c
src/core/errors.c
src/core/keybindings.c
src/core/main.c
src/core/meta-close-dialog-default.c
@ -25,6 +24,7 @@ src/ui/frames.c
src/ui/theme.c
src/wayland/meta-wayland-tablet-pad.c
src/x11/meta-x11-display.c
src/x11/meta-x11-errors.c
src/x11/session.c
src/x11/window-props.c
src/x11/xprops.c

View File

@ -247,8 +247,6 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
core/edge-resistance.h \
core/events.c \
core/events.h \
core/errors.c \
meta/errors.h \
core/frame.c \
core/frame.h \
core/meta-gesture-tracker.c \
@ -290,6 +288,8 @@ libmutter_@LIBMUTTER_API_VERSION@_la_SOURCES = \
x11/meta-x11-display.c \
x11/meta-x11-display-private.h \
meta/meta-x11-display.h \
x11/meta-x11-errors.c \
meta/meta-x11-errors.h \
x11/events.c \
x11/events.h \
x11/group-private.h \
@ -449,7 +449,6 @@ libmutterinclude_headers = \
meta/compositor-mutter.h \
meta/compositor.h \
meta/display.h \
meta/errors.h \
meta/group.h \
meta/keybindings.h \
meta/main.h \
@ -471,6 +470,7 @@ libmutterinclude_headers = \
meta/meta-window-actor.h \
meta/meta-window-shape.h \
meta/meta-x11-display.h \
meta/meta-x11-errors.h \
meta/prefs.h \
meta/theme.h \
meta/types.h \

View File

@ -34,7 +34,7 @@
#include <meta/meta-x11-display.h>
#include <meta/main.h>
#include <meta/util.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <cogl/cogl.h>
#include <clutter/clutter.h>

View File

@ -23,7 +23,7 @@
#include "meta-cursor.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "display-private.h"
#include "meta-backend-private.h"

View File

@ -34,7 +34,7 @@
#include <meta/main.h>
#include "util-private.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "edid.h"
#include "backends/meta-logical-monitor.h"
#include "backends/meta-monitor.h"

View File

@ -41,7 +41,7 @@
#include <xf86drmMode.h>
#include <meta/main.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <gudev/gudev.h>

View File

@ -35,7 +35,7 @@
#include <gudev/gudev.h>
#endif
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "backends/meta-logical-monitor.h"
typedef struct _MetaInputSettingsX11Private
@ -547,7 +547,7 @@ meta_input_settings_x11_set_tablet_mapping (MetaInputSettings *settings,
return;
/* Grab the puke bucket! */
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
xdev = XOpenDevice (xdisplay, device_id);
if (xdev)
{
@ -557,7 +557,7 @@ meta_input_settings_x11_set_tablet_mapping (MetaInputSettings *settings,
XCloseDevice (xdisplay, xdev);
}
if (meta_error_trap_pop_with_return (display->x11_display))
if (meta_x11_error_trap_pop_with_return (display->x11_display))
{
g_warning ("Could not set tablet mapping for %s",
clutter_input_device_get_device_name (device));
@ -744,7 +744,7 @@ meta_input_settings_x11_set_stylus_button_map (MetaInputSettings *setti
return;
/* Grab the puke bucket! */
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
xdev = XOpenDevice (xdisplay, device_id);
if (xdev)
{
@ -758,7 +758,7 @@ meta_input_settings_x11_set_stylus_button_map (MetaInputSettings *setti
XCloseDevice (xdisplay, xdev);
}
if (meta_error_trap_pop_with_return (display->x11_display))
if (meta_x11_error_trap_pop_with_return (display->x11_display))
{
g_warning ("Could not set stylus button map for %s",
clutter_input_device_get_device_name (device));

View File

@ -42,7 +42,7 @@
#include "meta-backend-x11.h"
#include <meta/main.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "backends/meta-monitor-config-manager.h"
#include "backends/meta-logical-monitor.h"

View File

@ -55,7 +55,7 @@
#include <clutter/x11/clutter-x11.h>
#include "core.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <meta/window.h>
#include "compositor-private.h"
#include <meta/compositor-mutter.h>
@ -462,11 +462,11 @@ redirect_windows (MetaX11Display *x11_display)
*/
while (TRUE)
{
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XCompositeRedirectSubwindows (xdisplay, xroot, CompositeRedirectManual);
XSync (xdisplay, FALSE);
if (!meta_error_trap_pop_with_return (x11_display))
if (!meta_x11_error_trap_pop_with_return (x11_display))
break;
if (n_retries == max_retries)
@ -658,12 +658,12 @@ meta_compositor_add_window (MetaCompositor *compositor,
{
MetaDisplay *display = compositor->display;
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
meta_window_actor_new (window);
sync_actor_stacking (compositor);
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
}
void

View File

@ -78,7 +78,7 @@
#include "cogl-utils.h"
#include "clutter-utils.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "meta-background-actor-private.h"
#include "meta-background-private.h"
#include "meta-cullable.h"

View File

@ -23,7 +23,7 @@
#include "compositor-private.h"
#include "meta-plugin-manager.h"
#include <meta/prefs.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <meta/workspace.h>
#include "meta-module.h"
#include "window-private.h"

View File

@ -30,7 +30,7 @@
#include <X11/extensions/Xcomposite.h>
#include <cogl/winsys/cogl-texture-pixmap-x11.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "window-private.h"
#include "meta-shaped-texture-private.h"
#include "meta-cullable.h"
@ -74,10 +74,10 @@ free_damage (MetaSurfaceActorX11 *self)
if (priv->damage == None)
return;
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
XDamageDestroy (xdisplay, priv->damage);
priv->damage = None;
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
}
static void
@ -98,10 +98,10 @@ detach_pixmap (MetaSurfaceActorX11 *self)
meta_shaped_texture_set_texture (stex, NULL);
cogl_flush ();
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
XFreePixmap (xdisplay, priv->pixmap);
priv->pixmap = None;
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
g_clear_pointer (&priv->texture, cogl_object_unref);
}
@ -152,10 +152,10 @@ update_pixmap (MetaSurfaceActorX11 *self)
Pixmap new_pixmap;
Window xwindow = meta_window_x11_get_toplevel_xwindow (priv->window);
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
new_pixmap = XCompositeNameWindowPixmap (xdisplay, xwindow);
if (meta_error_trap_pop_with_return (display->x11_display) != Success)
if (meta_x11_error_trap_pop_with_return (display->x11_display) != Success)
{
/* Probably a BadMatch if the window isn't viewable; we could
* GrabServer/GetWindowAttributes/NameWindowPixmap/UngrabServer/Sync
@ -228,9 +228,9 @@ meta_surface_actor_x11_pre_paint (MetaSurfaceActor *actor)
if (priv->received_damage)
{
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
XDamageSubtract (xdisplay, priv->damage, None, None);
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
priv->received_damage = FALSE;
}
@ -315,7 +315,7 @@ sync_unredirected (MetaSurfaceActorX11 *self)
Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
Window xwindow = meta_window_x11_get_toplevel_xwindow (priv->window);
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
if (priv->unredirected)
{
@ -327,7 +327,7 @@ sync_unredirected (MetaSurfaceActorX11 *self)
XCompositeRedirectWindow (xdisplay, xwindow, CompositeRedirectManual);
}
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
}
static void

View File

@ -16,7 +16,7 @@
#include <string.h>
#include <meta/display.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "frame.h"
#include <meta/window.h>
#include <meta/meta-shaped-texture.h>
@ -1963,10 +1963,10 @@ do_send_frame_drawn (MetaWindowActor *self, FrameData *frame)
ev.data.l[2] = frame->frame_drawn_time & G_GUINT64_CONSTANT(0xffffffff);
ev.data.l[3] = frame->frame_drawn_time >> 32;
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
XSendEvent (xdisplay, ev.window, False, 0, (XEvent*) &ev);
XFlush (xdisplay);
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
}
void
@ -2040,10 +2040,10 @@ do_send_frame_timings (MetaWindowActor *self,
ev.data.l[3] = refresh_interval;
ev.data.l[4] = 1000 * META_SYNC_DELAY;
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
XSendEvent (xdisplay, ev.window, False, 0, (XEvent*) &ev);
XFlush (xdisplay);
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
}
static void

View File

@ -26,7 +26,7 @@
#include "frame.h"
#include "workspace-private.h"
#include <meta/prefs.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "util-private.h"
#include "x11/meta-x11-display-private.h"

View File

@ -26,7 +26,7 @@
#include "util-private.h"
#include "window-private.h"
#include "compositor-private.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <meta/workspace.h>
#include <errno.h>

View File

@ -39,7 +39,7 @@
#include "window-private.h"
#include "boxes-private.h"
#include "frame.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "keybindings-private.h"
#include <meta/prefs.h>
#include "workspace-private.h"

View File

@ -24,7 +24,7 @@
#include <config.h>
#include "frame.h"
#include "bell.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "keybindings-private.h"
#include "backends/x11/meta-backend-x11.h"
#include "x11/meta-x11-display-private.h"
@ -87,7 +87,7 @@ meta_window_ensure_frame (MetaWindow *window)
meta_x11_display_register_x_window (x11_display, &frame->xwindow, window);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
if (window->mapped)
{
window->mapped = FALSE; /* the reparent will unmap the window,
@ -107,7 +107,7 @@ meta_window_ensure_frame (MetaWindow *window)
frame->child_x,
frame->child_y);
/* FIXME handle this error */
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
/* stick frame to the window */
window->frame = frame;
@ -174,7 +174,7 @@ meta_window_destroy_frame (MetaWindow *window)
/* Unparent the client window; it may be destroyed,
* thus the error trap.
*/
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
if (window->mapped)
{
window->mapped = FALSE; /* Keep track of unmapping it, so we
@ -197,7 +197,7 @@ meta_window_destroy_frame (MetaWindow *window)
*/
window->frame->rect.x + borders.invisible.left,
window->frame->rect.y + borders.invisible.top);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
meta_ui_frame_unmanage (frame->ui_frame);

View File

@ -31,7 +31,7 @@
#include "keybindings-private.h"
#include "workspace-private.h"
#include <meta/compositor.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "edge-resistance.h"
#include "frame.h"
#include <meta/prefs.h>
@ -2838,7 +2838,7 @@ handle_panel (MetaDisplay *display,
"off due to keybinding press\n", event->time);
display->mouse_mode = FALSE;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
/* Release the grab for the panel before sending the event */
XUngrabKeyboard (x11_display->xdisplay, event->time);
@ -2849,7 +2849,7 @@ handle_panel (MetaDisplay *display,
StructureNotifyMask,
(XEvent*) &ev);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void

View File

@ -47,7 +47,7 @@
#include <meta/main.h>
#include "util-private.h"
#include "display-private.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "ui.h"
#include <meta/prefs.h>
#include <meta/compositor.h>

View File

@ -39,7 +39,7 @@
#include "frame.h"
#include "display-private.h"
#include "stack-tracker.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <meta/util.h>
#include <meta/compositor.h>
@ -1001,7 +1001,7 @@ meta_stack_tracker_lower_below (MetaStackTracker *tracker,
{
serial = XNextRequest (x11_display->xdisplay);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
changes.stack_mode = changes.sibling ? Below : Above;
@ -1010,7 +1010,7 @@ meta_stack_tracker_lower_below (MetaStackTracker *tracker,
(changes.sibling ? CWSibling : 0) | CWStackMode,
&changes);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
}
@ -1036,7 +1036,7 @@ meta_stack_tracker_raise_above (MetaStackTracker *tracker,
{
serial = XNextRequest (x11_display->xdisplay);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
changes.stack_mode = changes.sibling ? Above : Below;
@ -1045,7 +1045,7 @@ meta_stack_tracker_raise_above (MetaStackTracker *tracker,
(changes.sibling ? CWSibling : 0) | CWStackMode,
&changes);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
}

View File

@ -28,7 +28,7 @@
#include <config.h>
#include "stack.h"
#include "window-private.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "frame.h"
#include <meta/group.h>
#include <meta/prefs.h>

View File

@ -26,7 +26,7 @@
#include <glib-object.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "display-private.h"
#include "x11/meta-x11-display-private.h"
#include "startup-notification-private.h"
@ -584,7 +584,7 @@ sn_error_trap_push (SnDisplay *sn_display,
MetaDisplay *display;
display = meta_display_for_x_display (xdisplay);
if (display != NULL)
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
}
static void
@ -594,7 +594,7 @@ sn_error_trap_pop (SnDisplay *sn_display,
MetaDisplay *display;
display = meta_display_for_x_display (xdisplay);
if (display != NULL)
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
}
static void

View File

@ -32,7 +32,7 @@
#include "edge-resistance.h"
#include "util-private.h"
#include "frame.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "workspace-private.h"
#include "stack.h"
#include "keybindings-private.h"
@ -754,7 +754,7 @@ sync_client_window_mapped (MetaWindow *window)
window->mapped = should_be_mapped;
meta_error_trap_push (window->display->x11_display);
meta_x11_error_trap_push (window->display->x11_display);
if (should_be_mapped)
{
XMapWindow (window->display->x11_display->xdisplay, window->xwindow);
@ -764,7 +764,7 @@ sync_client_window_mapped (MetaWindow *window)
XUnmapWindow (window->display->x11_display->xdisplay, window->xwindow);
window->unmaps_pending ++;
}
meta_error_trap_pop (window->display->x11_display);
meta_x11_error_trap_pop (window->display->x11_display);
}
static void
@ -6467,7 +6467,7 @@ warp_grab_pointer (MetaWindow *window,
*x = CLAMP (*x, 0, display_rect.width-1);
*y = CLAMP (*y, 0, display_rect.height-1);
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
meta_topic (META_DEBUG_WINDOW_OPS,
"Warping pointer to %d,%d with window at %d,%d\n",
@ -6489,7 +6489,7 @@ warp_grab_pointer (MetaWindow *window,
meta_backend_warp_pointer (backend, *x, *y);
}
if (meta_error_trap_pop_with_return (display->x11_display) != Success)
if (meta_x11_error_trap_pop_with_return (display->x11_display) != Success)
{
meta_verbose ("Failed to warp pointer for window %s\n",
window->desc);
@ -7679,14 +7679,14 @@ window_has_pointer_x11 (MetaWindow *window)
XIModifierState mods;
XIGroupState group;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XIQueryPointer (x11_display->xdisplay,
META_VIRTUAL_CORE_POINTER_ID,
x11_display->xroot,
&root, &child,
&root_x, &root_y, &x, &y,
&buttons, &mods, &group);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
free (buttons.mask);
return meta_x11_display_lookup_x_window (x11_display, child) == window;

View File

@ -38,7 +38,7 @@
#include <meta/workspace.h>
#include "workspace-private.h"
#include "boxes-private.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <meta/prefs.h>
#include <meta/compositor.h>

View File

@ -27,11 +27,11 @@
#include <meta/util.h>
#include <meta/meta-x11-display.h>
void meta_error_trap_push (MetaX11Display *x11_display);
void meta_error_trap_pop (MetaX11Display *x11_display);
void meta_x11_error_trap_push (MetaX11Display *x11_display);
void meta_x11_error_trap_pop (MetaX11Display *x11_display);
/* returns X error code, or 0 for no error */
int meta_error_trap_pop_with_return (MetaX11Display *x11_display);
int meta_x11_error_trap_pop_with_return (MetaX11Display *x11_display);
#endif

View File

@ -26,7 +26,7 @@
#include "meta-window-wayland.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <errno.h>
#include <string.h> /* for strerror () */
#include "window-private.h"
@ -584,7 +584,7 @@ meta_window_wayland_new (MetaDisplay *display,
* X requests (passing a window xid of None) until we thoroughly audit all
* the code to make sure it knows about non X based clients...
*/
meta_error_trap_push (display->x11_display); /* Push a trap over all of window
meta_x11_error_trap_push (display->x11_display); /* Push a trap over all of window
* creation, to reduce XSync() calls
*/
@ -597,7 +597,7 @@ meta_window_wayland_new (MetaDisplay *display,
&attrs);
window->can_ping = TRUE;
meta_error_trap_pop (display->x11_display); /* pop the XSync()-reducing trap */
meta_x11_error_trap_pop (display->x11_display); /* pop the XSync()-reducing trap */
return window;
}

View File

@ -34,7 +34,7 @@
#include <X11/Xatom.h>
#include <X11/extensions/Xfixes.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "meta-xwayland.h"
#include "meta-xwayland-private.h"
#include "meta-xwayland-selection-private.h"
@ -654,10 +654,10 @@ wayland_selection_data_free (WaylandSelectionData *data)
/* Do *not* change the event mask on the root window, bugger! */
if (!data->window && data->request_event.requestor != x11_display->xroot)
{
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XSelectInput (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
data->request_event.requestor, NoEventMask);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
g_cancellable_cancel (data->cancellable);

View File

@ -28,7 +28,7 @@
#include <X11/extensions/Xdamage.h>
#include <X11/extensions/shape.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "meta/meta-backend.h"
#include "bell.h"
#include "display-private.h"
@ -537,10 +537,10 @@ meta_spew_core_event (MetaX11Display *x11_display,
name = "PropertyNotify";
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
str = XGetAtomName (x11_display->xdisplay,
event->xproperty.atom);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
if (event->xproperty.state == PropertyNewValue)
state = "PropertyNewValue";
@ -571,10 +571,10 @@ meta_spew_core_event (MetaX11Display *x11_display,
{
char *str;
name = "ClientMessage";
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
str = XGetAtomName (x11_display->xdisplay,
event->xclient.message_type);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
extra = g_strdup_printf ("type: %s format: %d\n",
str ? str : "(unknown atom)",
event->xclient.format);
@ -978,12 +978,12 @@ process_request_frame_extents (MetaX11Display *x11_display,
"to top = %lu, left = %lu, bottom = %lu, right = %lu\n",
xwindow, data[0], data[1], data[2], data[3]);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay, xwindow,
x11_display->atom__NET_FRAME_EXTENTS,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 4);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
meta_XFree (hints);
}
@ -1004,7 +1004,7 @@ convert_property (MetaX11Display *x11_display,
conversion_targets[2] = x11_display->atom_TIMESTAMP;
conversion_targets[3] = x11_display->atom_VERSION;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
if (target == x11_display->atom_TARGETS)
XChangeProperty (x11_display->xdisplay, w, property,
XA_ATOM, 32, PropModeReplace,
@ -1019,11 +1019,11 @@ convert_property (MetaX11Display *x11_display,
(unsigned char *)icccm_version, 2);
else
{
meta_error_trap_pop_with_return (x11_display);
meta_x11_error_trap_pop_with_return (x11_display);
return FALSE;
}
if (meta_error_trap_pop_with_return (x11_display) != Success)
if (meta_x11_error_trap_pop_with_return (x11_display) != Success)
return FALSE;
/* Be sure the PropertyNotify has arrived so we
@ -1048,10 +1048,10 @@ process_selection_request (MetaX11Display *x11_display,
{
char *str;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
str = XGetAtomName (x11_display->xdisplay,
event->xselectionrequest.selection);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
meta_verbose ("Selection request with selection %s window 0x%lx not a WM_Sn selection we recognize\n",
str ? str : "(bad atom)", event->xselectionrequest.owner);
@ -1078,18 +1078,18 @@ process_selection_request (MetaX11Display *x11_display,
unsigned long num, rest;
unsigned char *data;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
if (XGetWindowProperty (x11_display->xdisplay,
event->xselectionrequest.requestor,
event->xselectionrequest.property, 0, 256, False,
x11_display->atom_ATOM_PAIR,
&type, &format, &num, &rest, &data) != Success)
{
meta_error_trap_pop_with_return (x11_display);
meta_x11_error_trap_pop_with_return (x11_display);
return;
}
if (meta_error_trap_pop_with_return (x11_display) == Success)
if (meta_x11_error_trap_pop_with_return (x11_display) == Success)
{
/* FIXME: to be 100% correct, should deal with rest > 0,
* but since we have 4 possible targets, we will hardly ever
@ -1106,13 +1106,13 @@ process_selection_request (MetaX11Display *x11_display,
i += 2;
}
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
event->xselectionrequest.requestor,
event->xselectionrequest.property,
x11_display->atom_ATOM_PAIR,
32, PropModeReplace, data, num);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
meta_XFree (data);
}
}
@ -1145,10 +1145,10 @@ process_selection_clear (MetaX11Display *x11_display,
{
char *str;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
str = XGetAtomName (x11_display->xdisplay,
event->xselectionclear.selection);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
meta_verbose ("Selection clear with selection %s window 0x%lx not a WM_Sn selection we recognize\n",
str ? str : "(bad atom)", event->xselectionclear.window);
@ -1312,9 +1312,9 @@ handle_other_xevent (MetaX11Display *x11_display,
{
meta_warning ("Unexpected destruction of frame 0x%lx, not sure if this should silently fail or be considered a bug\n",
window->frame->xwindow);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
meta_window_destroy_frame (window->frame->window);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
else
{
@ -1451,10 +1451,10 @@ handle_other_xevent (MetaX11Display *x11_display,
meta_verbose ("Configuring withdrawn window to %d,%d %dx%d border %d (some values may not be in mask)\n",
xwc.x, xwc.y, xwc.width, xwc.height, xwc.border_width);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XConfigureWindow (x11_display->xdisplay, event->xconfigurerequest.window,
xwcm, &xwc);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
else
{

View File

@ -24,7 +24,7 @@
#include "x11/meta-x11-display-private.h"
#include "iconcache.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <cairo.h>
#include <cairo-xlib.h>
@ -210,7 +210,7 @@ read_rgb_icon (MetaX11Display *x11_display,
int mini_w, mini_h;
gulong *data_as_long;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
type = None;
data = NULL;
result = XGetWindowProperty (x11_display->xdisplay,
@ -219,7 +219,7 @@ read_rgb_icon (MetaX11Display *x11_display,
0, G_MAXLONG,
False, XA_CARDINAL, &type, &format, &nitems,
&bytes_after, &data);
err = meta_error_trap_pop_with_return (x11_display);
err = meta_x11_error_trap_pop_with_return (x11_display);
if (err != Success ||
result != Success)
@ -340,7 +340,7 @@ try_pixmap_and_mask (MetaX11Display *x11_display,
if (src_pixmap == None)
return FALSE;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
get_pixmap_geometry (x11_display, src_pixmap, &w, &h, &d);
icon = surface_from_pixmap (xdisplay, src_pixmap, w, h);
@ -353,7 +353,7 @@ try_pixmap_and_mask (MetaX11Display *x11_display,
mask = surface_from_pixmap (xdisplay, src_mask, w, h);
}
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
if (icon && mask)
{
@ -404,7 +404,7 @@ get_kwm_win_icon (MetaX11Display *x11_display,
*pixmap = None;
*mask = None;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
icons = NULL;
result = XGetWindowProperty (x11_display->xdisplay, xwindow,
x11_display->atom__KWM_WIN_ICON,
@ -415,7 +415,7 @@ get_kwm_win_icon (MetaX11Display *x11_display,
&bytes_after, &data);
icons = (Pixmap *)data;
err = meta_error_trap_pop_with_return (x11_display);
err = meta_x11_error_trap_pop_with_return (x11_display);
if (err != Success ||
result != Success)
return;

View File

@ -57,8 +57,8 @@
#include "core/frame.h"
#include "core/util-private.h"
#include "core/workspace-private.h"
#include "meta/errors.h"
#include "meta/main.h"
#include "meta/meta-x11-errors.h"
#include "x11/events.h"
#include "x11/group-props.h"
@ -177,9 +177,9 @@ meta_x11_display_dispose (GObject *object)
if (x11_display->xroot != None)
{
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XSelectInput (x11_display->xdisplay, x11_display->xroot, 0);
if (meta_error_trap_pop_with_return (x11_display) != Success)
if (meta_x11_error_trap_pop_with_return (x11_display) != Success)
meta_warning ("Could not release screen %d on display \"%s\"\n",
DefaultScreen (x11_display->xdisplay),
x11_display->name);
@ -513,13 +513,13 @@ set_desktop_geometry_hint (MetaX11Display *x11_display)
meta_verbose ("Setting _NET_DESKTOP_GEOMETRY to %lu, %lu\n", data[0], data[1]);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
x11_display->xroot,
x11_display->atom__NET_DESKTOP_GEOMETRY,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 2);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void
@ -538,13 +538,13 @@ set_desktop_viewport_hint (MetaX11Display *x11_display)
meta_verbose ("Setting _NET_DESKTOP_VIEWPORT to 0, 0\n");
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
x11_display->xroot,
x11_display->atom__NET_DESKTOP_VIEWPORT,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 2);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static int
@ -645,10 +645,10 @@ take_manager_selection (MetaX11Display *x11_display,
if (should_replace)
{
/* We want to find out when the current selection owner dies */
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
attrs.event_mask = StructureNotifyMask;
XChangeWindowAttributes (x11_display->xdisplay, current_owner, CWEventMask, &attrs);
if (meta_error_trap_pop_with_return (x11_display) != Success)
if (meta_x11_error_trap_pop_with_return (x11_display) != Success)
current_owner = None; /* don't wait for it to die later on */
}
else
@ -805,13 +805,13 @@ set_active_workspace_hint (MetaDisplay *display,
meta_verbose ("Setting _NET_CURRENT_DESKTOP to %lu\n", data[0]);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
x11_display->xroot,
x11_display->atom__NET_CURRENT_DESKTOP,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 1);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void
@ -829,13 +829,13 @@ set_number_of_spaces_hint (MetaDisplay *display,
meta_verbose ("Setting _NET_NUMBER_OF_DESKTOPS to %lu\n", data[0]);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
x11_display->xroot,
x11_display->atom__NET_NUMBER_OF_DESKTOPS,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 1);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void
@ -846,13 +846,13 @@ set_showing_desktop_hint (MetaDisplay *display,
data[0] = display->active_workspace->showing_desktop ? 1 : 0;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
x11_display->xroot,
x11_display->atom__NET_SHOWING_DESKTOP,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 1);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void
@ -881,14 +881,14 @@ set_workspace_names (MetaX11Display *x11_display)
++i;
}
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
x11_display->xroot,
x11_display->atom__NET_DESKTOP_NAMES,
x11_display->atom_UTF8_STRING,
8, PropModeReplace,
(unsigned char *)flattened->str, flattened->len);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
g_string_free (flattened, TRUE);
}
@ -919,13 +919,13 @@ set_work_area_hint (MetaDisplay *display,
tmp += 4;
}
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
x11_display->xroot,
x11_display->atom__NET_WORKAREA,
XA_CARDINAL, 32, PropModeReplace,
(guchar*) data, num_workspaces*4);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
g_free (data);
}
@ -1746,13 +1746,13 @@ meta_x11_display_update_active_window_hint (MetaX11Display *x11_display)
else
data[0] = None;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
x11_display->xroot,
x11_display->atom__NET_ACTIVE_WINDOW,
XA_WINDOW,
32, PropModeReplace, (guchar*) data, 1);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void
@ -1766,7 +1766,7 @@ request_xserver_input_focus_change (MetaX11Display *x11_display,
if (meta_display_timestamp_too_old (x11_display->display, &timestamp))
return;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
/* In order for mutter to know that the focus request succeeded, we track
* the serial of the "focus request" we made, but if we take the serial
@ -1799,7 +1799,7 @@ request_xserver_input_focus_change (MetaX11Display *x11_display,
serial,
TRUE);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
x11_display->display->last_focus_time = timestamp;

View File

@ -25,7 +25,7 @@
*/
#include <config.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <errno.h>
#include <stdlib.h>
#include <gdk/gdkx.h>
@ -44,19 +44,19 @@
*/
void
meta_error_trap_push (MetaX11Display *x11_display)
meta_x11_error_trap_push (MetaX11Display *x11_display)
{
gdk_x11_display_error_trap_push (x11_display->gdk_display);
}
void
meta_error_trap_pop (MetaX11Display *x11_display)
meta_x11_error_trap_pop (MetaX11Display *x11_display)
{
gdk_x11_display_error_trap_pop_ignored (x11_display->gdk_display);
}
int
meta_error_trap_pop_with_return (MetaX11Display *x11_display)
meta_x11_error_trap_pop_with_return (MetaX11Display *x11_display)
{
return gdk_x11_display_error_trap_pop (x11_display->gdk_display);
}

View File

@ -41,7 +41,7 @@
#include "window-x11.h"
#include "window-x11-private.h"
#include "x11/meta-x11-display-private.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "xprops.h"
#include "frame.h"
#include <meta/group.h>
@ -576,11 +576,11 @@ set_title_text (MetaWindow *window,
/* Bug 330671 -- Don't forget to clear _NET_WM_VISIBLE_(ICON_)NAME */
if (!modified && previous_was_modified)
{
meta_error_trap_push (window->display->x11_display);
meta_x11_error_trap_push (window->display->x11_display);
XDeleteProperty (window->display->x11_display->xdisplay,
window->xwindow,
atom);
meta_error_trap_pop (window->display->x11_display);
meta_x11_error_trap_pop (window->display->x11_display);
}
return modified;

View File

@ -39,7 +39,7 @@
#include "core.h"
#include <meta/common.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <meta/prefs.h>
#include <meta/meta-cursor-tracker.h>
@ -98,10 +98,10 @@ send_icccm_message (MetaWindow *window,
ev.data.l[0] = atom;
ev.data.l[1] = timestamp;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XSendEvent (x11_display->xdisplay,
window->xwindow, False, 0, (XEvent*) &ev);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static Window
@ -255,11 +255,11 @@ send_configure_notify (MetaWindow *window)
event.xconfigure.x, event.xconfigure.y,
event.xconfigure.width, event.xconfigure.height);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XSendEvent (x11_display->xdisplay,
window->xwindow,
False, StructureNotifyMask, &event);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void
@ -583,7 +583,7 @@ meta_window_x11_unmanage (MetaWindow *window)
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
MetaWindowX11Private *priv = meta_window_x11_get_instance_private (window_x11);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
meta_window_x11_destroy_sync_request_alarm (window);
@ -663,7 +663,7 @@ meta_window_x11_unmanage (MetaWindow *window)
meta_display_ungrab_window_buttons (window->display, window->xwindow);
meta_display_ungrab_focus_window_button (window->display, window);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
if (window->frame)
{
@ -692,7 +692,7 @@ meta_window_x11_delete (MetaWindow *window,
{
MetaX11Display *x11_display = window->display->x11_display;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
if (window->delete_window)
{
meta_topic (META_DEBUG_WINDOW_OPS,
@ -707,7 +707,7 @@ meta_window_x11_delete (MetaWindow *window,
window->desc);
XKillClient (x11_display->xdisplay, window->xwindow);
}
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void
@ -719,9 +719,9 @@ meta_window_x11_kill (MetaWindow *window)
"Disconnecting %s with XKillClient()\n",
window->desc);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XKillClient (x11_display->xdisplay, window->xwindow);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void
@ -905,12 +905,12 @@ update_net_frame_extents (MetaWindow *window)
"to left = %lu, right = %lu, top = %lu, bottom = %lu\n",
window->xwindow, data[0], data[1], data[2], data[3]);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay, window->xwindow,
x11_display->atom__NET_FRAME_EXTENTS,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 4);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static gboolean
@ -1025,12 +1025,12 @@ meta_window_x11_current_workspace_changed (MetaWindow *window)
meta_verbose ("Setting _NET_WM_DESKTOP of %s to %lu\n",
window->desc, data[0]);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay, window->xwindow,
x11_display->atom__NET_WM_DESKTOP,
XA_CARDINAL,
32, PropModeReplace, (guchar*) data, 1);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void
@ -1232,7 +1232,7 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
if (mask != 0)
{
meta_error_trap_push (window->display->x11_display);
meta_x11_error_trap_push (window->display->x11_display);
if (window == window->display->grab_window &&
meta_grab_op_is_resizing (window->display->grab_op) &&
@ -1249,7 +1249,7 @@ meta_window_x11_move_resize_internal (MetaWindow *window,
mask,
&values);
meta_error_trap_pop (window->display->x11_display);
meta_x11_error_trap_pop (window->display->x11_display);
}
if (!configure_frame_first && window->frame)
@ -1642,12 +1642,12 @@ meta_window_x11_set_net_wm_state (MetaWindow *window)
meta_verbose ("Setting _NET_WM_STATE with %d atoms\n", i);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay, window->xwindow,
x11_display->atom__NET_WM_STATE,
XA_ATOM,
32, PropModeReplace, (guchar*) data, i);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
if (window->fullscreen)
{
@ -1667,22 +1667,22 @@ meta_window_x11_set_net_wm_state (MetaWindow *window)
window->fullscreen_monitors.right);
meta_verbose ("Setting _NET_WM_FULLSCREEN_MONITORS\n");
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
window->xwindow,
x11_display->atom__NET_WM_FULLSCREEN_MONITORS,
XA_CARDINAL, 32, PropModeReplace,
(guchar*) data, 4);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
else
{
meta_verbose ("Clearing _NET_WM_FULLSCREEN_MONITORS\n");
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XDeleteProperty (x11_display->xdisplay,
window->xwindow,
x11_display->atom__NET_WM_FULLSCREEN_MONITORS);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
}
}
@ -1767,13 +1767,13 @@ meta_window_x11_update_input_region (MetaWindow *window)
XRectangle *rects = NULL;
int n_rects = -1, ordering;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
rects = XShapeGetRectangles (x11_display->xdisplay,
window->xwindow,
ShapeInput,
&n_rects,
&ordering);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
/* XXX: The X Shape specification is quite unfortunately specified.
*
@ -1874,7 +1874,7 @@ meta_window_x11_update_shape_region (MetaWindow *window)
unsigned w_bounding, h_bounding, w_clip, h_clip;
int bounding_shaped, clip_shaped;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XShapeQueryExtents (x11_display->xdisplay, window->xwindow,
&bounding_shaped, &x_bounding, &y_bounding,
&w_bounding, &h_bounding,
@ -1889,7 +1889,7 @@ meta_window_x11_update_shape_region (MetaWindow *window)
&n_rects,
&ordering);
}
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
if (rects)
{
@ -2346,14 +2346,14 @@ meta_window_x11_client_message (MetaWindow *window,
char *str1;
char *str2;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
str1 = XGetAtomName (x11_display->xdisplay, first);
if (meta_error_trap_pop_with_return (x11_display) != Success)
if (meta_x11_error_trap_pop_with_return (x11_display) != Success)
str1 = NULL;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
str2 = XGetAtomName (x11_display->xdisplay, second);
if (meta_error_trap_pop_with_return (x11_display) != Success)
if (meta_x11_error_trap_pop_with_return (x11_display) != Success)
str2 = NULL;
meta_verbose ("Request to change _NET_WM_STATE action %lu atom1: %s atom2: %s\n",
@ -2762,12 +2762,12 @@ set_wm_state_on_xwindow (MetaDisplay *display,
data[0] = state;
data[1] = None;
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
XChangeProperty (display->x11_display->xdisplay, xwindow,
display->x11_display->atom_WM_STATE,
display->x11_display->atom_WM_STATE,
32, PropModeReplace, (guchar*) data, 2);
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
}
void
@ -2820,7 +2820,7 @@ maybe_filter_xwindow (MetaDisplay *display,
filtered = TRUE;
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
success = XGetClassHint (display->x11_display->xdisplay,
xwindow, &class_hint);
@ -2865,7 +2865,7 @@ maybe_filter_xwindow (MetaDisplay *display,
XUnmapWindow (display->x11_display->xdisplay, xwindow);
}
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
return filtered;
}
@ -2946,7 +2946,7 @@ meta_window_x11_new (MetaDisplay *display,
return NULL;
}
meta_error_trap_push (x11_display); /* Push a trap over all of window
meta_x11_error_trap_push (x11_display); /* Push a trap over all of window
* creation, to reduce XSync() calls
*/
/*
@ -3011,7 +3011,7 @@ meta_window_x11_new (MetaDisplay *display,
*/
XAddToSaveSet (x11_display->xdisplay, xwindow);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
event_mask = PropertyChangeMask;
if (attrs.override_redirect)
@ -3055,7 +3055,7 @@ meta_window_x11_new (MetaDisplay *display,
&set_attrs);
}
if (meta_error_trap_pop_with_return (x11_display) != Success)
if (meta_x11_error_trap_pop_with_return (x11_display) != Success)
{
meta_verbose ("Window 0x%lx disappeared just as we tried to manage it\n",
xwindow);
@ -3082,11 +3082,11 @@ meta_window_x11_new (MetaDisplay *display,
meta_display_grab_focus_window_button (window->display, window);
}
meta_error_trap_pop (x11_display); /* pop the XSync()-reducing trap */
meta_x11_error_trap_pop (x11_display); /* pop the XSync()-reducing trap */
return window;
error:
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
return NULL;
}
@ -3140,10 +3140,10 @@ meta_window_x11_recalc_window_type (MetaWindow *window)
*/
type = META_WINDOW_NORMAL;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
atom_name = XGetAtomName (x11_display->xdisplay,
priv->type_atom);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
meta_warning ("Unrecognized type atom [%s] set for %s \n",
atom_name ? atom_name : "unknown",
@ -3306,12 +3306,12 @@ meta_window_x11_set_allowed_actions_hint (MetaWindow *window)
meta_verbose ("Setting _NET_WM_ALLOWED_ACTIONS with %d atoms\n", i);
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay, window->xwindow,
x11_display->atom__NET_WM_ALLOWED_ACTIONS,
XA_ATOM,
32, PropModeReplace, (guchar*) data, i);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
#undef MAX_N_ACTIONS
}
@ -3326,7 +3326,7 @@ meta_window_x11_create_sync_request_alarm (MetaWindow *window)
window->sync_request_alarm != None)
return;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
/* In the new (extended style), the counter value is initialized by
* the client before mapping the window. In the old style, we're
@ -3338,7 +3338,7 @@ meta_window_x11_create_sync_request_alarm (MetaWindow *window)
window->sync_request_counter,
&init))
{
meta_error_trap_pop_with_return (x11_display);
meta_x11_error_trap_pop_with_return (x11_display);
window->sync_request_counter = None;
return;
}
@ -3377,7 +3377,7 @@ meta_window_x11_create_sync_request_alarm (MetaWindow *window)
XSyncCAEvents,
&values);
if (meta_error_trap_pop_with_return (x11_display) == Success)
if (meta_x11_error_trap_pop_with_return (x11_display) == Success)
meta_x11_display_register_sync_alarm (x11_display, &window->sync_request_alarm, window);
else
{

View File

@ -84,7 +84,7 @@ from The Open Group.
#include <stdlib.h>
#include "xprops.h"
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "util-private.h"
#include "ui.h"
#include "mutter-Xatomtype.h"
@ -126,11 +126,11 @@ validate_or_free_results (GetPropertyResults *results,
(!must_have_items || results->n_items > 0))
return TRUE;
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
type_name = XGetAtomName (x11_display->xdisplay, results->type);
expected_name = XGetAtomName (x11_display->xdisplay, expected_type);
prop_name = XGetAtomName (x11_display->xdisplay, results->xatom);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
w = meta_x11_display_lookup_x_window (x11_display, results->xwindow);
@ -464,9 +464,9 @@ utf8_list_from_results (GetPropertyResults *results,
{
char *name;
meta_error_trap_push (results->x11_display);
meta_x11_error_trap_push (results->x11_display);
name = XGetAtomName (results->x11_display->xdisplay, results->xatom);
meta_error_trap_pop (results->x11_display);
meta_x11_error_trap_pop (results->x11_display);
meta_warning ("Property %s on window 0x%lx contained invalid UTF-8 for item %d in the list\n",
name, results->xwindow, i);
meta_XFree (name);
@ -518,12 +518,12 @@ meta_prop_set_utf8_string_hint (MetaX11Display *x11_display,
Atom atom,
const char *val)
{
meta_error_trap_push (x11_display);
meta_x11_error_trap_push (x11_display);
XChangeProperty (x11_display->xdisplay,
xwindow, atom,
x11_display->atom_UTF8_STRING,
8, PropModeReplace, (guchar*) val, strlen (val));
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static gboolean