[gtk+/gdk-backend: 60/91] Rename _gdk_send_xevent to _gdk_x11_display_send_xevent



commit ffa25c4d4472f7cba68d8777a9bb864861ccfeb2
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Dec 15 17:38:48 2010 -0500

    Rename _gdk_send_xevent to _gdk_x11_display_send_xevent

 gdk/x11/gdkdisplay-x11.c   |    2 +-
 gdk/x11/gdkdnd-x11.c       |   66 ++++++++++++++++++++++----------------------
 gdk/x11/gdkmain-x11.c      |   35 ++++++----------------
 gdk/x11/gdkprivate-x11.h   |   10 +++---
 gdk/x11/gdkscreen-x11.c    |    2 +-
 gdk/x11/gdkselection-x11.c |    2 +-
 6 files changed, 51 insertions(+), 66 deletions(-)
---
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index a3fefb9..40bf45a 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -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
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index b321f32..50a1cb7 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -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);
     }
 }
 
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index 361a434..9fe8700 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -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;
 }
 
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index b4dc1d1..859420a 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -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,
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index 1cc7fc5..e703b95 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -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;
diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c
index 49cdf3a..e90f522 100644
--- a/gdk/x11/gdkselection-x11.c
+++ b/gdk/x11/gdkselection-x11.c
@@ -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);
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]