1
0
Fork 0

errors: Kill off meta_error_trap_push_with_return

It isn't special; it's just an alias for meta_error_trap_push.
This commit is contained in:
Jasper St. Pierre 2014-04-06 15:52:44 -04:00
parent 75de29f5f7
commit b9e9595e8b
11 changed files with 18 additions and 25 deletions

View file

@ -491,7 +491,7 @@ redirect_windows (MetaScreen *screen)
*/ */
while (TRUE) while (TRUE)
{ {
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
XCompositeRedirectSubwindows (xdisplay, xroot, CompositeRedirectManual); XCompositeRedirectSubwindows (xdisplay, xroot, CompositeRedirectManual);
XSync (xdisplay, FALSE); XSync (xdisplay, FALSE);

View file

@ -2206,7 +2206,7 @@ meta_change_button_grab (MetaDisplay *display,
mods = (XIGrabModifiers) { modmask | ignored_mask, 0 }; mods = (XIGrabModifiers) { modmask | ignored_mask, 0 };
if (meta_is_debugging ()) if (meta_is_debugging ())
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
/* GrabModeSync means freeze until XAllowEvents */ /* GrabModeSync means freeze until XAllowEvents */

View file

@ -55,12 +55,6 @@ meta_error_trap_pop (MetaDisplay *display)
gdk_error_trap_pop_ignored (); gdk_error_trap_pop_ignored ();
} }
void
meta_error_trap_push_with_return (MetaDisplay *display)
{
gdk_error_trap_push ();
}
int int
meta_error_trap_pop_with_return (MetaDisplay *display) meta_error_trap_pop_with_return (MetaDisplay *display)
{ {

View file

@ -1051,7 +1051,7 @@ convert_property (MetaDisplay *display,
conversion_targets[2] = display->atom_TIMESTAMP; conversion_targets[2] = display->atom_TIMESTAMP;
conversion_targets[3] = display->atom_VERSION; conversion_targets[3] = display->atom_VERSION;
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
if (target == display->atom_TARGETS) if (target == display->atom_TARGETS)
XChangeProperty (display->xdisplay, w, property, XChangeProperty (display->xdisplay, w, property,
XA_ATOM, 32, PropModeReplace, XA_ATOM, 32, PropModeReplace,
@ -1126,7 +1126,7 @@ process_selection_request (MetaDisplay *display,
unsigned long num, rest; unsigned long num, rest;
unsigned char *data; unsigned char *data;
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
if (XGetWindowProperty (display->xdisplay, if (XGetWindowProperty (display->xdisplay,
event->xselectionrequest.requestor, event->xselectionrequest.requestor,
event->xselectionrequest.property, 0, 256, False, event->xselectionrequest.property, 0, 256, False,

View file

@ -1065,7 +1065,7 @@ meta_change_keygrab (MetaDisplay *display,
mods = (XIGrabModifiers) { modmask | ignored_mask, 0 }; mods = (XIGrabModifiers) { modmask | ignored_mask, 0 };
if (meta_is_debugging ()) if (meta_is_debugging ())
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
if (grab) if (grab)
XIGrabKeycode (display->xdisplay, XIGrabKeycode (display->xdisplay,
META_VIRTUAL_CORE_KEYBOARD_ID, META_VIRTUAL_CORE_KEYBOARD_ID,
@ -1410,7 +1410,7 @@ grab_keyboard (MetaDisplay *display,
/* Grab the keyboard, so we get key releases and all key /* Grab the keyboard, so we get key releases and all key
* presses * presses
*/ */
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
/* Strictly, we only need to set grab_mode on the keyboard device /* Strictly, we only need to set grab_mode on the keyboard device
* while the pointer should always be XIGrabModeAsync. Unfortunately * while the pointer should always be XIGrabModeAsync. Unfortunately

View file

@ -560,7 +560,7 @@ meta_screen_new (MetaDisplay *display,
} }
/* We want to find out when the current selection owner dies */ /* We want to find out when the current selection owner dies */
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
attrs.event_mask = StructureNotifyMask; attrs.event_mask = StructureNotifyMask;
XChangeWindowAttributes (xdisplay, XChangeWindowAttributes (xdisplay,
current_wm_sn_owner, CWEventMask, &attrs); current_wm_sn_owner, CWEventMask, &attrs);
@ -619,7 +619,7 @@ meta_screen_new (MetaDisplay *display,
} }
/* select our root window events */ /* select our root window events */
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
/* We need to or with the existing event mask since /* We need to or with the existing event mask since
* gtk+ may be interested in other events. * gtk+ may be interested in other events.
@ -838,7 +838,7 @@ meta_screen_free (MetaScreen *screen,
meta_stack_free (screen->stack); meta_stack_free (screen->stack);
meta_stack_tracker_free (screen->stack_tracker); meta_stack_tracker_free (screen->stack_tracker);
meta_error_trap_push_with_return (screen->display); meta_error_trap_push (screen->display);
XSelectInput (screen->display->xdisplay, screen->xroot, 0); XSelectInput (screen->display->xdisplay, screen->xroot, 0);
if (meta_error_trap_pop_with_return (screen->display) != Success) if (meta_error_trap_pop_with_return (screen->display) != Success)
meta_warning ("Could not release screen %d on display \"%s\"\n", meta_warning ("Could not release screen %d on display \"%s\"\n",

View file

@ -3953,7 +3953,7 @@ meta_window_create_sync_request_alarm (MetaWindow *window)
window->sync_request_alarm != None) window->sync_request_alarm != None)
return; return;
meta_error_trap_push_with_return (window->display); meta_error_trap_push (window->display);
/* In the new (extended style), the counter value is initialized by /* In the new (extended style), the counter value is initialized by
* the client before mapping the window. In the old style, we're * the client before mapping the window. In the old style, we're
@ -8038,7 +8038,7 @@ warp_grab_pointer (MetaWindow *window,
*x = CLAMP (*x, 0, window->screen->rect.width-1); *x = CLAMP (*x, 0, window->screen->rect.width-1);
*y = CLAMP (*y, 0, window->screen->rect.height-1); *y = CLAMP (*y, 0, window->screen->rect.height-1);
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
meta_topic (META_DEBUG_WINDOW_OPS, meta_topic (META_DEBUG_WINDOW_OPS,
"Warping pointer to %d,%d with window at %d,%d\n", "Warping pointer to %d,%d with window at %d,%d\n",

View file

@ -30,7 +30,6 @@
void meta_error_trap_push (MetaDisplay *display); void meta_error_trap_push (MetaDisplay *display);
void meta_error_trap_pop (MetaDisplay *display); void meta_error_trap_pop (MetaDisplay *display);
void meta_error_trap_push_with_return (MetaDisplay *display);
/* returns X error code, or 0 for no error */ /* returns X error code, or 0 for no error */
int meta_error_trap_pop_with_return (MetaDisplay *display); int meta_error_trap_pop_with_return (MetaDisplay *display);

View file

@ -230,7 +230,7 @@ read_rgb_icon (MetaDisplay *display,
int mini_w, mini_h; int mini_w, mini_h;
gulong *data_as_long; gulong *data_as_long;
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
type = None; type = None;
data = NULL; data = NULL;
result = XGetWindowProperty (display->xdisplay, result = XGetWindowProperty (display->xdisplay,
@ -504,7 +504,7 @@ get_kwm_win_icon (MetaDisplay *display,
*pixmap = None; *pixmap = None;
*mask = None; *mask = None;
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
icons = NULL; icons = NULL;
result = XGetWindowProperty (display->xdisplay, xwindow, result = XGetWindowProperty (display->xdisplay, xwindow,
display->atom__KWM_WIN_ICON, display->atom__KWM_WIN_ICON,

View file

@ -1665,12 +1665,12 @@ meta_window_x11_client_message (MetaWindow *window,
char *str1; char *str1;
char *str2; char *str2;
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
str1 = XGetAtomName (display->xdisplay, first); str1 = XGetAtomName (display->xdisplay, first);
if (meta_error_trap_pop_with_return (display) != Success) if (meta_error_trap_pop_with_return (display) != Success)
str1 = NULL; str1 = NULL;
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
str2 = XGetAtomName (display->xdisplay, second); str2 = XGetAtomName (display->xdisplay, second);
if (meta_error_trap_pop_with_return (display) != Success) if (meta_error_trap_pop_with_return (display) != Success)
str2 = NULL; str2 = NULL;
@ -2298,7 +2298,7 @@ meta_window_x11_new (MetaDisplay *display,
wm_state_to_string (existing_wm_state)); wm_state_to_string (existing_wm_state));
} }
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
/* /*
* XAddToSaveSet can only be called on windows created by a different * XAddToSaveSet can only be called on windows created by a different
@ -2309,7 +2309,7 @@ meta_window_x11_new (MetaDisplay *display,
*/ */
XAddToSaveSet (display->xdisplay, xwindow); XAddToSaveSet (display->xdisplay, xwindow);
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
event_mask = PropertyChangeMask; event_mask = PropertyChangeMask;
if (attrs.override_redirect) if (attrs.override_redirect)

View file

@ -191,7 +191,7 @@ get_property (MetaDisplay *display,
results->bytes_after = 0; results->bytes_after = 0;
results->format = 0; results->format = 0;
meta_error_trap_push_with_return (display); meta_error_trap_push (display);
if (XGetWindowProperty (display->xdisplay, xwindow, xatom, if (XGetWindowProperty (display->xdisplay, xwindow, xatom,
0, G_MAXLONG, 0, G_MAXLONG,
False, req_type, &results->type, &results->format, False, req_type, &results->type, &results->format,