Commit 566abbad authored by Matthias Clasen's avatar Matthias Clasen

Rename _gdk_send_xevent to _gdk_x11_display_send_xevent

parent 28b7c6f0
......@@ -2322,7 +2322,7 @@ gdk_x11_display_send_client_message (GdkDisplay *display,
memcpy(&sev.xclient.data, &event->client.data, sizeof (sev.xclient.data));
sev.xclient.message_type = gdk_x11_atom_to_xatom_for_display (display, event->client.message_type);
return _gdk_send_xevent (display, winid, False, NoEventMask, &sev);
return _gdk_x11_display_send_xevent (display, winid, False, NoEventMask, &sev);
}
static void
......
......@@ -1449,12 +1449,12 @@ motif_send_enter (GdkDragContextX11 *context_x11,
MOTIF_XCLIENT_LONG (&xev, 3) = context_x11->motif_selection;
MOTIF_XCLIENT_LONG (&xev, 4) = 0;
if (!_gdk_send_xevent (display,
GDK_WINDOW_XID (context->dest_window),
FALSE, 0, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window)));
if (!_gdk_x11_display_send_xevent (display,
GDK_WINDOW_XID (context->dest_window),
FALSE, 0, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window)));
}
static void
......@@ -1478,12 +1478,12 @@ motif_send_leave (GdkDragContextX11 *context_x11,
MOTIF_XCLIENT_LONG (&xev, 3) = 0;
MOTIF_XCLIENT_LONG (&xev, 4) = 0;
if (!_gdk_send_xevent (display,
GDK_WINDOW_XID (context->dest_window),
FALSE, 0, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window)));
if (!_gdk_x11_display_send_xevent (display,
GDK_WINDOW_XID (context->dest_window),
FALSE, 0, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window)));
}
static gboolean
......@@ -1528,12 +1528,12 @@ motif_send_motion (GdkDragContextX11 *context_x11,
retval = FALSE;
}
if (!_gdk_send_xevent (display,
GDK_WINDOW_XID (context->dest_window),
FALSE, 0, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window)));
if (!_gdk_x11_display_send_xevent (display,
GDK_WINDOW_XID (context->dest_window),
FALSE, 0, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window)));
return retval;
}
......@@ -1562,12 +1562,12 @@ motif_send_drop (GdkDragContextX11 *context_x11,
MOTIF_XCLIENT_LONG (&xev, 3) = context_x11->motif_selection;
MOTIF_XCLIENT_LONG (&xev, 4) = GDK_WINDOW_XID (context->source_window);
if (!_gdk_send_xevent (display,
GDK_WINDOW_XID (context->dest_window),
FALSE, 0, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window)));
if (!_gdk_x11_display_send_xevent (display,
GDK_WINDOW_XID (context->dest_window),
FALSE, 0, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->dest_window)));
}
/* Target Side */
......@@ -3613,12 +3613,12 @@ gdk_drag_context_x11_drag_status (GdkDragContext *context,
MOTIF_XCLIENT_LONG (&xev, 3) = 0;
MOTIF_XCLIENT_LONG (&xev, 4) = 0;
if (!_gdk_send_xevent (display,
GDK_WINDOW_XID (context->source_window),
FALSE, 0, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->source_window)));
if (!_gdk_x11_display_send_xevent (display,
GDK_WINDOW_XID (context->source_window),
FALSE, 0, &xev))
GDK_NOTE (DND,
g_message ("Send event to %lx failed",
GDK_WINDOW_XID (context->source_window)));
}
else if (context->protocol == GDK_DRAG_PROTO_XDND)
{
......@@ -3676,9 +3676,9 @@ gdk_drag_context_x11_drop_reply (GdkDragContext *context,
MOTIF_XCLIENT_LONG (&xev, 3) = 0;
MOTIF_XCLIENT_LONG (&xev, 4) = 0;
_gdk_send_xevent (display,
GDK_WINDOW_XID (context->source_window),
FALSE, 0, &xev);
_gdk_x11_display_send_xevent (display,
GDK_WINDOW_XID (context->source_window),
FALSE, 0, &xev);
}
}
......
......@@ -461,27 +461,12 @@ gdk_error_trap_pop (void)
return gdk_error_trap_pop_internal (TRUE);
}
/**
* _gdk_send_xevent:
* @display: #GdkDisplay which @window is on
* @window: window ID to which to send the event
* @propagate: %TRUE if the event should be propagated if the target window
* doesn't handle it.
* @event_mask: event mask to match against, or 0 to send it to @window
* without regard to event masks.
* @event_send: #XEvent to send
*
* Send an event, like XSendEvent(), but trap errors and check
* the result.
*
* Return value: %TRUE if sending the event succeeded.
**/
gint
_gdk_send_xevent (GdkDisplay *display,
Window window,
gboolean propagate,
glong event_mask,
XEvent *event_send)
gint
_gdk_x11_display_send_xevent (GdkDisplay *display,
Window window,
gboolean propagate,
glong event_mask,
XEvent *event_send)
{
gboolean result;
......@@ -489,13 +474,13 @@ _gdk_send_xevent (GdkDisplay *display,
return FALSE;
gdk_x11_display_error_trap_push (display);
result = XSendEvent (GDK_DISPLAY_XDISPLAY (display), window,
propagate, event_mask, event_send);
result = XSendEvent (GDK_DISPLAY_XDISPLAY (display), window,
propagate, event_mask, event_send);
XSync (GDK_DISPLAY_XDISPLAY (display), False);
if (gdk_x11_display_error_trap_pop (display))
return FALSE;
return result;
}
......
......@@ -83,11 +83,11 @@ void _gdk_xid_table_remove (GdkDisplay *display,
gpointer _gdk_xid_table_lookup (GdkDisplay *display,
XID xid);
gint _gdk_send_xevent (GdkDisplay *display,
Window window,
gboolean propagate,
glong event_mask,
XEvent *event_send);
gint _gdk_x11_display_send_xevent (GdkDisplay *display,
Window window,
gboolean propagate,
glong event_mask,
XEvent *event_send);
/* Routines from gdkgeometry-x11.c */
void _gdk_window_move_resize_child (GdkWindow *window,
......
......@@ -1135,7 +1135,7 @@ gdk_event_send_client_message_to_all_recurse (GdkDisplay *display,
if (send || (!found && (level == 1)))
{
xev->xclient.window = xid;
_gdk_send_xevent (display, xid, False, NoEventMask, xev);
_gdk_x11_display_send_xevent (display, xid, False, NoEventMask, xev);
}
result = send || found;
......
......@@ -415,7 +415,7 @@ gdk_selection_send_notify_for_display (GdkDisplay *display,
xevent.property = gdk_x11_atom_to_xatom_for_display (display, property);
xevent.time = time;
_gdk_send_xevent (display, requestor, False, NoEventMask, (XEvent*) & xevent);
_gdk_x11_display_send_xevent (display, requestor, False, NoEventMask, (XEvent*) & xevent);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment