Commit c7f0cffd authored by Benjamin Otte's avatar Benjamin Otte

plug/socket: Remove x11 checks and non-x11 code

parent 50e1589a
......@@ -37,12 +37,7 @@
#include "gtkwidgetprivate.h"
#include "gtkwindowprivate.h"
#ifdef GDK_WINDOWING_X11
#include "x11/gdkx.h"
#endif
#ifdef GDK_WINDOWING_WIN32
#include "win32/gdkwin32.h"
#endif
#include <gdk/gdkx.h>
/**
* SECTION:gtkplug
......@@ -527,11 +522,9 @@ gtk_plug_construct_for_display (GtkPlug *plug,
{
gpointer user_data = NULL;
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (display))
priv->socket_window = gdk_x11_window_lookup_for_display (display, socket_id);
else
#endif
priv->socket_window = NULL;
if (priv->socket_window)
......@@ -551,15 +544,8 @@ gtk_plug_construct_for_display (GtkPlug *plug,
else
g_object_ref (priv->socket_window);
}
else
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (display))
else if (GDK_IS_X11_DISPLAY (display))
priv->socket_window = gdk_x11_window_foreign_new_for_display (display, socket_id);
#endif
#ifdef GDK_WINDOWING_WIN32
if (GDK_IS_WIN32_DISPLAY (display))
priv->socket_window = gdk_win32_window_foreign_new_for_display (display, socket_id);
#endif
if (priv->socket_window) {
g_signal_emit (plug, plug_signals[EMBEDDED], 0);
......
......@@ -43,9 +43,7 @@
#include "gtkintl.h"
#include "gtkwidgetprivate.h"
#ifdef GDK_WINDOWING_X11
#include "x11/gdkx.h"
#endif
#include <gdk/gdkx.h>
/**
......@@ -873,11 +871,9 @@ _gtk_socket_add_window (GtkSocket *socket,
gpointer user_data = NULL;
GtkSocketPrivate *private = socket->priv;
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (display))
private->plug_window = gdk_x11_window_lookup_for_display (display, xid);
else
#endif
private->plug_window = NULL;
if (private->plug_window)
......@@ -910,10 +906,8 @@ _gtk_socket_add_window (GtkSocket *socket,
if (!private->plug_window)
{
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY (display))
private->plug_window = gdk_x11_window_foreign_new_for_display (display, xid);
#endif
if (!private->plug_window) /* was deleted before we could get it */
{
gdk_error_trap_pop_ignored ();
......
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