forked from AuroraMiddleware/gtk
window: Get rid of GdkNativeWindow usage
Make _gtk_window_add_embedded_xid() and _gtk_window_remove_embedded_xid() take a Window.
This commit is contained in:
parent
bd4ef49af9
commit
63aa56bcc4
@ -2296,7 +2296,7 @@ gtk_window_list_toplevels (void)
|
|||||||
|
|
||||||
#ifdef GDK_WINDOWING_X11
|
#ifdef GDK_WINDOWING_X11
|
||||||
void
|
void
|
||||||
_gtk_window_add_embedded_xid (GtkWindow *window, GdkNativeWindow xid)
|
_gtk_window_add_embedded_xid (GtkWindow *window, Window xid)
|
||||||
{
|
{
|
||||||
GList *embedded_windows;
|
GList *embedded_windows;
|
||||||
|
|
||||||
@ -2306,7 +2306,7 @@ _gtk_window_add_embedded_xid (GtkWindow *window, GdkNativeWindow xid)
|
|||||||
if (embedded_windows)
|
if (embedded_windows)
|
||||||
g_object_steal_qdata (G_OBJECT (window), quark_gtk_embedded);
|
g_object_steal_qdata (G_OBJECT (window), quark_gtk_embedded);
|
||||||
embedded_windows = g_list_prepend (embedded_windows,
|
embedded_windows = g_list_prepend (embedded_windows,
|
||||||
GUINT_TO_POINTER (xid));
|
GDK_XID_TO_POINTER (xid));
|
||||||
|
|
||||||
g_object_set_qdata_full (G_OBJECT (window), quark_gtk_embedded,
|
g_object_set_qdata_full (G_OBJECT (window), quark_gtk_embedded,
|
||||||
embedded_windows,
|
embedded_windows,
|
||||||
@ -2315,7 +2315,7 @@ _gtk_window_add_embedded_xid (GtkWindow *window, GdkNativeWindow xid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_gtk_window_remove_embedded_xid (GtkWindow *window, GdkNativeWindow xid)
|
_gtk_window_remove_embedded_xid (GtkWindow *window, Window xid)
|
||||||
{
|
{
|
||||||
GList *embedded_windows;
|
GList *embedded_windows;
|
||||||
GList *node;
|
GList *node;
|
||||||
@ -2326,7 +2326,7 @@ _gtk_window_remove_embedded_xid (GtkWindow *window, GdkNativeWindow xid)
|
|||||||
if (embedded_windows)
|
if (embedded_windows)
|
||||||
g_object_steal_qdata (G_OBJECT (window), quark_gtk_embedded);
|
g_object_steal_qdata (G_OBJECT (window), quark_gtk_embedded);
|
||||||
|
|
||||||
node = g_list_find (embedded_windows, GUINT_TO_POINTER (xid));
|
node = g_list_find (embedded_windows, GDK_XID_TO_POINTER (xid));
|
||||||
if (node)
|
if (node)
|
||||||
{
|
{
|
||||||
embedded_windows = g_list_remove_link (embedded_windows, node);
|
embedded_windows = g_list_remove_link (embedded_windows, node);
|
||||||
@ -5931,7 +5931,7 @@ send_client_message_to_embedded_windows (GtkWidget *widget,
|
|||||||
|
|
||||||
while (embedded_windows)
|
while (embedded_windows)
|
||||||
{
|
{
|
||||||
GdkNativeWindow xid = GDK_GPOINTER_TO_NATIVE_WINDOW(embedded_windows->data);
|
Window xid = GDK_POINTER_TO_XID (embedded_windows->data);
|
||||||
gdk_event_send_client_message_for_display (gtk_widget_get_display (widget), send_event, xid);
|
gdk_event_send_client_message_for_display (gtk_widget_get_display (widget), send_event, xid);
|
||||||
embedded_windows = embedded_windows->next;
|
embedded_windows = embedded_windows->next;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,9 @@
|
|||||||
#define __GTK_WINDOW_PRIVATE_H__
|
#define __GTK_WINDOW_PRIVATE_H__
|
||||||
|
|
||||||
#include <gdk/gdk.h>
|
#include <gdk/gdk.h>
|
||||||
|
#ifdef GDK_WINDOWING_X11
|
||||||
|
#include <gdk/gdkx.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "gtkwindow.h"
|
#include "gtkwindow.h"
|
||||||
|
|
||||||
@ -30,10 +33,10 @@ G_BEGIN_DECLS
|
|||||||
void _gtk_window_internal_set_focus (GtkWindow *window,
|
void _gtk_window_internal_set_focus (GtkWindow *window,
|
||||||
GtkWidget *focus);
|
GtkWidget *focus);
|
||||||
#ifdef GDK_WINDOWING_X11
|
#ifdef GDK_WINDOWING_X11
|
||||||
void _gtk_window_remove_embedded_xid (GtkWindow *window,
|
void _gtk_window_remove_embedded_xid(GtkWindow *window,
|
||||||
GdkNativeWindow xid);
|
Window xid);
|
||||||
void _gtk_window_add_embedded_xid (GtkWindow *window,
|
void _gtk_window_add_embedded_xid (GtkWindow *window,
|
||||||
GdkNativeWindow xid);
|
Window xid);
|
||||||
#endif
|
#endif
|
||||||
void _gtk_window_reposition (GtkWindow *window,
|
void _gtk_window_reposition (GtkWindow *window,
|
||||||
gint x,
|
gint x,
|
||||||
|
Loading…
Reference in New Issue
Block a user