Commit ad508371 authored by Elliot Lee's avatar Elliot Lee

add gdk_window_set_override_redirect() et al

parent fce69b5a
......@@ -162,6 +162,8 @@ void gdk_window_lower (GdkWindow *window);
void gdk_window_set_user_data (GdkWindow *window,
gpointer user_data);
void gdk_window_set_override_redirect(GdkWindow *window,
gboolean override_redirect);
/*
......
......@@ -191,7 +191,8 @@ typedef enum
GDK_WA_CURSOR = 1 << 4,
GDK_WA_COLORMAP = 1 << 5,
GDK_WA_VISUAL = 1 << 6,
GDK_WA_WMCLASS = 1 << 7
GDK_WA_WMCLASS = 1 << 7,
GDK_WA_NOREDIR = 1 << 8,
} GdkWindowAttributesType;
/* Size restriction enumeration.
......@@ -635,6 +636,7 @@ struct _GdkWindowAttr
GdkCursor *cursor;
gchar *wmclass_name;
gchar *wmclass_class;
gboolean override_redirect;
};
struct _GdkWindow
......
......@@ -155,6 +155,13 @@ gdk_window_new (GdkWindow *parent,
if (xattributes.event_mask)
xattributes_mask |= CWEventMask;
if(attributes_mask & GDK_WA_NOREDIR) {
xattributes.override_redirect =
(attributes->override_redirect == FALSE)?False:True;
xattributes_mask |= CWOverrideRedirect;
} else
xattributes.override_redirect = False;
if (attributes->wclass == GDK_INPUT_OUTPUT)
{
class = InputOutput;
......@@ -1356,3 +1363,15 @@ gdk_window_dnd_data_set (GdkWindow *window,
XSendEvent (gdk_display, event->dragrequest.requestor, False,
NoEventMask, &sev);
}
void
gdk_window_set_override_redirect(GdkWindow *window,
gboolean override_redirect)
{
XSetWindowAttributes attr;
attr.override_redirect = (override_redirect == FALSE)?False:True;
XChangeWindowAttributes(gdk_display,
((GdkWindowPrivate *)window)->xwindow,
CWOverrideRedirect,
&attr);
}
......@@ -155,6 +155,13 @@ gdk_window_new (GdkWindow *parent,
if (xattributes.event_mask)
xattributes_mask |= CWEventMask;
if(attributes_mask & GDK_WA_NOREDIR) {
xattributes.override_redirect =
(attributes->override_redirect == FALSE)?False:True;
xattributes_mask |= CWOverrideRedirect;
} else
xattributes.override_redirect = False;
if (attributes->wclass == GDK_INPUT_OUTPUT)
{
class = InputOutput;
......@@ -1356,3 +1363,15 @@ gdk_window_dnd_data_set (GdkWindow *window,
XSendEvent (gdk_display, event->dragrequest.requestor, False,
NoEventMask, &sev);
}
void
gdk_window_set_override_redirect(GdkWindow *window,
gboolean override_redirect)
{
XSetWindowAttributes attr;
attr.override_redirect = (override_redirect == FALSE)?False:True;
XChangeWindowAttributes(gdk_display,
((GdkWindowPrivate *)window)->xwindow,
CWOverrideRedirect,
&attr);
}
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