]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkxembed.c
filechooserbutton: whitespace fixes
[~andy/gtk] / gtk / gtkxembed.c
index c1feb5725203c31512994b1609ba233b6a108b77..88a9304ea901138773fe9183ce1617cebb2f7e65 100644 (file)
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include <config.h>
+#include "config.h"
 #include <string.h>
 #include "gtkmain.h"
 #include "gtkprivate.h"
 #include "gtkxembed.h"
-#include "gtkalias.h"
+#include "gtkdebug.h"
+
 
 typedef struct _GtkXEmbedMessage GtkXEmbedMessage;
 
@@ -123,7 +122,7 @@ gtk_xembed_get_time (void)
 
 /**
  * _gtk_xembed_send_message:
- * @recipient: window to which to send the window, or %NULL
+ * @recipient: (allow-none): window to which to send the window, or %NULL
  *             in which case nothing will be sent
  * @message:   type of message
  * @detail:    detail field of message
@@ -147,12 +146,12 @@ _gtk_xembed_send_message (GdkWindow        *recipient,
          
   g_return_if_fail (GDK_IS_WINDOW (recipient));
 
-  display = gdk_drawable_get_display (recipient);
+  display = gdk_window_get_display (recipient);
   GTK_NOTE (PLUGSOCKET,
            g_message ("Sending %s", _gtk_xembed_message_name (message)));
 
   memset (&xclient, 0, sizeof (xclient));
-  xclient.window = GDK_WINDOW_XWINDOW (recipient);
+  xclient.window = GDK_WINDOW_XID (recipient);
   xclient.type = ClientMessage;
   xclient.message_type = gdk_x11_get_xatom_by_name_for_display (display, "_XEMBED");
   xclient.format = 32;
@@ -164,15 +163,14 @@ _gtk_xembed_send_message (GdkWindow        *recipient,
 
   gdk_error_trap_push ();
   XSendEvent (GDK_WINDOW_XDISPLAY(recipient),
-             GDK_WINDOW_XWINDOW (recipient),
+             GDK_WINDOW_XID (recipient),
              False, NoEventMask, (XEvent *)&xclient);
-  gdk_display_sync (display);
-  gdk_error_trap_pop ();
+  gdk_error_trap_pop_ignored ();
 }
 
 /**
  * _gtk_xembed_send_focus_message:
- * @recipient: window to which to send the window, or %NULL
+ * @recipient: (allow-none): window to which to send the window, or %NULL
  *             in which case nothing will be sent
  * @message:   type of message
  * @detail:    detail field of message