Commit 390314ad authored by Armin Krezović's avatar Armin Krezović Committed by Jonas Ådahl

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

https://bugzilla.gnome.org/show_bug.cgi?id=759538
parent 2ac7afe8
......@@ -14,7 +14,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
......@@ -26,6 +25,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
......@@ -289,8 +289,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 \
......@@ -332,6 +330,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 \
......@@ -536,7 +536,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 \
......@@ -560,6 +559,7 @@ libmutterinclude_headers = \
meta/meta-window-group.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 \
......
......@@ -33,7 +33,7 @@
#include <string.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>
......
......@@ -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-crtc.h"
#include "backends/meta-logical-monitor.h"
......
......@@ -46,7 +46,7 @@
#include <unistd.h>
#include <meta/main.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include <gudev/gudev.h>
......
......@@ -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
......@@ -63,9 +63,9 @@ device_free_xdevice (gpointer user_data)
Display *xdisplay = meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));
XDevice *xdev = user_data;
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
XCloseDevice (xdisplay, xdev);
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
}
static XDevice *
......@@ -81,9 +81,9 @@ device_ensure_xdevice (ClutterInputDevice *device)
if (xdev)
return xdev;
meta_error_trap_push (display->x11_display);
meta_x11_error_trap_push (display->x11_display);
xdev = XOpenDevice (xdisplay, device_id);
meta_error_trap_pop (display->x11_display);
meta_x11_error_trap_pop (display->x11_display);
if (xdev)
{
......@@ -586,7 +586,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 = device_ensure_xdevice (device);
if (xdev)
{
......@@ -595,7 +595,7 @@ meta_input_settings_x11_set_tablet_mapping (MetaInputSettings *settings,
Absolute : Relative);
}
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));
......@@ -782,7 +782,6 @@ meta_input_settings_x11_set_stylus_button_map (MetaInputSettings *setti
return;
/* Grab the puke bucket! */
meta_error_trap_push (display->x11_display);
xdev = device_ensure_xdevice (device);
if (xdev)
{
......@@ -800,7 +799,7 @@ meta_input_settings_x11_set_stylus_button_map (MetaInputSettings *setti
XSetDeviceButtonMapping (xdisplay, xdev, map, G_N_ELEMENTS (map));
}
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));
......
......@@ -39,7 +39,7 @@
#include "meta-backend-x11.h"
#include <meta/main.h>
#include <meta/errors.h>
#include <meta/meta-x11-errors.h>
#include "backends/meta-crtc.h"
#include "backends/meta-monitor-config-manager.h"
#include "backends/meta-logical-monitor.h"
......
......@@ -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>
......@@ -467,11 +467,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)
......@@ -663,12 +663,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
......
......@@ -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"
......
......@@ -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"
......
......@@ -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
......
......@@ -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>
......@@ -1990,10 +1990,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
......@@ -2067,10 +2067,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
......
......@@ -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"
......
......@@ -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>
......
......@@ -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"
......
......@@ -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);
......
......@@ -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>
......@@ -3031,7 +3031,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);
......@@ -3042,7 +3042,7 @@ handle_panel (MetaDisplay *display,
StructureNotifyMask,
(XEvent*) &ev);
meta_error_trap_pop (x11_display);
meta_x11_error_trap_pop (x11_display);
}
static void
......
......@@ -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>
......
......@@ -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);
}
}
......
......@@ -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>
......
......@@ -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
......
......@@ -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"
......@@ -761,7 +761,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);
......@@ -771,7 +771,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 gboolean
......@@ -6775,7 +6775,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",
......@@ -6797,7 +6797,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);
......@@ -8044,14 +8044,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;
......
......@@ -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>
......
......@@ -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
......@@ -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"
......@@ -614,7 +614,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
*/
......@@ -627,7 +627,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;
}
......
......@@ -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);
......
......@@ -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;