-/* GTK - The GTK+ Toolkit
+/* GTK - The GIMP Toolkit
* gtkxembed.c: Utilities for the XEMBED protocol
* Copyright (C) 2001, 2003, Red Hat, Inc.
*
* 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 "gtkmain.h"
#include "gtkprivate.h"
#include "gtkxembed.h"
-#include "gtkalias.h"
+#include "gtkdebug.h"
+
typedef struct _GtkXEmbedMessage GtkXEmbedMessage;
/**
* _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
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;
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