add gdk_window_set_override_redirect() et al

This commit is contained in:
Elliot Lee 1997-12-16 22:10:43 +00:00
parent fce69b5a4f
commit ad5083714e
4 changed files with 43 additions and 1 deletions

View File

@ -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);
/*

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}